• (cs) in reply to jvancil
    jvancil:
    Bus Raker:
    Jake Vinson:

    Alex will be back tomorrow with a new WTF. For today, here's a classic WTF from me!

    The real danger in this is when you get to Cn_IDKEY 214, and the value for CnAdr_LINK is 213 because 213 was null.

    Now half of the stored procedures will work (that actually relate to this table) and the other half that ASSUME the values are the same break.

    Usually you will see different identity seeds for each of the IDs in this sort of design.  Though that is its own WTF, but is a often used means of differentiate between say and invoice number and a customer number is many systems.  (hmm, you could just add 'INV' and 'CUST' to the field!)

    Dude!  Now you got me singing!

    ________________________________________________________________

    Please note that you need to be in the neighborhood of 40 - 50 years old to understand...

     

    Stupid Software!  I was trying to quote the Confunction Junction, What's My Function reference and it cut it off.  I cannot understand why this stupid forum software cannot... oh never mind. <sigh> what's the use???

    "Plastics"

     

  • (cs) in reply to Maarten K
    Anonymous:
    If all table data looks like this, I don't see any problem...
    <font size="5">I</font> don't see any database, either.
  • Chaim79 (unregistered) in reply to haresh kumarski
    haresh kumarski:
    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80

    </snip>

    For those of us who don't speak assembly, can you give us a play-by-play on that code snippit?

     

    (CAPTCHA = stfu... are you trying to say something about my post before I write it?)

  • (cs) in reply to Chaim79

    From what i can tell from Googling, it's the equivalent of calling to a system call on linux, so something like this:
    ; open(filename,O_WRONLY|O_APPEND)
    mov eax, 5
    mov ebx, filename
    mov ecx, 1025
    int 0x80
    mov ebx, eax

    and from what i can tell, (eax, 3) is read a single byte from the keyboard.

  • Anonymous Coward (unregistered) in reply to anonymous
    Anonymous:

    And what happen if you update this "central nervous" table???



    lobotomy
  • (cs) in reply to JernejL

    Anonymous:
    pattern:
    all columns are same
    and the row data is same as the row index

    values in record 494 = 494, same in each column.
     

     

    I'm reasonably sure the question was rhetorical.  -50DKP for even answering this question.

  • (cs) in reply to Volmarias
    Volmarias:
    I make the following proposal: Every poster votes on the WTF quality of TDWTF with one of two smilies.
    1. A smiley wailing and crying and gnashing its teeth

    2. A smiley displaying bored ennui

    It seems that all TDWTFs can be placed into one of these two groups. Either "Internet Jesus wept," or "It's not that bad, really. I can kind of understand it."

    This would just simplify matters considerably.

    • Edit -

    Ok, maybe smiley 3) Cliche would be: TDWTF joke about "Brillant" or "FileNotFound"

    <font size="5">H</font>ow about using the rating box at the top of the page (5 stars).

  • AskHL (unregistered) in reply to Gene Wirchenko

    Maybe the customers were complaining that the thing didn't take up enough disk space and thus couldn't possible work.

    Like that other WTF with the delay :)

  • (cs) in reply to Maurits
    Anonymous:
    Mikademus:
    Redundancy is good


    Redundancy is good
    Redundancy is good
    Redundancy is good

    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    All work and no play makes Jack a dull boy
    (etc. ad astra...)


    void** RedundantDatabaseQuery(char* query){ /* Redundancy is good! */
        void** redundantResult;
        *(redundantResult) = DatabaseQuery(query);
        *(redundantResult+sizeof(void*)) = DatabaseQuery(query);
        *(redundantResult+2*sizeof(void*)) = DatabaseQuery(query);
        return redundantResult;
    }
  • tux_rocker (unregistered) in reply to Chaim79
    Anonymous:
    haresh kumarski:
    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80

    </snip>

    For those of us who don't speak assembly, can you give us a play-by-play on that code snippit?

     


    It reads one byte from standard input into the variable named va682. This is pretty much the only way of doing that in assembly (well, the people who like letters more than numbers might replace 3 by SYSCALL_READ, 1 by STDIN, etcetera). But the fact that he uses assembly in an application, makes me suspect that the author of this code is a braindead dinosaur.
  • Mig-O (unregistered) in reply to Junior IT Professional

    <quote>I'm reasonably sure the question was rhetorical. -50DKP for even answering this question.

    I would even say this is a FCUKING 50 DKP MINUS!!
    </quote>

  • Woody (unregistered) in reply to Bus Raker
    Bus Raker:

    Usually you will see different identity seeds for each of the IDs in this sort of design.  Though that is its own WTF, but is a often used means of differentiate between say and invoice number and a customer number is many systems.  (hmm, you could just add 'INV' and 'CUST' to the field!)



    I used to work somewhere where the customer support database had done that.  All keys had a string prefix prepended to them to "type" the key.  Twice when I was there they had to add more zeros to the indexes...  when CUST999 got hit, and then when CUST9999 got hit, etc...

    Oh, and the joys of doing sorts on all string data vs. integer?  Wonderful!
  • xris (unregistered) in reply to haresh kumarski
    haresh kumarski:
    This reminds me of a time when I encountered a WTF years and years ago.  I had just hired on to a small startup company when I was given the task of fixing a small defect in the inventory control application.  Imagine my shock and dismay when I came across this little gem:
    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80
    </snip>
    I can't image what the programmer was thinking!!!  Seeing the CnPrAI_LINK column was liking having a LSD flashback where swirling lines of code mingle with burning palm fronds and the smell of scorched flesh...


    i see! they mispelled mov[e] three times! someone needs to read their dos books...
    captcha=gene is an anarachist
  • (cs) in reply to home homine lupus est

    Anonymous:

    <FONT face="Courier New">void printf( char * cad){
      while( cad[] ){
        putch( cad++);
      }
    }
    </FONT>

    ..or even:

    void puts(char * cad){
      while(cad[0]){
        putch(*cad++);
      }
    }
    

    Please, don't use printf for non-const strings...it makes me nervous.

    It also remainds me of the bug I recently introduced:  printf("%lld\n",0); 

  • CJP (unregistered) in reply to Jeff S
    Jeff S:
    ammoQ:
    EV:

    In high-school (at least here in the Netherlands), they teach you to think like that. If I'd answer "duh" on every stupid question they asked me, I never would have made it...
    (Ok, so the results will only come in two days, so I techincally still didn't officially "make it" :P)

    Is there a difference between a simple question during a test in school and a rethoric question in a TDWTF post?



    Is that a rethoric question question? :)


    Yes

    :-)
    Was your question a rhetoric question?
  • (cs) in reply to triso
    triso:
    Volmarias:
    I make the following proposal: Every poster votes on the WTF quality of TDWTF with one of two smilies.
    1) A smiley wailing and crying and gnashing its teeth
    2) A smiley displaying bored ennui
    It seems that all TDWTFs can be placed into one of these two groups. Either "Internet Jesus wept," or "It's not that bad, really. I can kind of understand it."
    This would just simplify matters considerably.
    - Edit -
    Ok, maybe smiley 3) Cliche would be: TDWTF joke about "Brillant" or "FileNotFound"

    <font size="5">H</font>ow about using the rating box at the top of the page (5 stars).

    Are you saying that there is a system in place which is functionally similar, but not exactly what we asked for? What good is that? We don't want your stuff if it doesn't conform exactly to our notions of what is expected. You don't really expect us to *gasp* learn how your product works, do you?
    You will give us the smileys. We spoke to Steve, our tech guy, and he said he could draw up some smileys in a couple of hours, so we expect your product to be fully finished tomorrow.
    Yes, I do realise that it's already 3.15p. Isn't that what you have a development team for?
  • (cs) in reply to Gene Wirchenko

    This design pattern simplifies your backup strategy

  • code (unregistered)

    if its well commented then you wont have any problems

  • ImWoLf (unregistered) in reply to ParkinT
    ParkinT:
    <font size="4">Idiocy++</font>


    Output: OVERFLOW!
  • :D (unregistered) in reply to xris
    Anonymous:
    haresh kumarski:

    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80
    </snip>
    I can't image what the programmer was thinking!!!  Seeing the CnPrAI_LINK column was liking having a LSD flashback where swirling lines of code mingle with burning palm fronds and the smell of scorched flesh...


    i see! they mispelled mov[e] three times! someone needs to read their dos books...

    I really hope you're being sarcastic.

  • Seth (unregistered) in reply to Yo

    No, no, no. It must be 43. I think.

  • Contrarian (unregistered)

    "I fired up our diagramming software"... wtf?

  • Jboss (unregistered) in reply to Anon
    Anonymous:
        I think the real wtf is that Alex hasn't just set up some kind of system for automatically adding these wtf's.  On Sunday night he could type in the paragraph for each day, set the datetime he wanted it to be visible on the web page and be done with it.  It would even work when he's out of town!


    Well fo me the thing is, that even if alex is "out of town" he could still post this "WTFs".. Unles he is at the south pole (i heard they already got WiFi at north pole)...

    I woud like to see what did these tables rly do, because then this "WTF" could be a real WTF. Now it is just a piece of screenshot that could be funny, but doesnt tell much though :(

    -- captched
  • Oli (unregistered) in reply to Gaz

    Anonymous:
    Well... at least if you lost the whole table you could easily recreate it.

     

    That's a pretty good point - why didn't he just do a look up programmatically? No need for a database at all.

  • Coder (unregistered) in reply to haresh kumarski

    I certainly wouldn't mind a little more context here. The only problem I can see, but it could just be that you didn't include it in the snippet, is that the current values of the registers weren't pushed onto the stack or otherwise saved so that they could be later restored. Other than that, the only thing I can see is that this wasn't a an assembly project, so your objection is simply that assembly was used...but given that it was "years and years ago," that would be a major assumption.

  • RichNFamous (unregistered) in reply to Mikademus
    Mikademus:
    Redundancy is good; makes for stable programs. Multiple redundancy is thus better.


    I've always tried to avoid reduncancy, repetition, and tautology.
  • mynab (unregistered) in reply to JernejL
    Anonymous:
    pattern:
    all columns are same
    and the row data is same as the row index

    values in record 494 = 494, same in each column.
     


    The only fact of seriously answering this question is a WTF in itself. I am always amazed to see that some WTF readers are probably good WTF creators themselves!

    mynab
  • Foo Bar (unregistered)

    Yanks eh?

  • Point Less (unregistered) in reply to mynab

    Anonymous:
    Anonymous:
    pattern:
    all columns are same
    and the row data is same as the row index

    values in record 494 = 494, same in each column.
     


    The only fact of seriously answering this question is a WTF in itself. I am always amazed to see that some WTF readers are probably good WTF creators themselves!

    mynab

    Ok, class, let's try a slightly more advanced question:  If Cn_IDKEY == "Pointless" then what would the entire record look like?

    (CAPTCHA is "awesomeness")

  • Geoff (unregistered)
    Jake Vinson:

    CHALLENGE POINT:  Can you guess what values are in record 494?

    With only the first 45 rows to judge, and assuming that the submittor has indeed looked at the rest of the table, there is an obvious assumption. However, I'm not completely convinced that anyone is so absolutely stupid as to create a table of multiple synchronized incrementing columns. With that tiny shred of faith in my fellow humankind, I want to believe that somewhere in that table after record 45 the apparent pattern breaks as the data added after this database was redesigned necessitated this mess in some manner.

    Can we get some verification that the obvious is true, thus lowering my opinion of our species yet further?

  • Gaz (unregistered) in reply to Geoff

    Mabey we are looking are the worlds first advanced enterprize 1:1:1:1... integer look up table.
    What'll they think of next?

  • (cs) in reply to RichNFamous
    Anonymous:
    Mikademus:
    Redundancy is good; makes for stable programs. Multiple redundancy is thus better.


    I've always tried to avoid reduncancy, repetition, and tautology.


    Yes.  Reduncancy is bad.  I worked with a bloke called Duncan once, and he was a knob.

    Simon
  • anonymous (unregistered) in reply to JernejL
    Anonymous:
    pattern:
    all columns are same
    and the row data is same as the row index

    values in record 494 = 494, same in each column.
     


    My God, you're even dumber than the guy who wrote this. The question was obviously rhetorical. I bet you think you're mighty smart for identifying the "pattern" too...
  • Tei (unregistered) in reply to tufty
    tufty:
    Anonymous:
    Mikademus:
    Redundancy is good; makes for stable programs. Multiple redundancy is thus better.


    I've always tried to avoid reduncancy, repetition, and tautology.


    Yes.  Reduncancy is bad.  I worked with a bloke called Duncan once, and he was a knob.

    Simon


    DRY: dont repeat yourself

    This is fun, because on the last DUNE books, Duncan Idaho whas the character cloned and cloned again to server the emperator worm.

    --Tei

  • (cs) in reply to xris
    Coughptcha:
    Anonymous:

    captcha=gene is an anarachist
    anarchist?
    antichrist?
    arachnid?
    architect?
    WTF?
    Obviously he was trying to type Arachnid, which is why he spelt it wrong. You try working with only eight fingers (what do you hit the space bar with?)
  • aol kiddie (unregistered) in reply to Epimetheus
    Anonymous:
    Anonymous:
    > Can you guess what values are in record 494?

    42 has to be the answer!


    I agree!

    me 2!

  • WHO WANTS TO KNOW? (unregistered) in reply to graywh

    graywh:
    marvin_rabbit:

    Ok, Show of hands everybody!  Who wants to hire Steve?


    no digg ... i mean, ... i wouldn't hire him

    he can't even spell "brillant"

    GREAT!  GLAD TO HEAR IT!  I mean you would try to get ME hopping around for NOTHING!

    And HEY, I wrote something not FAR different from this(but it had only TWO such columns) to allow for versioning of addresses, and saving space?trouble.  Another I saw, that I didn't design, had it for handling versions of products.  BTW THAT application had records that said (1,1  2,2  3,3  4,4)!  Most products USUALLY have only one variant.  If THE fourth product had two versions, it might continue(5,4  6,5  7,6  8,7 etc...)  Of course, the NINTH product could have a HUNDRED versions, or even 10,000!  Those are only the two I was DIRECTLY involved with at some point in the past year.  It isn't THAT unusual.  I guess the REAL WTF is why don't YOU know that?

    Steve

  • (cs) in reply to anonymous
    Anonymous:

    And what happen if you update this "central nervous" table???

     

    multiple spasms and a lifelong curse of the hiccups!!

  • (cs) in reply to Geoff
    Anonymous:
    Jake Vinson:

    CHALLENGE POINT:  Can you guess what values are in record 494?

    With only the first 45 rows to judge, and assuming that the submittor has indeed looked at the rest of the table, there is an obvious assumption. However, I'm not completely convinced that anyone is so absolutely stupid as to create a table of multiple synchronized incrementing columns. With that tiny shred of faith in my fellow humankind, I want to believe that somewhere in that table after record 45 the apparent pattern breaks as the data added after this database was redesigned necessitated this mess in some manner.

    Can we get some verification that the obvious is true, thus lowering my opinion of our species yet further?

     

    Well your assumption may be correct but you need to hold a meeting presenting your assumption, then you need to meet with all the dumbassed business anaylsts to see if this meets the requirements of the client. While in the meantime developing all the required documentation about your assumption. To later have the business anaylst come back to you and tell you that your assumption does not meet the requirements, because the client has it's head up their anas and won't be able to tell you yea or nay. Only in the end to have your assumptions be correct and the business anaylst just cost the client 160 million dollars and they have yet to receive the final working product. Umm ... wait that would the Assenture way!! To answer you question NO!!!

  • WHO WANTS TO KNOW? (unregistered) in reply to mrsticks1982

    Better YET, can we find out if s/he even LOOKED at the code?  Were there options that the customer might have had and wanted, or is considering, that might be relevant?  Was the OTHER person asked why s/he did this?  As stupid as it may appear at first glance,. they may have actually considered things that YOU are not!

    It is like the line "if ($a==1) {$b=1;} etc..."  where $b is used in a SQL statement, and $a is passed in a cookie or as a parm and is ALWAYS equal to $b, or using a resister of 100k ohms instead of a coil with the SAME resistance.  The first seems STUPID, until you realize that SQL injection may occur.  The second seems stupid until you realize about inductance.  HECK, I once saw NOPS(do NOTHING) in a program that was running slowly.  They turned out to be VITAL!  Sometimes what is obvious is NOT the correct answer.

    Steve

  • Dan Soderholm (unregistered) in reply to Maurits

    Found on a file server recently:

    /Public/Documents/Redundancy policy.doc.doc

  • Dan Soderholm (unregistered) in reply to Bullet

    Or compression - you could store the entire database in a two-line VB macro. You could fit thousands of databases on a single floppy disk!

  • TheDoom (unregistered) in reply to Foo Bar
    Anonymous:
    Yanks eh?


    You said it dude.

    They're everywhere...
  • (cs)

    The real wtf is that it is NOT RECORD 494, it is ROW 494. Clue: if you missed the prose, the screenshot has the word TABLE in the titlebar.

    Don't any of you know what databases are???

    By the way, I am burning in the suspense - could somebody puhleeze tel me what IS in row 494?

  • An apprentice (unregistered) in reply to Erin
    Anonymous:
    CHALLENGE POINT:  Can you guess what values are in record 494?

    Possible results: Yes, No, Maybe, Null.

    All at the same time of course, comma separated.

    Either that, or captcha: null is a hint...

  • WHO WANTS TO KNOW? (unregistered) in reply to Cooper

    Cooper:
    The real wtf is that it is NOT RECORD 494, it is ROW 494. Clue: if you missed the prose, the screenshot has the word TABLE in the titlebar.

    Don't any of you know what databases are???

    By the way, I am burning in the suspense - could somebody puhleeze tel me what IS in row 494?

    NAW!  The ONLY databases I worked with are Mysql and Mssql and msql and Access

    and Informix, oracle,db2,teradata, postgres,postgressql, netezza,sybase,ingres, and a few others.

    Actually, record doesn't necessarily mean it is non database.  So I use them interchangeably.  Who cares.  I sometimes use field instead of column, also. 

    Frankly, it doesn't matter here if it is a table, or a truly flat file.

    Steve 

  • (cs) in reply to tux_rocker
    Anonymous:
    Anonymous:
    haresh kumarski:
    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80

    </snip>

    For those of us who don't speak assembly, can you give us a play-by-play on that code snippit?

     


    It reads one byte from standard input into the variable named va682. This is pretty much the only way of doing that in assembly (well, the people who like letters more than numbers might replace 3 by SYSCALL_READ, 1 by STDIN, etcetera). But the fact that he uses assembly in an application, makes me suspect that the author of this code is a braindead dinosaur.

    Actually, if I'm reading it correctly, it reads one byte from standard output.

  • tux_rocker (unregistered) in reply to iwpg
    iwpg:
    Anonymous:

    It reads one byte from standard input into the variable named va682. This is pretty much the only way of doing that in assembly (well, the people who like letters more than numbers might replace 3 by SYSCALL_READ, 1 by STDIN, etcetera). But the fact that he uses assembly in an application, makes me suspect that the author of this code is a braindead dinosaur.

    Actually, if I'm reading it correctly, it reads one byte from standard output.


    /me sees the light :)
  • code (unregistered)

    Oooooh, I take my yesterday's comment about the reading the code back! Sorry, now I'm enlightened! :)

  • nobody (unregistered) in reply to xris
    Anonymous:
    haresh kumarski:
    This reminds me of a time when I encountered a WTF years and years ago.  I had just hired on to a small startup company when I was given the task of fixing a small defect in the inventory control application.  Imagine my shock and dismay when I came across this little gem:
    <snip>
    mov    eax, 3           
    mov edx, 1
    mov ecx, va682
    mov ebx, 1
    int 0x80
    </snip>
    I can't image what the programmer was thinking!!!  Seeing the CnPrAI_LINK column was liking having a LSD flashback where swirling lines of code mingle with burning palm fronds and the smell of scorched flesh...


    i see! they mispelled mov[e] three times! someone needs to read their dos books...
    captcha=gene is an anarachist

    Ahh well... four times actually. And if memory serves me dos always spelt move as r-e-n-a-m-e. I think I know who really needs to brush up on their dos skillz :-)

Leave a comment on “Classic WTF - Pointless Pointless Pointless Pointless Pointless Pointless Pointless”

Log In or post as a guest

Replying to comment #:

« Return to Article