The Mod Out System

« Return to Article
  • James 2009-04-23 11:03
    F-t,p,o,s,t
  • rpjs 2009-04-23 11:03
    We need a full list of every single aviation company that uses Gary's company for its maintenance, so we know who not to fly with.

    (except of course I'm sure all the others have similar WTFs too)
  • Rhywden 2009-04-23 11:07
    I dare say that you'd have to have an IQ in the single digits to come up with such an braindead idea...
  • John Whittet 2009-04-23 11:12
    Wait, that table contains every possible permutation of mods? *facepalm*
  • Better order another petabyte of disk 2009-04-23 11:13
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.
  • Josh 2009-04-23 11:16
    Every problem can be solved with a lookup table. Or so some developers seem to think...
  • Kermos 2009-04-23 11:17
    W,T,F|W,T,F
    W,F,T|W,T,F
    T,F,W|W,T,F
    T,W,F|W,T,F
    F,W,T|W,T,F
    F,T,W|W,T,F
  • way2trivial 2009-04-23 11:20
    it contains every combination used thus far.

    if someone trys to enter a combo that hasn't been used before- it gets rejected.. and then a request was made to one of 3 people to add a permutation to the list

  • blah 2009-04-23 11:22
    Hey Mark, would you mind adding a mod for the comment I'm about to write? Oh, and try not to botch the spelling.
  • KenK 2009-04-23 11:28
    This is genius. If you get paid by the hour to enter those rows you would have several decades of work ahead of you.
  • MM 2009-04-23 11:30
    'What a great first assignment!'

    Famous last words
  • Bami 2009-04-23 11:31
    Bob:
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.
    Depends if it's inclusive or not (if you can repeat the same mod twice).

    If not, you'd be looking at 45!, which is somewhere along the 10^56 range (45*44*43*42 etc).

    If it's inclusive, you just do 45^45, which is along the 10^74 range. Thats combinations, not even data for all those possible combinations, or combinations with less then 45 things.
  • ubersoldat 2009-04-23 11:40
    You know, in many articles I just try to find some excuse for a fellow developer coming with the article's WTF. But some are just inexcusable. Not many times I do whisper and facepalm at the same time, but today, right now... my goooooooogles!!! where are they?!?
  • Jim T 2009-04-23 11:43
    This is the first time I've actually said "oh my god" out loud to one of these stories.

    And it was completely involuntary.

  • Ken B 2009-04-23 11:44
    ubersoldat:
    Not many times I do whisper and facepalm at the same time, but today, right now... my goooooooogles!!! where are they?!?
    Why, over at www.goooooooogle.com, of course!
  • brazzy 2009-04-23 11:44
    Better order another petabyte of disk:
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.

    Well, those "mods" describe a sequence of work steps, and the set of sequences that are technically possible is most likely a very small subset of the simple permutations of the numbers, further constrained by working rules and habits.

    So in practice, it's not nearly as bad as in theory. Still, this ranks pretty high on the "how loud I actually shouted WTF" scale.
  • SomeCoder 2009-04-23 11:45
    I think you can file this one under "Should have realized"

    As in, when the original developer was priming the system with a few hundred rows of mods, didn't he stop and realize "There's got to be a better way.... nah!"

    *FACEPALM*
  • m0ffx 2009-04-23 11:48
    Oh. My. Mod.
  • galgorah 2009-04-23 11:49
    2^ 45 = 35,184,372,088,832
    45! = 1.1962222086548019456196316149566e+56
    45 ^ 45 = 2.4806364445134114549464918239541e+74

    I hope they never try and do select * from all_mods.
  • Jon 2009-04-23 11:50
    This one actually made me say "No!" out loud.

    What's missing, however, is the second tard who usually comes in and thinks "I could write a spiffy little PL/SQL function that would finish out the table."
  • KT 2009-04-23 11:51
    Bami:
    Bob:
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.
    Depends if it's inclusive or not (if you can repeat the same mod twice).

    If not, you'd be looking at 45!, which is somewhere along the 10^56 range (45*44*43*42 etc).

    If it's inclusive, you just do 45^45, which is along the 10^74 range. Thats combinations, not even data for all those possible combinations, or combinations with less then 45 things.


    Given that:

    "Because the company specialized in a fairly specific type of components (multimedia), the steps to perform the work were fairly consistent"

    There is probably only a small subset that are considered 'valid' sequences of steps. Exceptions would be required to be approved by someone who knows that this won't result in the fiery death of hundreds of airline travelers.
  • SPAM King 2009-04-23 11:52
    What the previous poster was trying to say, in its mechanical way, is that it is time for Alex to move to recaptcha.
  • monkeyPushButton 2009-04-23 11:55
    After the crap I've been dealing with this morning, it's nice to read something and say, "Wow, it's not that bad here."

    Of course I was reading this at lunch and nearly lost my appetite.
  • emurphy 2009-04-23 11:57
    As we deal with mods, so we must frame those mods.

    (What?)
  • ashmud 2009-04-23 11:57
    So what happens when someone tries to enter an en-dash instead of a hyphen for a range?
  • DLJessup 2009-04-23 11:57
    Bob is correct, there are 2^45 possible combinations of 45 things here. If you look at the example, the steps are entered in increasing numeric order; for example, you can have 1,2 but not 2,1. Therefore, either step 1 is in the combination or it isn't, either step 2 is in the combination or it isn't, either step 3 is in the combination or it isn't, etc. Thus each possible step doubles the number of combinations, giving us 2^45 - 1 possible combinations. (The - 1 is because the combination of no steps isn't valid.)
  • monkeyPushButton 2009-04-23 11:59
    KT:


    There is probably only a small subset that are considered 'valid' sequences of steps. Exceptions would be required to be approved by someone who knows that this won't result in the fiery death of hundreds of airline travelers.
    Either way, it's still a WTF. If only certain exceptions are valid, then asking for a way to bypass approval is WTF and if that is not the case, the original code is WTF.
  • Jack 2009-04-23 12:10
    rong1982:
    搬家搬家 搬家公司在職進修 婚紗 新娘秘書 汽車旅館 彩妝造型 新娘秘書 票貼 室內設計 室內設計 外遇 抓姦 應收帳款 徵信 徵信社 外遇 徵信 徵信社 外遇 植牙 牙齒矯正 坐月子 宜蘭民宿 婚禮佈置 宜蘭民宿推薦 催眠 派報 太陽能熱水器 Shade sail nike shoes 關鍵字廣告 租屋 搬家 搬家 買房子 花蓮民宿 花蓮民宿 花店 租房子 xo醬 房屋貸款 搬家公司 減肥 減重 床墊 創業加盟 團體服 學英文 英文 補習班 勞工體檢 資源回收 生日禮物 團體服 團體制服 班服 塑膠 日立家電 飾品批發 MBA 在职研究生 在职博士 电动隔膜泵 自吸泵 化工泵 离心泵 磁力泵 螺杆泵 水泵 隔膜泵 气动隔膜泵 婚禮佈置 婚禮佈置 婚禮佈置 酒店經紀 酒店經紀 班服配件 團體服配件 團體服 班服 團體服 班服 團體


    Ok...wtf is a shade sail?
  • Code Dependent 2009-04-23 12:11
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...
  • snoofle 2009-04-23 12:11
    As someone who used to work with aircraft maintenance logs, I can vouch for the fact that just because some technician LOGS that he did steps 1-10 doesn't mean he didn't SKIP some of them. Sadly, a routine occurrence.

  • Ditto 2009-04-23 12:13
    This is the first time I've actually said "oh my god" out loud to one of these stories.

    And it was completely involuntary.


    Ditto. I did the same exact thing.

    This is... unbelievable.
  • GDarius 2009-04-23 12:18
    There is probably only a small subset that are considered 'valid' sequences of steps. Exceptions would be required to be approved by someone who knows that this won't result in the fiery death of hundreds of airline travelers.


    It's still ridiculous to put together a 30 BILLION row* table instead of parsing input and writing a validating function to make sure that mandatory steps are always present.


    *give or take a couple hundred million or so
  • Erzengel 2009-04-23 12:19
    My lord, I felt physically weak after seeing that. That's the most horrendous thing I've ever seen. It would take, what, 10 lines of code? Instead it's how many thousands of table entries? That's not a WTF, that's a OMG-WTF-Friendly-Fire-Cluster-Bomb. Someone needs to take away the degrees those 3 have so that they will never be able to work in the industry again.
  • D-Coder 2009-04-23 12:19
    OMFG.

    No. No. NO. No. No!
  • Jess Me 2009-04-23 12:21
    DLJessup:
    Bob is correct, there are 2^45 possible combinations of 45 things here. If you look at the example, the steps are entered in increasing numeric order

    So you've been able to deduce the full business requirements after viewing 17 examples? (Well 16 and a half but we won't quibble.) Without ever even talking to a single user?

    Guys like you make the baby Jesus cry, and planes fall burning from the sky. (Which the baby Jesus is mysteriously unable or unwilling to prevent. Hmmm...)
  • Bluesman 2009-04-23 12:25
    snoofle:
    As someone who used to work with aircraft maintenance logs, I can vouch for the fact that just because some technician LOGS that he did steps 1-10 doesn't mean he didn't SKIP some of them. Sadly, a routine occurrence.



    Ah, but then we can use the following, much smaller table:

    - All Done
    - Some Done
    - None Done
    - Only God Knows
  • JdFalcon04 2009-04-23 12:31
    DLJessup:
    Bob is correct, there are 2^45 possible combinations of 45 things here. If you look at the example, the steps are entered in increasing numeric order; for example, you can have 1,2 but not 2,1. Therefore, either step 1 is in the combination or it isn't, either step 2 is in the combination or it isn't, either step 3 is in the combination or it isn't, etc. Thus each possible step doubles the number of combinations, giving us 2^45 - 1 possible combinations. (The - 1 is because the combination of no steps isn't valid.)


    Actually, this isn't totally right. Because a user is entering this manually, you have to be able to accept input in ANY legal format. Thus: 1-4,6 = 1-3,4,6 = 1,2,3-4,6 and so on. With a proc they'd all map to 1,2,3,4,6, but with ALL_MODS you need a seperate entry for each
  • Code Dependent 2009-04-23 12:39
    snoofle:
    As someone who used to work with aircraft maintenance logs, I can vouch for the fact that just because some technician LOGS that he did steps 1-10 doesn't mean he didn't SKIP some of them. Sadly, a routine occurrence.
    Aircraft maintenance log. P = "Problem"; S = "Solution"

    P: Left inside main tire almost needs replacement.
    S: Almost replaced left inside main tire.

    P: Test flight OK, except auto-land very rough.
    S: Auto-land not installed on this aircraft.

    P: Something loose in cockpit.
    S: Something tightened in cockpit.

    P: Dead bugs on windshield.
    S: Live bugs on back-order.

    P: Autopilot in altitude-hold mode produces a 200 feet per minute descent.
    S: Cannot reproduce problem on ground.

    P: Evidence of leak on right main landing gear.
    S: Evidence removed.

    P: DME volume unbelievably loud.
    S: DME volume set to more believable level.

    P: Friction locks cause throttle levers to stick.
    S: That's what they're for.

    P: IFF inoperative.
    S: IFF always inoperative in OFF mode.

    P: Suspected crack in windshield.
    S: Suspect you're right.

    P: Number 3 engine missing.
    S: Engine found on right wing after brief search.

    P: Aircraft handles funny.
    S: Aircraft warned to straighten up, fly right, and be serious.

    P: Target radar hums.
    S: Reprogrammed target radar with lyrics.

    P: Mouse in cockpit.
    S: Cat installed.

    P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer.
    S: Took hammer away from midget
  • Oww 2009-04-23 12:53
    So here I was, eating my Caesar salad, innocently reading the article until I got to the table. At the sight of which, I let out a chuckle and made a piece of crouton shoot out of my nose.

    I never thought bread could be so painful.

    CAPTHCA: iusto
    From the immortal words:
    At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis ...
  • Zach Bora 2009-04-23 12:56
    [quote user="Code Dependent"][quote user="snoofle"]
    P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer.
    S: Took hammer away from midget [/quote]

    This last one made me LOL. I hadn't laughed like that in awhile.
  • Dr. Evil 2009-04-23 12:58
    Jack:
    rong1982:
    搬家搬家 搬家公司在職進修 婚紗 新娘秘書 汽車旅館 彩妝造型 新娘秘書 票貼 室內設計 室內設計 外遇 抓姦 應收帳款 徵信 徵信社 外遇 徵信 徵信社 外遇 植牙 牙齒矯正 坐月子 宜蘭民宿 婚禮佈置 宜蘭民宿推薦 催眠 派報 太陽能熱水器 Shade sail nike shoes 關鍵字廣告 租屋 搬家 搬家 買房子 花蓮民宿 花蓮民宿 花店 租房子 xo醬 房屋貸款 搬家公司 減肥 減重 床墊 創業加盟 團體服 學英文 英文 補習班 勞工體檢 資源回收 生日禮物 團體服 團體制服 班服 塑膠 日立家電 飾品批發 MBA 在职研究生 在职博士 电动隔膜泵 自吸泵 化工泵 离心泵 磁力泵 螺杆泵 水泵 隔膜泵 气动隔膜泵 婚禮佈置 婚禮佈置 婚禮佈置 酒店經紀 酒店經紀 班服配件 團體服配件 團體服 班服 團體服 班服 團體


    Ok...wtf is a shade sail?


    So out of all that, you choose to question Shade sail? I am more curious about "Dr. diaphragm self-priming pump centrifugal chemical pumps."
  • Bami 2009-04-23 13:05
    DLJessup:
    Bob is correct

    That's no Bob!
    (I just copypasted the quote code from the BBCode thing)
  • hi there 2009-04-23 13:17
    James:
    F-t,p,o,s,t

    FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstpost

    I see
  • SomeCoder 2009-04-23 13:17
    Code Dependent:
    Aircraft maintenance log. P = "Problem"; S = "Solution"

    P: Left inside main tire almost needs replacement.
    S: Almost replaced left inside main tire.

    P: Test flight OK, except auto-land very rough.
    S: Auto-land not installed on this aircraft.

    P: Something loose in cockpit.
    S: Something tightened in cockpit.

    P: Dead bugs on windshield.
    S: Live bugs on back-order.

    P: Autopilot in altitude-hold mode produces a 200 feet per minute descent.
    S: Cannot reproduce problem on ground.

    P: Evidence of leak on right main landing gear.
    S: Evidence removed.

    P: DME volume unbelievably loud.
    S: DME volume set to more believable level.

    P: Friction locks cause throttle levers to stick.
    S: That's what they're for.

    P: IFF inoperative.
    S: IFF always inoperative in OFF mode.

    P: Suspected crack in windshield.
    S: Suspect you're right.

    P: Number 3 engine missing.
    S: Engine found on right wing after brief search.

    P: Aircraft handles funny.
    S: Aircraft warned to straighten up, fly right, and be serious.

    P: Target radar hums.
    S: Reprogrammed target radar with lyrics.

    P: Mouse in cockpit.
    S: Cat installed.

    P: Noise coming from under instrument panel. Sounds like a midget pounding on something with a hammer.
    S: Took hammer away from midget


    I've seen those before but they are always good for a laugh :)
  • jmroth 2009-04-23 13:18

    http://www.dailydemotivators.com/wp-content/uploads/2009/04/doublefacepalm2.jpg
  • jimlangrunner 2009-04-23 13:19
    Code Dependent:
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...

    What would that be? Does it have anything to do with Irish Girl?
  • ideot - that's me 2009-04-23 13:42
    jimlangrunner:
    Code Dependent:
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...

    What would that be? Does it have anything to do with Irish Girl?

    And a wooden table?
  • amischiefr 2009-04-23 13:44
    John Whittet:
    Wait, that table contains every possible permutation of mods? *facepalm*

    Hopefully this is because when it was first developed there were strict guidelines on what series of mods were available so as to restrict certain combinations. Hopefully...
  • Charles400 2009-04-23 13:56
    OH MY GOD!

    Back in my younger programmer days, I wrote exactly this (WTF) type of function, but for golf clubs!

    3-9 (a set of 3,4,5,6,7,8,9 Irons)
    3-9P (set of 3,4,5,6,7,8,9,Pitching wedge)
    3-9PS (set of 3,4,5,6,7,8,9,Pitching wedge, Sand wedge)
    :
    etc.

    These table entries were like a low-level design for a bill of materials.
  • Missed it by that much 2009-04-23 14:38
    That would be closer to a (potentially) 35+ TRILLION row* table.

    *give or take a couple hundred BILLION or so
  • awfwefewa 2009-04-23 14:52
    Loved how he used the SQL wildcard to get them all too. I use that a lot for websites.
  • Populus 2009-04-23 14:53
    amischiefr:
    John Whittet:
    Wait, that table contains every possible permutation of mods? *facepalm*

    Hopefully this is because when it was first developed there were strict guidelines on what series of mods were available so as to restrict certain combinations. Hopefully...


    Exactly ... this is more or less the right solution if only certain sequences of mods are permitted.
  • Zapakh 2009-04-23 15:06
    Kermos:
    W,T,F|W,T,F
    W,F,T|W,T,F
    T,F,W|W,T,F
    T,W,F|W,T,F
    F,W,T|W,T,F
    F,T,W|W,T,F


    WTF FTW indeed!
  • John Winters 2009-04-23 15:09
    Even more than 2^45, because there are different ways of entering the same combination. The reasoning above only considers cases where all the steps are entered separately, but if for instance we had:

    1,2,3,4,5,6

    then the same combination could be entered as:

    1-2,3,4,5,6
    1-3,4,5,6
    1-4,5,6
    1-5,6
    1-2,3-4,5,6
    1-2,3-4,5-6
    1-2,3,4,5-6

    etc, etc...

    And each of these needs its own row in the table. The total number would be quite a lot more than 2^45.
  • Tom 2009-04-23 15:19
    Populus:
    amischiefr:
    John Whittet:
    Wait, that table contains every possible permutation of mods? *facepalm*

    Hopefully this is because when it was first developed there were strict guidelines on what series of mods were available so as to restrict certain combinations. Hopefully...


    Exactly ... this is more or less the right solution if only certain sequences of mods are permitted.


    Only if the table also included the name, employee ID, and date of approval. If this is in fact a system to prevent unapproved mods then you need to be able to audit it. My money's on the WTF.
  • Bappi 2009-04-23 15:19
    John Winters:
    Even more than 2^45, because there are different ways of entering the same combination. The reasoning above only considers cases where all the steps are entered separately, but if for instance we had:

    1,2,3,4,5,6

    then the same combination could be entered as:

    1-2,3,4,5,6
    1-3,4,5,6
    1-4,5,6
    1-5,6
    1-2,3-4,5,6
    1-2,3-4,5-6
    1-2,3,4,5-6

    etc, etc...

    And each of these needs its own row in the table. The total number would be quite a lot more than 2^45.

    No, it wouldn't. You're forgetting that this is an in-house, custom development, and that if you want records added to the table, you have to ask someone to do it for you. The reply, for each of the combinations you list, would be to "just type 1-6."
  • random.next 2009-04-23 15:23
    rpjs:
    We need a full list of every single aviation company that uses Gary's company for its maintenance, so we know who not to fly with.

    (except of course I'm sure all the others have similar WTFs too)
    Read again, it's mostly just multimedia equipment.
    Besides, the actual work on the equipment is the way it should be (well, that's assuming the "specialists" didn't make any typos when typing all those numbers). :-)
  • pink_fairy 2009-04-23 15:25
    Jess Me:
    DLJessup:
    Bob is correct, there are 2^45 possible combinations of 45 things here. If you look at the example, the steps are entered in increasing numeric order

    So you've been able to deduce the full business requirements after viewing 17 examples? (Well 16 and a half but we won't quibble.) Without ever even talking to a single user?

    Guys like you make the baby Jesus cry, and planes fall burning from the sky. (Which the baby Jesus is mysteriously unable or unwilling to prevent. Hmmm...)
    Well, it's a sort of hideous multi-dimensional WTF, isn't it?

    (1) FAA regs. There may be a good reason why these apply to "multimedia" components, but I'm not convinced. Could well be pointless red tape.
    (2) Lots of ripping "warranty invalidated" panels off. Given the general ambience of the story, I'd bet that the owner of the warranty isn't the repair service company.
    (3) Oracle 11i. Well, we'll get to that.
    (4) 'The field accepted "shorthand" input.' So presumably 'the doohickey' in charge of 'the field' can perform simple validation and normalisation. It's not like turning "1-6" into "1,2,3,4,5,6" is an especially burdensome task.
    (5) Why is any of this at all being done in the database?

    Really, I swear, the sort of morons who buy Oracle 11i for applications like this make junior PHP hobbyists look like Gurus. If there really are dependencies between the steps, or even the ordering of the steps, then this is a perfectly sensible use of a database (only minus the actual logic). Exactly what benefit is derived from a "one validation fits all" massive denormalisation into a single table with a single column of machine-unfriendly -- and user-unfriendly; what happens if I prefer "1-4,5-6"? -- gibberish is ... aak, the bats! they're swooping again!

    Of course, as usual, half the important details have been elided for clarity, but I'm at a loss to see how any of this makes sense.

    And the real WTF, the true WTF, the absolutely goddamn inevitable WTF with a system like this, is
    "every now and then you come across a mod level that hasn't been entered"
    .
    Well, yes, I imagine you would.

    In which case you have three choices:

    (1) Rewrite the goddamn application so that it makes sense. Heck, you've got Oracle 11i. Use (shudder) Java, if you feel you have the need.
    (2) Keep with the current system. At least it requires manual intervention from one of three people who are liable to be sued when things go wrong.
    (3) Auto-add each new mod.

    W-T \wH\w \w+CK?

    Once you've got down to 0-normal form, I didn't think it was possible to go lower.

    I was sadly misinformed. By the way, is that an African plane falling burning from the sky, or the European kind?
  • Just Another WTF 2009-04-23 15:48
    Actually this sort of thing could be a feature. Instead for writing boring '1-4,7' thingies in the edit box you could write 'waffles' and then get your buddy in IT to add the line in the table so 'waffles' turns into '1,2,3,4,7' and 'rabbit' becomes '1,2,3' heck Tom over there can get 'jupiter XY' to be '1,2,3,4,7' too just to add more excitement to the system.
  • Anon 2009-04-23 15:50
    This place is so flippin' mod biased...there's never any mention of rockers! I'm gonna go ride my scooter off the Cliffs of Dover now...
  • pink_fairy 2009-04-23 16:16
    Anon:
    This place is so flippin' mod biased...there's never any mention of rockers! I'm gonna go ride my scooter off the Cliffs of Dover now...
    I don't remember Harry Webb featuring in that film. Is there a Director's Cut that features a bus plunging on to the rocks below while Mr Richard caterwauls "We're all going on a summer ... AAARGH!"

    If so, I want the link on YouTube. Hell, my mother wants the link, and she's been dead for three years.

    We're not much a Cliff Richard family, us.

    BTW Rocker+1 that comment, my man.
  • Shambo 2009-04-23 16:31
    My co-workers gave me a weird look when I just said
    "Noooooo" in sad disbelief.
  • JohnB 2009-04-23 16:41
    A quick scan of the comments suggests to me that the solution is not as big a WTF as it first seems.

    There may very well be selected combinations of mods that cannot be performed during the same service call. In this case, you would need to build a table of "if I am doing this and this and this then I cannot do that or that or ..." Well, you get the idea.

    This kind of knowledge is specialized and, in a small shop, that kind of knowledge might be known by only, say, 3 specialists. The effort to develop a rule-based algorithm might very well be non-trivial given the universe of possible combinations.

    So, instead of building in all the logic to handle which mods can/cannot be combined, you build in logic (a simple table lookup) that accepts only previously approved combinations. All other sequences need validation and confirmation by the SMEs.
  • My Name 2009-04-23 16:54
    Brilliant case of job security
  • emurphy 2009-04-23 16:55
    ideot - that's me:
    jimlangrunner:
    Code Dependent:
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...

    What would that be? Does it have anything to do with Irish Girl?

    And a wooden table?


    Hot.
  • pink_fairy 2009-04-23 16:59
    JohnB:
    A quick scan of the comments suggests to me that the solution is not as big a WTF as it first seems.

    There may very well be selected combinations of mods that cannot be performed during the same service call. In this case, you would need to build a table of "if I am doing this and this and this then I cannot do that or that or ..." Well, you get the idea.

    This kind of knowledge is specialized and, in a small shop, that kind of knowledge might be known by only, say, 3 specialists. The effort to develop a rule-based algorithm might very well be non-trivial given the universe of possible combinations.

    So, instead of building in all the logic to handle which mods can/cannot be combined, you build in logic (a simple table lookup) that accepts only previously approved combinations. All other sequences need validation and confirmation by the SMEs.
    No, it's still a huge and hairy WTF.

    (I was wrong, btw:) The database table holds two columns: one contains "shortcuts" and the other "expansions." Now, I've actually written this in Perl once, and it's not as easy as it sounds ... if you want to get it right. I mean, it's about two hundred lines of Perl.

    Or two fucking stupid columns. Plus about a quarter inch for any other columns with really narrow column names.

    Look. It's simple. Only one column is necessary, no matter how brain-dead this application may be. Can you guess which column that might be?

    So you go with the simple solution: a list of ordinals. Jeez, even Access can manage this (single-threaded). But, let's consider your proposition first.

    Let's assume the model is "disassemble ... spray miracle unglue ... remove chip ... replace with new chip ... spray miracle reglue ... reassemble."

    That would be about it. I don't see any PhD Electrical Engineering stuff going on here. You've got preconditions, you've got actions, you've got postconditions. You also have dependencies on other components/procedures, which ought to be trivial to model for something that sits in a recess in the back of the seat in front, for God's sake.

    I see this as a decision tree about yay deep by hoo wide, where (yay < limit) and (hoo < limit) and (limit ~ 10). Basically, a sparse matrix with a built-in state-machine. Not too difficult to implement for the average Pooh Bear in 1970. Possibly too difficult for the idiots we have using things like Oracle 11i these days.

    Oh, and if it is too difficult? Why would you rely on Los Tres Supremos to get it right manually on a bad hair day?

    Or maybe that's why they don't answer their emails any more ...
  • Sa 2009-04-23 17:19
    pink_fairy:
    JohnB:
    A quick scan of the comments suggests to me that the solution is not as big a WTF as it first seems. [...]


    No, it's still a huge and hairy WTF.

    [... Some text in pseudo-english that praises state tables, Perl, decision trees, and the 1970's snipped...]



    Damn! "Add a row to a database table" looks better and better all of the time...
  • Another_Jack 2009-04-23 17:30
    TRWTF is why you all are debating the best way to code a solution when it's obvious:

    "the field accepted "shorthand" input to represent a range of numbers"

    ... change the field to diable "shorthand" input. A few extra keystrokes won't kill them and compared to everyone stopping what they're doing every time someone comes up with a new permutation it would probably save time in aggregate.
  • pink_fairy 2009-04-23 17:44
    Sa:
    pink_fairy:
    JohnB:
    A quick scan of the comments suggests to me that the solution is not as big a WTF as it first seems. [...]


    No, it's still a huge and hairy WTF.

    [... Some text in pseudo-english that praises state tables, Perl, decision trees, and the 1970's snipped...]

    Damn! "Add a row to a database table" looks better and better all of the time...
    Accept my condolences. I didn't know you were a native Klingon speaker.

    I assume you have some sort of psychological problem with state tables and decision trees. You can leave me with the Perl and 1970s horror.

    Yes, perhaps now is a good day to die.

    Addendum (2009-04-23 18:03):
    PS, it's a "state machine," not a "state table," you cretin. I took your word for it, because your Quotez Skillz are sadly deficient and I didn't want to draw attention to the fact in case your sophomore year supervisor was checking in.

    There is a fairly important difference.
  • Monday 2009-04-23 17:46
    Wait, I can fix it!

    if(inputValue == "1"){
    dbInsert("1");
    } else if (inputValue = "1-2") {
    dbInsert("1");
    dbInsert("2");
    } else if (inputValue == "1,2,3-6) {
    dbInsert("1");
    dbInsert("2");
    dbInsert("3");
    dbInsert("4");
    dbInsert("5");
    dbInsert("6");
    }
    .....<snip>........
    } else if (inputValue == "1-6, 8-21, 22-26"){

    }


    It was too confusing before, I couldn't follow the logic.
  • Motown 2009-04-23 17:54
    Sa:
    pink_fairy:
    JohnB:
    A quick scan of the comments suggests to me that the solution is not as big a WTF as it first seems. [...]


    No, it's still a huge and hairy WTF.

    [... Some text in pseudo-english that praises state tables, Perl, decision trees, and the 1970's snipped...]



    Damn! "Add a row to a database table" looks better and better all of the time...


    I'll say. This is more of a baby WTF that grew over time.

    At the start it was probably the easiest solution, especially since the guy programming it probably gave up on the always illogical business logic that the supervisors use.

    pink fairy wants to spend a few months analyzing the requirements, while the original dude spent all of a day from bright idea to code complete.

    You've also got to think about how other systems consume data. Perhaps some braindead report writer thing can't actually extract 1-3,5 to be 1,2,3,5 so the table of possible combinations also has to store it.

    I only bring these up because most of the time the wtf's in your system are a result of illogical business logic, and other enterprisey apps. At least we can be certain they'll never develop the world domination robots.
  • pink_fairy 2009-04-23 17:58
    Just Another WTF:
    Actually this sort of thing could be a feature. Instead for writing boring '1-4,7' thingies in the edit box you could write 'waffles' and then get your buddy in IT to add the line in the table so 'waffles' turns into '1,2,3,4,7' and 'rabbit' becomes '1,2,3' heck Tom over there can get 'jupiter XY' to be '1,2,3,4,7' too just to add more excitement to the system.
    Well, you've got a point there. Although it's not really secure, is it? I mean, the least you can do is to store it in Base64 ...
  • Matt 2009-04-23 18:50
    $user_input

    SELECT sequence FROM lookup_table WHERE shorthand = '$user_input' AND status = 'live'

    if(num_results < 1){

    // Code to parse string goes here:
    // can't be bothered writing it now. too much wine on board

    $parsed_result

    // generate user alert here
    // Something along the lines of:
    // 'Please contact a service engineer to add your job request'

    //Charge 3 hours' work

    INSERT INTO lookup_table (shorthand , sequence , status) VALUES ($user_input , $parsed_result , 'pending')
    } else {
    // Continue program logic here.
    }


    .. Sounds like a great gig to me.
  • Americium 2009-04-23 19:08
    Better order another petabyte of disk:
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.


    There are 45 factorial permutations of just listing numbers 1 to 45. That doesn't even count the ranges, like "2-3".

    Also, 45! is definitely much greater that 2**45 power, since each term in the product, except one & two, are greater than two. There are 45 terms in both products.

    Computers do math. so, programmers should know math. That's a common WTF.
  • Jess Me 2009-04-23 20:41
    Americium:
    Computers do math. so, programmers should know math.

    (Mandatory car analogy)
    Cars consume gasoline. So, drivers should drink gasoline.

    C'mon, one of the nice things about having a computer is it can do the math for me! All that math they made me learn to get my degree... never used a bit of it in over 25 years of software and database development.
  • Hulser 2009-04-23 20:45
    It seems to me that if the whole parse-a-comma-delimited-list-of-numbers-and-numeric-ranges alternative solution is itself a WTF.

    Even if there is some kind of restriction on the valid combinations, why wouldn't you just design the front-end so you could click on the mods you wanted in the set? You could use a checked list box or a Left-list/Add/Remove/Right-list style form. This way you could allow the user to see the actual mod names and not have to mess around with the numbers.

    I can't think of any time that I've seen a comma-delimited list stored in a database where there hasn't been a much better solution.
  • SurturZ 2009-04-23 20:55
    I know! They could write a routine that automatically goes through each possible permutation to pre-load the table!

    Err.. waitasec...
  • Jesse 2009-04-23 21:12
    Well, one the plus side, he's got a few thousand unit tests already written for his new function.
  • Slicerwizard 2009-04-23 22:40
    And he'll probably find a few errors in those tests...
  • Watson 2009-04-24 00:11
    Just Another WTF:
    Actually this sort of thing could be a feature. Instead for writing boring '1-4,7' thingies in the edit box you could write 'waffles' and then get your buddy in IT to add the line in the table so 'waffles' turns into '1,2,3,4,7' and 'rabbit' becomes '1,2,3' heck Tom over there can get 'jupiter XY' to be '1,2,3,4,7' too just to add more excitement to the system.
    I got in touch with my buddy in IT and now 'Remove Rickrolling interrupt hack' maps to '1,2,3,4,7' as well.
  • Watson 2009-04-24 00:19
    Americium:
    Better order another petabyte of disk:
    ALL mods? I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45? Better order some more disks.


    There are 45 factorial permutations of just listing numbers 1 to 45. That doesn't even count the ranges, like "2-3".

    Also, 45! is definitely much greater that 2**45 power, since each term in the product, except one & two, are greater than two. There are 45 terms in both products.

    Computers do math. so, programmers should know math. That's a common WTF.


    Well ... all that would be relevant if all 45 steps were to be performed on all mods, and the only difference between them was in the order in which they were to be performed. I leave it as an exercise for you to determine how many of them would have "Close field-serviceable covers" immediately followed by "Open field-serviceable covers".

    What's going on here is that there are 45 different tasks that may or may not need to be performed for any given mod, and only a very limited amount of leeway in the order in which those tasks could be performed (exactly how many possible permutations there are for each mod - how many topological sorts are admitted by the dependency graph - is of course something that would come from the realms of business logic).
  • Jay 2009-04-24 00:27
    I wonder how many entries are already in the table. And how many of them contain errors. I'd bet that somewhere in there, there's something like "1-9" maps to "1,2,3,4,5,6,7,9". And then somebody gets the wrong list of steps, and no one can figure out why.

    Note to those saying this may actually be a good design if the requirement is to limit the set of legal combinations: The story started off with the requirement that new combinations be "auto-added". So the whole point is that there is NOT a requirement to limit the combinations.
  • Jay 2009-04-24 00:30
    On my present job, I recently commented that I was impressed how the original authors of a certain software package we are using managed to get such a complex product to work through sheer persistence and hard work, despite their total lack of skill and talent.

    I'd say the same thing applies here. Can't get a 20-line function to work? No problem. Just hand-type a few thousands rows into a database. I guess it's better than giving up in despair.
  • Jay 2009-04-24 00:36
    jimlangrunner:
    Code Dependent:
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...

    What would that be? Does it have anything to do with Irish Girl?


    What a great idea! Just have a list of common comments that users can select from. Think how much time it would save.

    1. First!

    2. The real WTF is using VB.

    3. Irish Girl!

    4. Wooden table!

    5. This story is obviously fake because no rational human being would do any such thing.

    6. If we make a few additional assumptions what the programmer did here is completely valid.

    ... and maybe a dozen or so more.
  • Jay 2009-04-24 00:41
    Going by the examples, it appears that the numbers must always occur in order, that is, 1,2,3,4,5 is valid but 2,4,3,1,5 is not.

    Given that, the correct total count is 2^45. Each of the forty-five numbers may or may not appear, but the order is fixed.

    45! would be the correct total if all 45 always appeared, but they could come in any order and the order is relevant. That is, there are then 45 choices for the first number, 44 remaining choices for the second, etc.
  • hey persto! 2009-04-24 00:55
    As has been stated already, these are not just random numbers, they represent real steps in a process which must be followed.

    Presumably there are many dependencies between the different steps thus:

    a) limiting the number of permutations
    b) requiring some form of validation

    Having a pre-populated list like this could make sense, particularly if there is code which maps particular sequences to something more meaningful. e.g. rather than showing 1-5,7,12-14,18 on the front end, maybe this sequence could be mapped to "Standard Engine Repair/Service" or whatever, which again could benefit from a table to validate against (but would presumably have a name column here).

    Having said this, it is a pretty poor solution and suggest that either the designer had an IQ of 5, or the requirements initially only involved 3 possible steps and the designer hadn't accounted for growth.
  • aihtdikh 2009-04-24 01:59
    Jack:
    rong1982:
    <snip garbage>


    Ok...wtf is a shade sail?

    What, couldn't you figure it out from the context?
    It's a sail that provides shade - kind of like a fabric patio.
  • MetalPig 2009-04-24 02:30
    Jack:
    Ok...wtf is a shade sail?

    It's a solar sail that works in the dark.
  • David 2009-04-24 04:09
    Ah, yes, the kind of solution that makes you want to cause physical violence to it's creator, simply because justice requires that somebody that incompetent also be in pain.
  • C 2009-04-24 05:06
    galgorah:
    I hope they never try and do select * from all_mods.
    Umm... Gary did just that... You can clearly see the "filter" in the screen-shot.
  • Alexander 2009-04-24 05:37
    I don't consider this a WTF. There is probably only a very small number of sequences valid (in the sense of "You are still allowed to fly the A/C afterwards"). And the rules to determine the valid sequences are probably somewhat complicated. Thus a field validation would be a disatrous big piece of code with rules, exceptions, exceptions of the exceptions, ...
    So it's perfectly reasonable to outsource the real field validation to the most effective device to do this (the human brain of somebody understanding the A/C maintenance process) and to cache the results of this validation in a list.
  • Sgeo 2009-04-24 05:46
    Ok, but then why doesn't it just expand the shorthand and check to see whether the final expansion is in the table?
  • tragomaskhalos 2009-04-24 06:07
    Jay:
    I wonder how many entries are already in the table. And how many of them contain errors. I'd bet that somewhere in there, there's something like "1-9" maps to "1,2,3,4,5,6,7,9". And then somebody gets the wrong list of steps, and no one can figure out why.

    Exactly what I was thinking - Sod's law dictates that there is *bound* to be an error somewhere in that data. The only way to avoid it would be to have code to do the conversion automatically ... in which case just put that code in the app and dispense with the stupid table already !
  • dkf 2009-04-24 06:37
    Alexander:
    I don't consider this a WTF.
    Where exactly do you work? I want to make sure that we never ever consider outsourcing anything your direction. (Conflating validation and shorthand expansion...? Oh dearie dearie me.)
  • Watson 2009-04-24 06:43
    hey persto!:
    e.g. rather than showing 1-5,7,12-14,18 on the front end, maybe this sequence could be mapped to "Standard Engine Repair/Service" or whatever, which again could benefit from a table to validate against (but would presumably have a name column here).
    I can actually see that as a way for this to end up being created. The idea was to have mappings like "Standard Engine Repair/Service" => 1,2,3,4,5,7,12,13,14,18; the desire for abbreviations like to "1-5,7,12-14,18" came along so they were added; and then it was decided that "Standard Engine Repair/Service" was far too vague a statement of what the mod actually was and - after deciding that "1-5,7,12-14,18" was much more accurate anyway - it was dropped.
  • Required for Anonymous Users 2009-04-24 07:29
    Watson:
    Just Another WTF:
    Actually this sort of thing could be a feature. Instead for writing boring '1-4,7' thingies in the edit box you could write 'waffles' and then get your buddy in IT to add the line in the table so 'waffles' turns into '1,2,3,4,7' and 'rabbit' becomes '1,2,3' heck Tom over there can get 'jupiter XY' to be '1,2,3,4,7' too just to add more excitement to the system.
    I got in touch with my buddy in IT and now 'Remove Rickrolling interrupt hack' maps to '1,2,3,4,7' as well.
    Does 'luggage code' map to 1,2,3,4,5?
  • Rocketeer 2009-04-24 07:37
    There is one other reason why this might have been done, that I don't think anyone has mentioned yet...

    You see, the user interface there looks a lot like Oracle Applications, rather than just the Oracle Database. If that's the case, then the original "Developer" probably was just a techie who performed the initial install and configuration of the application.

    The standard features of Oracle Apps lets you specify a lookup table for a field, but it doesn't let you specify a custom PL/SQL function. This means the original techie had two choices:
    1. Change the source code of a (very expensive) third party program (Oracle Apps) to allow validation using a function.
    2. Provide a lookup table, and get someone to maintain it

    Of course, the correct solution (without modifying the Oracle Applications code) is to add an "On UPDATE" trigger for the field with the expansion function - but that still probably sounded too much like "customise 3rd party app" to a manager somewhere!
  • Byrn 2009-04-24 08:23
    Monday:
    Wait, I can fix it!

    if(inputValue == "1"){
    dbInsert("1");
    } else if (inputValue = "1-2") {
    dbInsert("1");
    dbInsert("2");
    } else if (inputValue == "1,2,3-6) {
    dbInsert("1");
    dbInsert("2");
    dbInsert("3");
    dbInsert("4");
    dbInsert("5");
    dbInsert("6");
    }
    .....<snip>........
    } else if (inputValue == "1-6, 8-21, 22-26"){

    }


    It was too confusing before, I couldn't follow the logic.

    This needs to be redesigned to use the for ... case pattern!
  • Anonymous 2009-04-24 09:07
    I don't see the problem, it's only 35,184,372,088,832 rows. I'm sure there's no better way to do this.
  • Hulser 2009-04-24 09:50
    Alexander:
    I don't consider this a WTF. There is probably only a very small number of sequences valid (in the sense of "You are still allowed to fly the A/C afterwards"). And the rules to determine the valid sequences are probably somewhat complicated. Thus a field validation would be a disatrous big piece of code with rules, exceptions, exceptions of the exceptions, ...
    So it's perfectly reasonable to outsource the real field validation to the most effective device to do this (the human brain of somebody understanding the A/C maintenance process) and to cache the results of this validation in a list.


    To those people who are suggesting that the design is intended to restrict the options to valid combinations, I think you missed something in the first sentence of the post. The guy was hired to implement an way to "automatically add mods". If the business process was that some person reviewed the new combination to make sure it was valid, they wouldn't be adding a feature to automatically add any new user-entered combination to the look-up table.
  • Pedant 2009-04-24 09:59
    Americium:
    Better order another petabyte of disk:
    I don't remember my combinatorics too well but isn't the number of combinations of 45 things like way up there, like 2^45?


    There are 45 factorial permutations of just listing numbers 1 to 45. That doesn't even count the ranges, like "2-3".

    Also, 45! is definitely much greater that 2**45 power, since each term in the product, except one & two, are greater than two. There are 45 terms in both products.

    Computers do math. so, programmers should know math. That's a common WTF.


    Combinations aren't the same as permutations. That's a common WTF, and programmers should know math. 2^45 is correct for the number of combinations of 45 items.
  • theamoeba 2009-04-24 10:42
    Populus:
    amischiefr:
    John Whittet:
    Wait, that table contains every possible permutation of mods? *facepalm*

    Hopefully this is because when it was first developed there were strict guidelines on what series of mods were available so as to restrict certain combinations. Hopefully...


    Exactly ... this is more or less the right solution if only certain sequences of mods are permitted.


    It's still better to normalize and then validate. And this table doesn't appear to be part of validation, based on the fact that the ALL_MODS table doesn't have a field for which maintenance procedure is being performed.

  • RobFreundlich 2009-04-24 10:57
    [quote user="Jay]
    What a great idea! Just have a list of common comments that users can select from. Think how much time it would save.

    1. First!

    2. The real WTF is using VB.

    3. Irish Girl!

    4. Wooden table!

    5. This story is obviously fake because no rational human being would do any such thing.

    6. If we make a few additional assumptions what the programmer did here is completely valid.

    ... and maybe a dozen or so more.[/quote]

    Reminds me of a joke:

    A guy is sitting in a bar, having a drink or two. Every once in a while, someone will call out a number, and the patrons will laugh. He gets more and more confused, until someone calls out "37", and the patrons go absolutely nuts - rolling on the floor with laughter. So he grabs one of the waiters.

    Guy: "Uh, excuse me, I'm confused. Every once in a while, someone calls out a number and the crowd laughs. What's going on?"

    Waiter: "Oh, those are the regulars. They've told the same jokes and stories so many times, they decided to give them all numbers. So now instead of telling the joke, they just call out the number."

    Guy: "Cool! But what about the last one? Someone called out 37 and everyone laughed much, much harder than usual."

    Waiter: "Oh, that's because they'd never heard that one before."
  • Code Dependent 2009-04-24 11:16
    RobFreundlich:
    A guy is sitting in a bar, having a drink or two. Every once in a while, someone will call out a number, and the patrons will laugh. He gets more and more confused, until someone calls out "37", and the patrons go absolutely nuts - rolling on the floor with laughter. So he grabs one of the waiters.

    Guy: "Uh, excuse me, I'm confused. Every once in a while, someone calls out a number and the crowd laughs. What's going on?"

    Waiter: "Oh, those are the regulars. They've told the same jokes and stories so many times, they decided to give them all numbers. So now instead of telling the joke, they just call out the number."

    Guy: "Cool! But what about the last one? Someone called out 37 and everyone laughed much, much harder than usual."

    Waiter: "Oh, that's because they'd never heard that one before."
    Guy: "Reckon I could try it?"

    Waiter: "Sure, go ahead. 103 is a funny one."

    Guy: "103!" (room gets very quiet)

    Guy: "What happened? Nobody laughed."

    Waiter: "Some people just don't know how to tell a joke."
  • cod3_complete 2009-04-24 11:48
    And of course, the bad news was that this was just the tip of the iceberg.


    Wait! What's the rest of the iceberg this guy hit? Sadistic minds want to know! j/k...
  • Alex 2009-04-24 12:07
    cod3_complete:
    And of course, the bad news was that this was just the tip of the iceberg.


    Wait! What's the rest of the iceberg this guy hit? Sadistic minds want to know! j/k...


    Yes, it looks like the story is incomplete. WTF! I want to know what is the rest of the iceberg too!
  • anonymous 2009-04-24 12:26
    wild guess...

    sum(k = 1 .. n, choose(n, k)) *
    sum(i = 1 .. n, sum(j = 0 .. i-1, choose(i,j)))

    n = maximum number of steps

    First line is number of possible non-shorthand step combinations
    Second line is number of ways to insert commas in each set of steps.

    yes? no?

    x anon
  • anonymous 2009-04-24 14:36
    So the puzzle about how many possible mods had to be answered, I made a quick python program:

    N=45
    mem = dict();


    def rcount(p, before, skipping):
    if ( p >= N ):
    if( skipping):
    return 0
    else:
    return 1

    if(skipping):
    return count(p+1, 1, 1) + count(p+1, 1, 0)
    if(before):
    return count(p+1,1,0) + count(p+1,1,1) + count(p+1,0,0)
    return count(p+1,1,0) + count(p+1,0,0)


    def count(p, before, skipping):
    key = (p, before, skipping)

    try:
    return mem[key]
    except:
    r = rcount(p, before, skipping)
    mem[key] = r
    return r

    print count(0, 0, 0)

    The result is 101302819786919522
  • pink_fairy 2009-04-24 15:33
    anonymous :
    So the puzzle about how many possible mods had to be answered, I made a quick python program:
    No it doesn't.

    There's requirements, there's (wretched) design, there's (brain-dead) implementation, there's (predictably unhappy) day-to-day service delivery, and finally there's Supremely Cretinous Silver Bullet.

    Similarly, there's math(s) and then there's counting.

    Counting is inelegant. Symbols suffice.
  • KT 2009-04-24 16:19
    Hulser:
    Alexander:
    I don't consider this a WTF. There is probably only a very small number of sequences valid (in the sense of "You are still allowed to fly the A/C afterwards"). And the rules to determine the valid sequences are probably somewhat complicated. Thus a field validation would be a disatrous big piece of code with rules, exceptions, exceptions of the exceptions, ...
    So it's perfectly reasonable to outsource the real field validation to the most effective device to do this (the human brain of somebody understanding the A/C maintenance process) and to cache the results of this validation in a list.


    To those people who are suggesting that the design is intended to restrict the options to valid combinations, I think you missed something in the first sentence of the post. The guy was hired to implement an way to "automatically add mods". If the business process was that some person reviewed the new combination to make sure it was valid, they wouldn't be adding a feature to automatically add any new user-entered combination to the look-up table.


    Of course you are right. The story presented the table as the WTF, not the requirement. TRWTF is some unholy combination of the two.

    ingenium?
  • RobFreundlich 2009-04-24 16:42
    Code Dependent:
    RobFreundlich:
    A guy is sitting in a bar, having a drink or two. Every once in a while, someone will call out a number, and the patrons will laugh. He gets more and more confused, until someone calls out "37", and the patrons go absolutely nuts - rolling on the floor with laughter. So he grabs one of the waiters.

    Guy: "Uh, excuse me, I'm confused. Every once in a while, someone calls out a number and the crowd laughs. What's going on?"

    Waiter: "Oh, those are the regulars. They've told the same jokes and stories so many times, they decided to give them all numbers. So now instead of telling the joke, they just call out the number."

    Guy: "Cool! But what about the last one? Someone called out 37 and everyone laughed much, much harder than usual."

    Waiter: "Oh, that's because they'd never heard that one before."
    Guy: "Reckon I could try it?"

    Waiter: "Sure, go ahead. 103 is a funny one."

    Guy: "103!" (room gets very quiet)

    Guy: "What happened? Nobody laughed."

    Waiter: "Some people just don't know how to tell a joke."


    Nice! Here's another variant I've heard. After the original conversation, we get:

    Some Patron: "52!"

    Crowd: jeers and catcalls

    Guy: "What was that all about?"

    Waiter: "Oh, that's Smith. He really ought to give up on that one - he can never quite handle the Swedish accent."
  • anon 2009-04-24 16:56
    pink_fairy:
    anonymous :
    So the puzzle about how many possible mods had to be answered, I made a quick python program:
    No it doesn't.

    There's requirements, there's (wretched) design, there's (brain-dead) implementation, there's (predictably unhappy) day-to-day service delivery, and finally there's Supremely Cretinous Silver Bullet.

    Similarly, there's math(s) and then there's counting.

    Counting is inelegant. Symbols suffice.

    Except of course when you consider all symbols given so far were plain wrong guesses about what the number is, no, it is not 2^45 and it is definitely not 45! It was definitely not the silly sum of combinations someone posted...

    What I shown you was math translated to a python program, it was not 'counting'.

    Want symbols? The result for N=45 is f(45, 0,0) where:
    {
    f(0, x, 0) = 1
    f(0, x, 1) = 0

    f(i, 1, 1) = f(i-1, 1,1) + f(i-1, 1,0)
    f(i, 1, 0) = f(i-1, 0,0) + f(i-1, 1,0)
    f(i, 0, 0) = f(i-1, 1,0) + f(i-1, 0,0)
    }

    regards.

  • Cheong 2009-04-25 02:31
    Think about it... it just make sense.

    The only entries that exist in the table are that entries that actually be used... that means if somehow certain technicans skipped one of the steps that's actually be required, he would not be able to enter it here.

    Only that it there should be function that used to check the missing steps...... :P
  • beerful 2009-04-25 05:29
    The fact that anybody working on that system can see it as 'workable' makes me feel nauseous
  • Anonymous 2009-04-25 15:54
    Actually, all calculation methods so far are wrong.

    If anybody wants the real result, in a symbolic way then take this matrix:

    [ 2 0 1 ]
    [ 1 1 0 ]
    [ 1 1 0 ]

    Raise the matrix to the 45th power (K=45) and the count will be in the top left of the result matrix.

    I.E: If K=1 Then there are two results: 1 and [empty] . Do the above procedure and you get 2.

    For K=2 the result is 5: (empty); 1 ; 2; 1,2 ; 1-2; And the thing works.

    For K=3, the result is 13:

    (empty)
    1
    1,2
    1-2
    1,2,3
    1-2,3
    1,2-3
    1-3
    1,3
    2
    2,3
    2-3
    3

    The math behind is a long story and I don't think you guys are too interested in it.

  • Joe 2009-04-26 16:06
    Dr. Evil:
    Jack:
    rong1982:
    搬家搬家 搬家公司在職進修 婚紗 新娘秘書 汽車旅館 彩妝造型 新娘秘書 票貼 室內設計 室內設計 外遇 抓姦 應收帳款 徵信 徵信社 外遇 徵信 徵信社 外遇 植牙 牙齒矯正 坐月子 宜蘭民宿 婚禮佈置 宜蘭民宿推薦 催眠 派報 太陽能熱水器 Shade sail nike shoes 關鍵字廣告 租屋 搬家 搬家 買房子 花蓮民宿 花蓮民宿 花店 租房子 xo醬 房屋貸款 搬家公司 減肥 減重 床墊 創業加盟 團體服 學英文 英文 補習班 勞工體檢 資源回收 生日禮物 團體服 團體制服 班服 塑膠 日立家電 飾品批發 MBA 在职研究生 在职博士 电动隔膜泵 自吸泵 化工泵 离心泵 磁力泵 螺杆泵 水泵 隔膜泵 气动隔膜泵 婚禮佈置 婚禮佈置 婚禮佈置 酒店經紀 酒店經紀 班服配件 團體服配件 團體服 班服 團體服 班服 團體


    Ok...wtf is a shade sail?


    So out of all that, you choose to question Shade sail? I am more curious about "Dr. diaphragm self-priming pump centrifugal chemical pumps."


    Also what about "diaphragm pumps screw arranged marriage"?
  • # 2009-04-26 21:41
    3 692 890 883 188 542 000 000
  • raddad 2009-04-27 04:45
    emurphy:
    ideot - that's me:
    jimlangrunner:
    Code Dependent:
    What we need on TDWTF is a similar method of selecting from a table of all possible comments. We could just enter a number and it would select the comment and insert it for us.

    Of course, we all know what the first entry in the table would be...

    What would that be? Does it have anything to do with Irish Girl?

    And a wooden table?


    Hot.


    ...and a turkey baster
  • Cantabrigian 2009-04-27 06:02
    Bappi:
    John Winters:
    Even more than 2^45, because there are different ways of entering the same combination. The reasoning above only considers cases where all the steps are entered separately, but if for instance we had:

    1,2,3,4,5,6

    then the same combination could be entered as:

    1-2,3,4,5,6
    1-3,4,5,6
    1-4,5,6
    1-5,6
    1-2,3-4,5,6
    1-2,3-4,5-6
    1-2,3,4,5-6

    etc, etc...

    And each of these needs its own row in the table. The total number would be quite a lot more than 2^45.

    No, it wouldn't. You're forgetting that this is an in-house, custom development, and that if you want records added to the table, you have to ask someone to do it for you. The reply, for each of the combinations you list, would be to "just type 1-6."


    Ah, I think I can help out there. What we need is an extra table to map the bad combinations to their correct versions.
  • Cbuttius 2009-04-29 08:54
    Parsing those strings was part of the job of the first C++ class I ever wrote back in 1993
  • julia 2009-05-20 00:57
    Populus:
    amischiefr:
    John Whittet:
    Wait, that table contains every possible permutation of mods? *facepalm*

    Hopefully this is because when it was first developed there were strict Ugg boots on what series of mods were available so as to restrict certain combinations. Hopefully...


    Exactly ... this is more or less the right solution if only certain sequences of mods are permitted.


    Only if the table also included the uggs, employee ID, and date of approval. If this is in fact a system to prevent unapproved mods then you need to be able to audit it. My money's on the WTF.
  • Ichneumon 2010-02-26 17:37
    Jay:
    Given that, the correct total count is 2^45. Each of the forty-five numbers may or may not appear, but the order is fixed.

    Close but not quite. I'd say 2^45-1, based on the assumption that no one's going to log the maintenance action corresponding to "I didn't do a damned thing, I skipped every one of the 45 possible steps".