There's Always Room to Expand

« Return to Article
  • Albertini Albertino 2012-08-16 08:02
    In that vein, then - coming soon, TDWTF...2.
  • Zeroth? or 'A'th? 2012-08-16 08:04
    there's always room for expansion. If you need another column, just add a new one, adding one to the highest 'f column'.
    Not so fast hotshot. What happens when you run out of numbers? Should have at least used hex, if not the entire alphabet, to buy more time.
  • Richard 2012-08-16 08:10
    Hey, don't knock it, Alex does the same thing here with comments. Notice how each comment gets an incrementing number? The code looks something like this:

    update wtf.article set c1440513 = 'In my country...' where article=1961720010330;

    (Of course I'm assuming each comment is another column in the article row. That way you can fetch them all at once instead of having to loop through SELECT results.)
  • Some Jerk 2012-08-16 08:13
    FINALLY... a REAL WTF! It has been days since I had a good vomit!

    I wish I could see the entire workflow that made it necessary to update a single row, one column at a time :p. I am guessing it was tied to the onchange event on an html form, causing an ajax post every time a form element value was modified. Would be interesting to see if this "ENGINEER" had bothered to sanitize the input.
  • Codd 2012-08-16 08:14
    update tmp set f7 ='Somestreet' where f0=1961720010330;
    update tmp set f8 ='123' where f0=1961720010330;
    update tmp set f9 ='1001' where f0=1961720010330;
    update tmp set f10 ='AA' where f0=1961720010330;
    update tmp set f11 ='SOME CITY' where f0=1961720010330;
    Obviously this is a data entry screen where the user is filling out a form. You want to save each value as they enter it instead of waiting for the end and possibly losing everything due to a power failure or whatever.
  • Some Jerk 2012-08-16 08:14
    Richard:
    Hey, don't knock it, Alex does the same thing here with comments. Notice how each comment gets an incrementing number? The code looks something like this:

    update wtf.article set c1440513 = 'In my country...' where article=1961720010330;

    (Of course I'm assuming each comment is another column in the article row. That way you can fetch them all at once instead of having to loop through SELECT results.)


    hey... don't pick on Alex. If he wants to go to huge lengths just to wtf us with HTML comments... then that just shows his level of committment to fuckery!
  • Bobby 2012-08-16 08:16
    Well at least if there's an SQL injection hole (and there most likely is) you don't have to worry about the hacker figuring out your data structure when he downloads your database.
  • Some Jerk 2012-08-16 08:16
    Codd:
    update tmp set f7 ='Somestreet' where f0=1961720010330;
    update tmp set f8 ='123' where f0=1961720010330;
    update tmp set f9 ='1001' where f0=1961720010330;
    update tmp set f10 ='AA' where f0=1961720010330;
    update tmp set f11 ='SOME CITY' where f0=1961720010330;
    Obviously this is a data entry screen where the user is filling out a form. You want to save each value as they enter it instead of waiting for the end and possibly losing everything due to a power failure or whatever.


    yea... because then if there really is a power failure... all the person updating the form has to do to finish up is remember that the ID is 1961720010330, and know where to put it to prepopulate his old data. How hard can that POSSIBLY be?
  • Carl 2012-08-16 08:18
    update tmp set f75 ='' where f0=1961720010330;
    Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?
  • Some Jerk 2012-08-16 08:20
    Carl:
    update tmp set f75 ='' where f0=1961720010330;
    Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?


    NULL
  • Easy 2012-08-16 08:22
    Some Jerk:
    Codd:
    update tmp set f7 ='Somestreet' where f0=1961720010330;
    update tmp set f8 ='123' where f0=1961720010330;
    update tmp set f9 ='1001' where f0=1961720010330;
    update tmp set f10 ='AA' where f0=1961720010330;
    update tmp set f11 ='SOME CITY' where f0=1961720010330;
    Obviously this is a data entry screen where the user is filling out a form. You want to save each value as they enter it instead of waiting for the end and possibly losing everything due to a power failure or whatever.


    yea... because then if there really is a power failure... all the person updating the form has to do to finish up is remember that the ID is 1961720010330, and know where to put it to prepopulate his old data. How hard can that POSSIBLY be?
    You are clearly failing to grasp this design pattern. This can easily be fixed using the following:

    update allvars set f1903 = 1961720010330 where rowname = 'users_last_active_row';
  • jonnyq 2012-08-16 08:52
    This is not a WTF:
    - these are query logs. there may be comments in the code, and this is out of context, so maybe this makes more sense in context
    - Yes, it's a silly "clever" trick someone thought was a good idea at the time when there's like a much better way, but:
    - even the OP admits to clearly knowing which fields were zip codes, even when the fields changed and so on
    - there weren't any maintenance issues. it did its job for as long as it needed to
    - and it got replaced with something more sensible before it became a problem
  • TGV 2012-08-16 08:52
    O man, this is so inefficient. I've already described the db on which I had the pleasure to work: it had a similar design, but had a "vtypeid" which indicated how to interpret the row of data. Obviously, there were vtypeids that overlapped.

    However, it was way more efficient than this one. We had 5 columns, and didn't have to add columns, we just added another row with a different vtypeid and then ... (wait for it) ... joined multiple queries that shared the same source id and timestamp. If the above design made someone vomit, this one will have him slash his wrists (remember: across the arm, not across the wrist).

    That didn't hinder anyone in creating databases with 4, 9 or 13 columns, of course. It did hinder everyone though in writing portable queries.
  • Evoex 2012-08-16 09:03
    I like the Dutch word "bestaand" in there, which means "existing". As a string...
  • Some Jerk 2012-08-16 09:22
    This reminds me of a company standard from a former job, to add an extra 10 parameters to every asp/vbscript function just in case they will be used later. As a result, you would have:

    function chokeYourself(secondsToDeath, numberOfHands, parameter3, parameter4, parameter5, parameter6, parameter7, parameter8, parameter9, parameter10, parameter11, parameter12)
    ... code
    end function

    then, if you decided you wanted to specify the number of spectators later, you could simply substituted the name "parameter3" for "numberOfSpectators" without breaking any of the function calls. The vbscript (obviously) would already be expecting the correct number of parameters, so nothing could possibly go wrong... right?! <YAKKK!>
  • Wonk 2012-08-16 09:41
    jonnyq:
    This is not a WTF:
    - these are query logs. there may be comments in the code, and this is out of context, so maybe this makes more sense in context
    - Yes, it's a silly "clever" trick someone thought was a good idea at the time when there's like a much better way, but:
    - even the OP admits to clearly knowing which fields were zip codes, even when the fields changed and so on
    - there weren't any maintenance issues. it did its job for as long as it needed to
    - and it got replaced with something more sensible before it became a problem


    oh, how I miss TopC0der.
  • Another Jerk 2012-08-16 09:45
    I'm always wanting to use the most cryptic parameter names possible to that nobody will be able to follow what I have done.
  • Some Jerk 2012-08-16 09:51
    Another Jerk:
    I'm always wanting to use the most cryptic parameter names possible to that nobody will be able to follow what I have done.


    a design pattern something like this?:

    public class enum1
    {
    public enum VOID
    {
    ZERO = 2
    ONE = 0
    TWO = 1
    }
    public int StringProperty1 {get; set;}
    public string IntProperty2 {get; set;}
    public VOID Event( string boolValue )
    {
    if( boolValue == "ZERO" )
    return VOID.ONE;
    else
    throw new NullReferenceException( "YOU SUCK!" );
    }
    }
  • Callin 2012-08-16 10:25
    There's always room for another thousand columns. As long as you can store the data somehow, somewhere, you're good.
  • ¯\(°_o)/¯ I DUNNO LOL 2012-08-16 10:42
    TRWTF is not knowing the difference between a database and a spreadsheet. Or PHP.
  • Double Click 2012-08-16 10:45
    I am not sure If this is WTF or not. I just happen to stumble on it.

    Try double click on the code in the article. And see what happens.

    BTW I am using FF14 on Win7 64bit
  • Another 2012-08-16 11:03
    Some Jerk:
    This reminds me of a company standard from a former job, to add an extra 10 parameters to every asp/vbscript function just in case they will be used later. As a result, you would have:

    function chokeYourself(secondsToDeath, numberOfHands, parameter3, parameter4, parameter5, parameter6, parameter7, parameter8, parameter9, parameter10, parameter11, parameter12)
    ... code
    end function

    then, if you decided you wanted to specify the number of spectators later, you could simply substituted the name "parameter3" for "numberOfSpectators" without breaking any of the function calls. The vbscript (obviously) would already be expecting the correct number of parameters, so nothing could possibly go wrong... right?! <YAKKK!>
    And this, ladies and gentlemen, is why the gods gave us perl.

    sub chokeYourself {
    my ($secondsToDeath, $numberOfHands) = @_;
    ...
    }

    Caller passes extra params? No problem. Update sub to receive $numberOfSpectators, but some callers don't know? No problem again. Just make sure the sub's code gracefully deals with a null $numberOfSpectators.
  • Neil 2012-08-16 11:05
    Double Click:
    I am not sure If this is WTF or not. I just happen to stumble on it.

    Try double click on the code in the article. And see what happens.

    BTW I am using FF14 on Win7 64bit
    Seems to work better on the syntax highlighter demo page, the textarea replaces the code block. Dunno what the point is though, the manual seems to be incomplete.
  • Kivi 2012-08-16 11:09
    Proven fact: if the database doesn't want to process your request, you can trick it by hiding the request among a bunch of other requests.

    In other words, this whole block of code is just a ruse to get the database to do this:
    update tmp set f76 ='p' where f0=1961520010330;
  • Kivi 2012-08-16 11:11
    Carl:
    update tmp set f75 ='' where f0=1961720010330;
    Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?

    Shh, it's part of the ruse!
  • snoofle 2012-08-16 11:12
    ¯\(°_o)/¯ I DUNNO LOL:
    TRWTF is not knowing the difference between a database and a spreadsheet. Or PHP.
    Wait, there is a difference?
  • Man in pain 2012-08-16 12:06
    I invite all interested parties to look at an ExpressionEngine database.

    After you stop screaming, you may take your meds and go back to your life, knowing that you don't have to deal with it.
  • Dulton 2012-08-16 12:18
    Yup, it's a dutch system alright. The postal codes are stored in the dutch "9999 ZZ" format.
  • dogmatic 2012-08-16 12:21
    Some Jerk:


    yea... because then if there really is a power failure... all the person updating the form has to do to finish up is remember that the ID is 1961720010330, and know where to put it to prepopulate his old data. How hard can that POSSIBLY be?


    You could easily restore the user's state by reading a cookie or having them login when they return.
  • cellocgw 2012-08-16 12:23
    Some Jerk:
    Carl:
    update tmp set f75 ='' where f0=1961720010330;
    Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?


    NULL

    FileNotFound, of course
  • TGV 2012-08-16 13:10
    snoofle:
    ¯\(°_o)/¯ I DUNNO LOL:
    TRWTF is not knowing the difference between a database and a spreadsheet. Or PHP.
    Wait, there is a difference?

    OMG, you didn't go to college, did you? That's where you learn the difference between column names in a database, like f1, f2, etc., and those in spreadsheets: A, B, C. Duh.
  • Some Jerk 2012-08-16 13:20
    TGV:

    OMG, you didn't go to college, did you? That's where you learn the difference between column names in a database, like f1, f2, etc., and those in spreadsheets: A, B, C. Duh.
    You are either joking or totally daft.
  • Gurth 2012-08-16 13:40
    Another:
    And this, ladies and gentlemen, is why the gods gave us perl.

    sub chokeYourself {
    my ($secondsToDeath, $numberOfHands) = @_;
    ...
    }

    Caller passes extra params? No problem. Update sub to receive $numberOfSpectators, but some callers don't know? No problem again. Just make sure the sub's code gracefully deals with a null $numberOfSpectators.

    Even Visual Basic can do that:
    Function chokeYourself(secondsToDeath As Long, numberOfHands As Byte, Optional numberOfSpectators As Double = 0)
    

    End Function
  • Some Jerk 2012-08-16 13:43
    it is vbscript

    optional params myArg
  • the beholder 2012-08-16 13:46
    Some Jerk:
    it is vbscript

    optional params myArg
    A tip for you: when whatever is being said in a comment is true, it doesn't need to be corrected.
  • Some Jerk 2012-08-16 13:49
    and I might add that this actually resulted in a lot of silent errors in their app. They had several cases where they did not remember that certain regions of code were calling a method that was modified. At times, the new parameter was relavent information that was supposed to be deposited into a field on their new database (as they moved from foxpro to SQL Server). They didn't get any errors, so they assumed everything was functioning correctly... not realizing all the while that certain billing items were not associated with the client to whom the bill was to be sent.

    There is a good reason to invalidate calls to functions that preceed said modifications... and unflatulantly they learned this lesson too late.
  • Some Jerk 2012-08-16 14:05
    the beholder:

    A tip for you: when whatever is being said in a comment is true, it doesn't need to be corrected.


    that is... errr... an interesting observation... by some standard :p
  • herby 2012-08-16 14:35
    Now for something a bit off topic...

    Is is just me, or is anyone else getting script exceptions (Java coloring or some such) when the current WTF loads. This just started happening for me a few days ago. It seems to correlate with the code lines displayed. Hitting 'OK' (many times) seems to work around it.

    We now return you to the standard WTF commenting drivel that we all wish we could find "FILE NOT FOUND" in a binary return set. Hi Paula Bean, etc...
  • Silent D 2012-08-16 14:55
    There must be some NOT NULL constraints that mess up this beautiful design pattern, requiring the INSERT to address three columns at once. That clearly needs to be refactored.

    Could be worse, though, at least the database isn't based on the EAV abomination.
  • Coyne 2012-08-16 16:19
    The first line suggests that there's always room to add another row, as well as adding another column.

    Looking at the ID...


    cust tbl order#
    1961 5 20010330 i.e., the address row for the order
    1961 7 20010330 i.e., the shipping address for the order
    1961 8 20010330 i.e., the credit card info for the order
    etc.


    Which makes this truly a 2nd order WTF, which is a whole new level of WTF.

    Just think, we cold have rows 1961020010330 thru 196190010330; and then 1961A20010330 thru 1961Z20010330; and then 1961a20010330 thru 1961z20010330; and then rows like 1961!20010330, 1961$20010330, 1961_20010330, and 1961{20010330. We could even have rows containing an 0x07 character in that position.

    Why, we could have lots of rows!
  • dolor 2012-08-16 16:36
    [quote user="Carl"][quote]update tmp set f75 ='' where f0=1961720010330;[/quote]Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?[/quote]

    haha - Carl thought for himself, let me say something that everyone will think it's cool, so that I clearly show that I'm mocking the original coder just like they're all obviously doing - even though I have no clue why everyone is laughing, but I will laugh with them so that they don't think I stupid - ok, let me say this [SARCASTICALLY, OUT LOUD]:

    "update tmp set f75 ='' where f0=1961720010330;[/quote]Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?"

    What Carl didn't realize was that he just showed us all how he doesn't understand even the basic SQL syntax or how values are stored in table. It has to be set to something - what? am I supposed to skip it, only because you don't like empty strings, and somehow remember that it's really blank while it's still equal some value, only because you don't like empty strings?

    The NULL guy did try to help Carl understand, but we cannot assume that the field was nullable; so, I still stand behind this: Carl, shut the fuck up, you have a lot to learn.
  • dolor 2012-08-16 16:41
    herby:
    Now for something a bit off topic...

    Is is just me, or is anyone else getting script exceptions (Java coloring or some such) when the current WTF loads. This just started happening for me a few days ago. It seems to correlate with the code lines displayed. Hitting 'OK' (many times) seems to work around it.

    We now return you to the standard WTF commenting drivel that we all wish we could find "FILE NOT FOUND" in a binary return set. Hi Paula Bean, etc...


    It's just you. IE user? Now, THAT'S a real WTF today.
  • Agention 2012-08-16 17:18
    Another:
    And this, ladies and gentlemen, is why the gods gave us perl.

    sub chokeYourself {
    my ($secondsToDeath, $numberOfHands) = @_;
    ...
    }

    Caller passes extra params? No problem. Update sub to receive $numberOfSpectators, but some callers don't know? No problem again. Just make sure the sub's code gracefully deals with a null $numberOfSpectators.


    undef, you insensitive clod!
  • Carl 2012-08-16 17:58
    dolor:
    ...rant...
    Wow, looks like I got you so pissed that you forgot to use the preview button!
  • Some Jerk 2012-08-16 19:14
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. There are no functional limitations that render an inferior product... no possiblity of brain damage... and no other reason why using IE would cause a specific reaction or judgement toward any comment or artical. You may as well well assume that a specific response was the result of somebody wearing blue wranglers that were a bit too loose around the waist, as to assume that the usage of Internet Explorer has some impact on exactly what text appears beneath their names. Therefore, I must say that the intelligence displayed in producing this posting rivals, at best, that of my 7 year old daughter, who can also type arbitrary responses to specific comments without spelling errors.
  • scooby509 2012-08-16 20:37
    This isn't a WTF. It's worse.

    It's an EAV, which is a horrible, horrible idea, but it is thoroughly documented horribleness that anyone who has worked with databases for a while has seen.

    I say thoroughly, not well, because the majority of writing on EAV is total waffle-think that will spend twenty thousand words on metadata and clouds without ever touching on what anything is supposed to mean or why the hell you'd want to rewrite your DBMS in the first place.

    Why do people do it? Because just as people try to optimize without knowing what they're optimizing or any proof that they need to, people also try to implement features without knowing what features they need or having any indication that the features are wanted.

    EAV is the ultimate example of that: instead of nailing down the business logic, you just throw your hands in the air and say, "fuck it, let the users make it up as they go along."
  • scooby509 2012-08-16 20:52
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.
  • scooby509 2012-08-16 20:57
    dolor:
    Carl, shut the fuck up, you have a lot to learn.


    But not from the guy who can't figure out how to post a comment correctly.
  • Some Jerk 2012-08-16 21:54
    scooby509:
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.


    I use FF, Safari and IE interchangably... just whatever window happens to come up. I suppose that (in your ignorance) you were blissful enough to lay downa comment that had absolutely no substance whatsoever.

    name 1 way that Internet Explorer is either not free or actually broken. Plenty (meaning 2 or 3) people commenting on it... but I PERSONALLY think that you simply dont like that fact that IE is owned by a multi-billion dollar company and is not open source. I have worked on websites (for a living) for 13 years. All I have seen is DIFFERENT behaviors. I haven't seen any proof that lead me to believe that any browser is better than another... in fact... I have always been able to replicate all functionalities in all browsers.

    I suppose this goes to show... if anything works in one browser and not another (at least, recent browser, as all of the main ones are available for free) ... that is a WTF on the MORON who wrote it. you idiots that think one browser is in some way better than another are obviously too lazy or incompetant to learn how to do your jobs, and may as well shut the hell up... because there isn't a damned thing that can be done with one browser and I can't do with every browser used by at least 5% of the population
  • Friedrice the Great 2012-08-16 22:24
    Some Jerk:
    scooby509:
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.


    I use FF, Safari and IE interchangably... just whatever window happens to come up. I suppose that (in your ignorance) you were blissful enough to lay downa comment that had absolutely no substance whatsoever.

    name 1 way that Internet Explorer is either not free or actually broken.


    1. You have to buy Windows to get Internet Explorer. Therefore it is not free.

    2. Any version of IE<9 is broken. And at least the version of IE you use seemed to have problems with the site.

    Q.E.D.
  • Some Jerk 2012-08-16 22:36
    Friedrice the Great:
    Some Jerk:
    scooby509:
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.


    I use FF, Safari and IE interchangably... just whatever window happens to come up. I suppose that (in your ignorance) you were blissful enough to lay downa comment that had absolutely no substance whatsoever.

    name 1 way that Internet Explorer is either not free or actually broken.


    1. You have to buy Windows to get Internet Explorer. Therefore it is not free.

    2. Any version of IE<9 is broken. And at least the version of IE you use seemed to have problems with the site.

    Q.E.D.


    1. no, you can download IE for free from any Nix version... it is linked in fedora. Thus ... IT IS FREE.

    2. BROKEN... in what way? you have offered no actual defect... only a foolish opinion.
  • Ralph 2012-08-16 22:40
    Some Jerk:
    I use FF, Safari and IE interchangably... just whatever window happens to come up.
    happens? As in, you are not in control of your computer? -99 points right there buddy.
    Some Jerk:
    I have worked on websites (for a living) for 13 years. All I have seen is DIFFERENT behaviors. I haven't seen any proof that lead me to believe that any browser is better than another... in fact... I have always been able to replicate all functionalities in all browsers.
    I'll see your 13 years and raise you another 20 (not websites that whole time of course, but computers) and as a security professional I'd have to admit that IE has virus and malware delivery functionality far superior to any other browser.

    Which is why I immediately assume that anyone using it doesn't know what a browser is, doesn't know they have a choice, doesn't know the first thing about the history and reputation of MS, or just plain doesn't care.
  • Some Jerk 2012-08-16 22:53
    Ralph:
    I'll see your 13 years and raise you another 20 (not websites that whole time of course, but computers) and as a security professional I'd have to admit that IE has virus and malware delivery functionality far superior to any other browser.

    Which is why I immediately assume that anyone using it doesn't know what a browser is, doesn't know they have a choice, doesn't know the first thing about the history and reputation of MS, or just plain doesn't care.


    18 total.. 13 paid... and before I started.. websites were all but text only.

    Actually... the only reason you can vindicate that opion is because Microsoft themselves seeks those exploits and publishes them, and some idiots don't bother to update.

    If you really are as profficient as you claim to be, you will know that netscape nearly crashed three times due to profound security vulnerabilities... and ... hmmm.. wonder here they are now.

    yes... Safari on text only is much more secure. Flash sites are mildly secure and anything that uses Java is slow but mostly safe... as Java has built in security metrics as well. Further still, Safari blows on Windows (it is so slow, I could carry the packets myself from Tokyo faster, 10 bytes at a time) and Mozilla add-on functionality is heavily bugged.

    Moreover, My current OS has been installed since Windows 7 came out for MSDN subscribers (October of 09 I think)... and I use IE as frequently as any other browser.... OS boots in 6 seconds and Visual Studio 2010 takes almost a full second to start up. I use the Internet more than just about anybody, as my primary skill being to develop over the Internet.

    People who get their computers infected over the internet are those who are not careful what they download, install, or do over the internet. I have had my share of spyware, and eliminated it the same day. I don't see this as a defect, because I managed it as easily with any browser. (Trust me... I tried allocating browser usage exclusively and failed)

    No... you are wrong. You are making claims with no basis, and your words speak of ignorance that apparently set in 30 years ago and was never remedied. It is sad... because you might have done a great deal with so much experience... but you obviously formed a bias and never researched what you were supporting
  • peter 2012-08-17 03:05
    Indeedf. Also, the zip code points to some post office box in Amsterdam.
  • pantsman 2012-08-17 04:58
    Would be interesting to know why you think sanitization is necessary... hopefully, they just escaped the input properly.
  • Chuck Lester 2012-08-17 06:29
    jonnyq:
    This is not a WTF:
    - these are query logs. there may be comments in the code, and this is out of context, so maybe this makes more sense in context
    - Yes, it's a silly "clever" trick someone thought was a good idea at the time when there's like a much better way, but:
    - even the OP admits to clearly knowing which fields were zip codes, even when the fields changed and so on
    - there weren't any maintenance issues. it did its job for as long as it needed to
    - and it got replaced with something more sensible before it became a problem


    No amount of code, comments or context info can compensate for a poorly designed data structure. Data belongs to the company, not to the code. Code is likely to be replaced with newer versions, or simply be obsoleted. Data will remain.
  • scooby509 2012-08-17 07:35
    Some Jerk:
    scooby509:
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.


    I use FF, Safari and IE interchangably... just whatever window happens to come up. I suppose that (in your ignorance) you were blissful enough to lay downa comment that had absolutely no substance whatsoever.


    You really shouldn't post while drinking.

    name 1 way that Internet Explorer is either not free or actually broken. Plenty (meaning 2 or 3) people commenting on it... but I PERSONALLY think that you simply dont like that fact that IE is owned by a multi-billion dollar company and is not open source. I have worked on websites (for a living) for 13 years. All I have seen is DIFFERENT behaviors. I haven't seen any proof that lead me to believe that any browser is better than another... in fact... I have always been able to replicate all functionalities in all browsers.


    I'm a frequent MS defender, because many criticisms of them are moronic, but it's always fair game to criticize their software since you can do so objectively. On the topic of whether IE is "free", I've never had a chance to poke around IE's source code, but since you're a web dev with 18 years of experience, you must know where to find it.

    Oh, right, it's "closed source" and not even remotely free. Again, not a criticism of MS, that's their model. But even Safari uses a rendering engine where you can dig into the source and see how it works.

    And you're claiming that no behavior is incorrect, they're only different. Yet Microsoft's own team is on record claiming that IE 10 is the most standards compliant version of IE, ever. They thought this was a big selling point, that their user base would prefer a standards compliant browser to one that "did its own thing."

    And they clearly identified non-compliant behavior as bugs, probably had them listed on a "bug tracker", and fixed them. In fact, each version has corrected thousands of bugs, and they routinely ship security updates to fix bugs.

    But the Trident team must be morons, because those bugs never existed! They were just "different behaviors."
  • Web Developer 2012-08-17 10:24
    scooby509:
    Some Jerk:
    scooby509:
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. (blah blah waah waah blah blah waah waah)


    You're on a technical site, using a hopelessly broken browser and bitching about how you can't see the site, in spite of the fact that there are free ones available that work.

    PEBCAK.


    I use FF, Safari and IE interchangably... just whatever window happens to come up. I suppose that (in your ignorance) you were blissful enough to lay downa comment that had absolutely no substance whatsoever.


    You really shouldn't post while drinking.

    name 1 way that Internet Explorer is either not free or actually broken. Plenty (meaning 2 or 3) people commenting on it... but I PERSONALLY think that you simply dont like that fact that IE is owned by a multi-billion dollar company and is not open source. I have worked on websites (for a living) for 13 years. All I have seen is DIFFERENT behaviors. I haven't seen any proof that lead me to believe that any browser is better than another... in fact... I have always been able to replicate all functionalities in all browsers.


    I'm a frequent MS defender, because many criticisms of them are moronic, but it's always fair game to criticize their software since you can do so objectively. On the topic of whether IE is "free", I've never had a chance to poke around IE's source code, but since you're a web dev with 18 years of experience, you must know where to find it.

    Oh, right, it's "closed source" and not even remotely free. Again, not a criticism of MS, that's their model. But even Safari uses a rendering engine where you can dig into the source and see how it works.

    And you're claiming that no behavior is incorrect, they're only different. Yet Microsoft's own team is on record claiming that IE 10 is the most standards compliant version of IE, ever. They thought this was a big selling point, that their user base would prefer a standards compliant browser to one that "did its own thing."

    And they clearly identified non-compliant behavior as bugs, probably had them listed on a "bug tracker", and fixed them. In fact, each version has corrected thousands of bugs, and they routinely ship security updates to fix bugs.

    But the Trident team must be morons, because those bugs never existed! They were just "different behaviors."


    +1
  • Cbuttius 2012-08-17 10:47
    Apart from the silly column naming convention and the magic value in f0, did nobody tell this programmer that you can update more than one value at a time, and whilst the database may well have smartly cached the rows you just changed so the lookup will be a bit faster next time, it is still almost certainly optimal to do it this way.

  • tegh 2012-08-17 12:11
    On the other hand, all of those sequential UPDATE statements are easy to read. Even moreso because of the fixed column name width
  • Some Jerk 2012-08-18 00:33
    scooby509:

    You really shouldn't post while drinking.
    maybe... but stupidity does not require sobriety to stop.

    scooby509:
    On the topic of whether IE is "free", I've never had a chance to poke around IE's source code, but since you're a web dev with 18 years of experience, you must know where to find it.

    who the fuck cares about the source code. I differ with the opinions on OPEN SOURCE. I did the work, I deserve the pay. the better I am, the more I deserve. It costs my employer money to pay what I demand... they deserve to charge for the privilege of having code that I make. As far as I am concerned... if that is what it takes to write a paycheck that I like... then fuck you if you don't like it, as long as my paycheck clears. My beer tastes no different if a cherity buys it.

    scooby509:
    even Safari uses a rendering engine where you can dig into the source and see how it works.
    and so do the people who want to install spyware on your computer.
    scooby509:

    And you're claiming that no behavior is incorrect, they're only different. Yet Microsoft's own team is on record claiming that IE 10 is the most standards compliant version of IE, ever. They thought this was a big selling point, that their user base would prefer a standards compliant browser to one that "did its own thing."

    And they clearly identified non-compliant behavior as bugs, probably had them listed on a "bug tracker", and fixed them. In fact, each version has corrected thousands of bugs, and they routinely ship security updates to fix bugs.

    But the Trident team must be morons, because those bugs never existed! They were just "different behaviors."


    none of which demonstrates any product as being inferior. I never said MSIE is BETTER. I said that there is no reason for a person to choose another browser instead, or no reason that using IE demonstrates any negative attribute abotu an individual. It seems more or less like you agree with me.

    MR 500 years experience with a technology that is little but 20 years in existence makes a lot of claims expecting tem to be reasons to expect a savey person not to use MSIE... but all of his/her claims are groundless. Whether or not (S)HE had to pay for it is irrelavent to me. Why should I make a choice based on someone else's problems? the open source issue I already stated my opinion on. The security issue I addressed well enough previously.

    Fact is... there is no reason to choose any browser over any other except what appeals to personal preference. It has as much to do with the price of tea as the color of your curtains. I have yet to see any argument that contests the idea that anybody who thinks that which browser a person uses is somehow indicative of their LEVEL of technical expertise is not themselves fully ignorant in technology themselves.
  • Some Jerk 2012-08-18 00:43
    Ralph:
    happens? As in, you are not in control of your computer? -99 points right there buddy.

    DUMBASS! I have all three browsers open because I always have 2 or 3 projects open and they always have a web aspect. I test all of my work in 3 versions of IE, 2 versions of FF, and sometimes Safari just because I have it on this puter. As a result, I always have plenty tabs of each open. I just click the first one I see.
    IE has virus and malware delivery functionality far superior to any other browser.
    I would really like to see some proof on that... because IE at least attempts to respect the priviliges of the underlying OS. Are you sure it isn't your own stupidity that leads you to these problems? I will admit that I am very careful about what sites I visit on my workstation, but I have had the same Windows Install on it for 4 years, and it does everything MUCH faster than any other computer I have ever used in my entire life. Further still, the last three times I had to deal with spyware, they were planted from Firefox.


    Which is why I immediately assume that anyone using it doesn't know what a browser is, doesn't know they have a choice, doesn't know the first thing about the history and reputation of MS, or just plain doesn't care.

    the first thing about the history and reputation of Microsoft: most heavily funded business in the United states... releases an average of 200 product service packs annually... is backed by BILLIONS of dollars, or wrote the OS that I use and therefore writes a browser more compatible with what security is built into it... as well as that which I am expecting to see at work. These are each (individually and collectively) the most relavent facts about why I even own a computer... alongside some millions of others. are you so stupid that you can't see that?
  • Luiz Felipe 2012-08-18 13:04
    I agree with you, if you dont do anything stupid, IE is most secure brower. Of course is without any plugin. I only use IE to access my bank. I cant trust my privacy to google. I cant trust security to firefox, doent run sandboxed on windows, and is memory bug ridden.
    IE9 is slow, i aggree, but works fine. My machine are so good that 100ms makes no difference.
    And, to finallize, all browsers behave slightly different, and all of them claim to be te correct "standard". No browser is the standard, all of them are x% standards compliant. So, fuck you firefox, they are the ones that most finger point others, morons, i detest arrogant people. I dont see much arrogance on opera or on IE, or on other browsers, is because of this that i dont use firefox, i am glad that chrome is taking theyr market share.
  • AE 2012-08-18 15:32
    I agree too. IE is not broken, it's slow and a bit buggy but has its advantages in Windows as Luis pointed to.

    And it's certainly not the sign of a noob because any web developer/tester/support must use it for their own websites - it would be unprofessional not to. Any decent website should (and do) run in IE without any problems. Those that don't are the WTF not IE. Even though making a website IE compatible can be a pain (and that is an MS WTF that they have tried to persevere with their own standards) it is a WTF not to because everybody knows that hundreds of millions of people use it.

    And to finally put a spanner in the works: I got the same error on Google Chrome not IE.
  • AE 2012-08-18 15:41
    And as for the OP, surely the real WTF (because there isn't really much of a WTF here except the lazy naming of fields (except the obsucre coded name klther) and the line inserting the new record with f0 as a string) is that they apparently have nearly 2 trillion people in their database. Perhaps it includes pets and cattle or is from the future or another planet.
  • AE 2012-08-18 15:43
    My mistake: 2 quadrillion people!!
  • Some Jerk 2012-08-18 17:06
    AE:
    I agree too. IE is not broken, it's slow and a bit buggy ...

    Must be a problem with your computer. Everything I do on it is instantanius (I click, I am there), just like in Firefox... cept firefox has some imaginary toolbar blocking me from clicking anything on the top. Ill get around to cleaning up the install... but it is annoying. Safari is the only browser I have that doesn't always respond instantly to everything that I do.

    Admitedly ... all of this may have something to do with me overspending just a bit on my computer hardware.
  • AE 2012-08-18 21:16
    Yeah I was more talking about loading the program than loading pages but if everything happens instantaneously for you then it's not the best platform to make comparisons on.

    I have to use computers that have no other browser than IE installed and are not blessed with good specs and installing another browser just for the one time I need to go online with it would be a waste of time.

    If there is another browser already installed I'd rather use it for the usual purposes because it's less likely to crash and usually a bit quicker to load. That's my experience of the hundreds of PCs I've ever used IE 9 on.

    And this is pretty much born out by what people are saying on the hits when googling 'browser benchmarks 2012'. Especially the Startup Time results for Tom's Hardware's Web Browser GrandPrix (http://www.tomshardware.com/reviews/windows-7-chrome-20-firefox-13-opera-12,3228-5.html)

    But the differences aren't massive so I certainly wouldn't criticise anyone for using IE and it's certainly not broken as was alleged.
  • My Name 2012-08-19 06:34
    I enjoy how this article causes an error message whenever I view the main page. It's fine when viewing the article itself, strangely.
    I'm surprised I haven't seen anyone else mention it!


    SyntaxHighlighter

    Can't find brush for: java
  • Some Jerk 2012-08-19 20:57
    My Name:
    I enjoy how this article causes an error message whenever I view the main page. It's fine when viewing the article itself, strangely.
    I'm surprised I haven't seen anyone else mention it!


    SyntaxHighlighter

    Can't find brush for: java


    It has been mentioned... I have been unable to replicate the issue
  • Some Jerk 2012-08-19 21:09
    yea...

    The problem is that many companies tend to go after the best deal possible.. which usually does not constitute the best value possible. For example... unflatulantly, there are many cases where IE does not give you the option of using memory or a certain drive fo "offline content" which everything technically becomes while you are interacting. If you happen to have 5400 RPM drives in your computer, you are sort of screwed with regard to saving and loading temporary internet files. My core OS and all of its components and everything else Microsoft (as well as everything that extends MSIE directly or otherwise) are installed on a premium solid state drive, My suggestion to all is... before you blame the software... consider spending $200 less on your CPU and $200 more on the hard drive your OS uses... and perhaps you will have more creative views as to what constitutes a WTF. My slowest loading app (which includes MSVS 2010, Sql Server Mgt. Studio, Visio and all other orfice products... Photoshop and Autocad 2012) takes somewhere between 1 and 2 seconds to load. Performace per dollar is much more easily purchased by speed of hard disk than it is by speed of CPU... though be wary of the buss. As an experiment... I got a 3core AMD barebones system, a 550 ti VGA, 6 GB mem and a $150 solid state drive (total cost, $700 including monitor) for my kids. The system outperforms any 2 Dell workstations.
  • Some Jerk 2012-08-19 21:15
    AE:
    Especially the Startup Time results for Tom's Hardware's Web Browser GrandPrix (http://www.tomshardware.com/reviews/windows-7-chrome-20-firefox-13-opera-12,3228-5.html)


    They quote MSIE at 3.5 seconds :p. All 3 of my computers (though 1 was recently stolen, my kids' computer) load it in less than a second. Definately go to Tiger Direct... get one of these:
    http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=1704741&Sku=C13-8121

    and move your OS to that. Then tell me how long MSIE takes to load. it is a $110 upgrade folks! And while you're using it... and basking in the glow of utter perfection... try to deflate your ego by remembering that "MINE IS TWICE AS FAST :p"
  • Cbuttius 2012-08-20 06:01
    the real WTF are the personnel on this site.
  • Cbuttius 2012-08-20 06:02
    it's a bloody log file... not code.

    can't you idiots tell the difference?
  • Some Jerk 2012-08-20 09:06
    Cbuttius:
    it's a bloody log file... not code.

    can't you idiots tell the difference?

    If I was suffering a performance problem in an application, I might review logs, or perhaps run a trace on the database to determine where the gears are clogged. In this case, I would evaluate dozens of round trips to a database for the creation of a single record as being something of a bottleneck, wouldn't you? This isn't "SIMPLY A LOG FILE"... it is a historical record... and the best tool for troubleshooting slow and unresponsive websites under certain cases.
  • AE 2012-08-20 14:46
    Some Jerk:
    try to deflate your ego by remembering that "MINE IS TWICE AS FAST :p"


    It's all relative to the system you have. It's talking about the speed of the program not the speed of the computer. If it makes you feel good that your PC loads it real quick then good for you but interests me not at all. The point is that your PC would probably load other browsers even faster.

    Someone with your experience should know the fastest PC money can buy now will look old and slow within a few years. Try to deflate your ego by remembering that nobody except you cares how fast yours is.
  • Some Jerk 2012-08-20 17:17
    AE:

    Try to deflate your ego by remembering that nobody except you cares how fast yours is.


    hey... damnit... I deflate my ego with snide comments all the time.

    And you are mistaken.

    CPU strength and memory speeds and other such things constantly improve while system performance seems to remain reasonably constant in many ways. This is (in part) due to the fact that software vendors, game vendors, operating systems, etc. tend to put the aditional resources to use... and also in part because too many people fail to improve the system where it would do the most good.

    The performance of individual applications is heavily contingent on the allocation and usage of resources, and the speed at which the aforementioned resources are accessible. As Internet Explorer relies heavily on the filesystem... it is the filesystem itself that actually causes the program to slow down. While it may be a fact that IE does perform more filesystem operations when coupled with its' integration into Windows, simply maintaining the resources in memory is not an option. Therefore... each person is left with a choice, fix the actual problem or decide the software isn't good enough. When I get a game that requires a more sophisticated graphics card... I buy a new graphics card. If IE requires faster R/W speeds for the hard disk, I get one that can perform... especially since it is so cheap to do so.
  • fregas 2012-08-20 17:49
    The inner platform is always a classic WTF.
  • Cbuttius 2012-08-20 18:18
    It's a WTF if the logs are not showing the times or what is making the calls.

    It is poor performance to get different columns from the same database rows in different requests.

    The column names look WTF'y and I think that is supposed to be the main WTF here, although if you know what a FIX message is, i.e. the standard financial message that is sent across Bloomberg, etc. you would know messages are formatted with a column number followed by a value. A given column number will always have the same type, but can change its meaning occasionally dependent on context.

    If what is happening here is some kind of similar model, it's not a total WTF. Meaningful column names, like identifiers etc are there to make life easier for humans to maintain software but don't bother machines, and for some things smaller ones are more efficient.

    By the way, I have looked at a log before and seen the database activity. Most of the slowness WTFs are not receiving different columns from the same rowset but are receiving lots of different rows with single calls to the database. I have fixed this before in two ways:

    1. A single call to retrieve a large number of rows, when we actually did need all of them at once. This gave a huge performance boost.

    2. Using lazy evaluation when when it was actually doing was loading everything in one go up front, and in the course of a session was only reading a small fraction of it. On that occasion I didn't bother changing the procedure to get everything but the efficiency was enormously noticeable.

  • Ol' Bob 2012-08-23 07:33
    Dave! Buddy! Is that YOU?!?

    CAPTCHA: enim - too bad they forgot the trailing 'a'
  • Ol' Bob 2012-08-23 07:41
    Carl:
    update tmp set f75 ='' where f0=1961720010330;
    Yeah, because it we didn't set it to '' it would have defaulted to, um, what? Blank?


    Obviously, they're using Oracle - so if you didn't set it to '' it would have defaulted to NULL! This is *SO* much better!

    (Yes, it's a joke. Y'see, Oracle considers a zero-length to be NULL. So there's no difference between a zero-length string and NULL. Except, of course, comparing NULL with anything, including NULL, gives a result of NULL. So, it's, y'know, like, a joke. Heh).

    CAPTCHA: validus - who cares what Wally does? (It's another joke. Y'see, in modern Latin pronunciation (which is supposedly like Latin was *originally* pronounced, back when Latin was, like, *the* big language) a "v" is supposed to be pronounced like a "w" in English. And an "i" in this case is pronounced like a long "i" in English. So "validus" should be pronounced "walee doos", or in other words, it's kind of like "Wally does". Heh).
  • AN AMAZING CODER 2012-08-25 11:30
    Some Jerk:
    dolor:

    It's just you. IE user? Now, THAT'S a real WTF today.

    that has to be the stupidest thing I have seen on this site (including the wtfs) in a very long time. Whether or not a person uses IE implies absolutely nothing of value, except whether or not they use IE. There are no functional limitations that render an inferior product... no possiblity of brain damage... and no other reason why using IE would cause a specific reaction or judgement toward any comment or artical. You may as well well assume that a specific response was the result of somebody wearing blue wranglers that were a bit too loose around the waist, as to assume that the usage of Internet Explorer has some impact on exactly what text appears beneath their names. Therefore, I must say that the intelligence displayed in producing this posting rivals, at best, that of my 7 year old daughter, who can also type arbitrary responses to specific comments without spelling errors.


    Disagree.

    Be aware of your surroundings. Be aware that 99% of the people here understand why Internet Explorer is the worst god damned browser available.

    Now, explain why you being in the 1% of people that DON'T understand this makes you of equal intellectual capability within the confines of this site.

    I understand and like Astronomy, but I would never go to an Astronomy site and reveal I prefer a shitty and inferior telescope brand and expect seasoned astronomers to respect my opinion.


    TL;DR: Your preferences amongst professionals reveals a lot about your capacity.
  • AN AMAZING CODER 2012-08-25 11:35
    Some Jerk:

    The performance of individual applications is heavily contingent on the allocation and usage of resources, and the speed at which the aforementioned resources are accessible. As Internet Explorer relies heavily on the filesystem... it is the filesystem itself that actually causes the program to slow down. While it may be a fact that IE does perform more filesystem operations when coupled with its' integration into Windows, simply maintaining the resources in memory is not an option. Therefore... each person is left with a choice, fix the actual problem or decide the software isn't good enough. When I get a game that requires a more sophisticated graphics card... I buy a new graphics card. If IE requires faster R/W speeds for the hard disk, I get one that can perform... especially since it is so cheap to do so.


    Terrible comparison.

    Unlike an awesome video game, Internet Explorer does not give you a unique browsing experience that can't be achieved in another browser. It makes sense that you would buy an awesome video card to play a game that you can't play any other way. It does not make sense to have to upgrade your otherwise adequate computer just to read FoxNews.com.
  • robb 2012-08-29 17:40
    Sorry, I have actually seen something like this in a commercial system. The vendor did not supply source code for the fat applications run on the client. Instead, if a customer needed a place to store an additional record field, instead of modifying the select, update, insert, and delete statements within the code, the customer would unhide a field on the screen (say co8) which was already referenced in the sql statements (using a toolobject nationalizer). You would have to slap a screen label on it, and modify the schema attributes for this column, but the logic and code behind the application did not have to be modified.
    The meta-data behind the field defined the data type and any applicable domain of values behind it, and the application already had the logic built in to validate the data based on the meta-data rules.