Coding

Nov. 13th, 2014 03:14 pm
rowyn: (Me 2012)
[personal profile] rowyn
*stares at problem*
*stares at available tools in this software package*

OH PROBLEM I KNOW YOU AREN'T A NAIL BUT ALL I HAVE IS THIS HAMMER I AM SO SORRY

*flattens problem with 16 nested IF statements*

so very sorry

Date: 2014-11-13 10:06 pm (UTC)
From: [identity profile] anher.livejournal.com
Ouch. That's a heck of a hammer...

No way to do anything less of a cludge?

Date: 2014-11-14 12:13 am (UTC)
From: [identity profile] terrycloth.livejournal.com
I think Turing proved that all problems are nails, as long as you have infinite hammers.

Date: 2014-11-14 02:31 pm (UTC)
From: [identity profile] the-gneech.livejournal.com
If only LiveJournal had a "retweet" button! ;)

-TG

Date: 2014-11-14 04:24 pm (UTC)
From: [identity profile] duane-kc.livejournal.com
If it's stupid, but it *works*, then it isn't stupid.

Date: 2014-11-15 04:01 pm (UTC)
From: [identity profile] duane-kc.livejournal.com
The last time I did any coding, it was in Apple BASIC in high school; I'm sure I've done worse things. :)

Date: 2014-11-14 05:59 pm (UTC)
From: [identity profile] jordangreywolf.livejournal.com
Hee hee! Perhaps not elegant, but if it works....

Date: 2014-11-14 09:35 pm (UTC)
From: [identity profile] shockwave77598.livejournal.com
Unnesting

Take a variable and set it to 0

Execute each test in sequence and add 1 if test is true. You only get the right number if all tests are true - a single if test at the end checks for that.

Date: 2014-11-14 10:14 pm (UTC)
From: [identity profile] shockwave77598.livejournal.com
Excel in nesting

Cell a1
IF(test1,1,0)
Cell a2
IF(test2,1,0)

...

Cell b1
SUM(A:A)

The sum will be equal to the number of tests only if every test is true

Date: 2014-11-15 03:03 am (UTC)
From: [identity profile] alltoseek.livejournal.com
sounds like a very basic SQL.

SQL is a set-operating tool, not a row-by-row processor, so it can take only one pass.

Was gonna suggest case, but I see you looked for that. That's a more advanced SQL, so your tool might be very old and basic.

OTOH, I do have an Excel spreadsheet that has serious nested calculations going on - hideous. I have to copy the thing into Word to edit it, then paste it back. Without all the formatting I used in Word to make it readable.

So I feel your pain.

Date: 2014-11-17 04:17 am (UTC)
From: [identity profile] alltoseek.livejournal.com
Yep. SQL Server Report Builder sux. It sucked when I first worked with it years ago and evidently it still sux.

I imagine they called it "iif" because it's not really "if". It's "if if sucked, this is what if would be".

Date: 2014-11-17 06:54 am (UTC)
zeeth_kyrah: A glowing white and blue anthropomorphic horse stands before a pink and blue sky. (Draco ferios)
From: [personal profile] zeeth_kyrah
Yeah. The "icky if" of Bad Suck Software. BS Software is such an awful company, always half-assing things.

June 2025

S M T W T F S
12345 67
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Active Entries

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 16th, 2025 11:27 am
Powered by Dreamwidth Studios