• theamoeba (unregistered) in reply to Populus
    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.

  • (cs) in reply to Jay

    [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."

  • (cs) in reply to RobFreundlich
    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."

  • (cs)
    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 (unregistered) in reply to cod3_complete
    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 (unregistered)

    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 (unregistered) in reply to Pedant

    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

  • (cs) in reply to anonymous
    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 (unregistered) in reply to Hulser
    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?

  • (cs) in reply to Code Dependent
    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 (unregistered) in reply to pink_fairy
    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 (unregistered) in reply to way2trivial

    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

  • (cs)

    The fact that anybody working on that system can see it as 'workable' makes me feel nauseous

  • Anonymous (unregistered)

    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 (unregistered) in reply to Dr. Evil
    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"?

  • # (unregistered) in reply to Joe

    3 692 890 883 188 542 000 000

  • raddad (unregistered) in reply to emurphy
    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

  • (cs) in reply to Bappi
    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 (unregistered)

    Parsing those strings was part of the job of the first C++ class I ever wrote back in 1993

  • Ichneumon (unregistered) in reply to Jay
    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".

Leave a comment on “The Mod Out System”

Log In or post as a guest

Replying to comment #:

« Return to Article