• Cough Sneeze Splutter (unregistered) in reply to BentFranklin
    BentFranklin:
    My favorite brain melting song goes like this:

    Meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow!

    (http://www.youtube.com/watch?v=5JuVHCJVYf4 if you don't remember or happily were never subjected to said torture.)

    Look up 'Duck Song' on YouTube....

    A duck walked into a lemonade stand, and he said to the man running the stand, hey (bop, bop, bop)....got any grapes?

  • hoodaticus (unregistered) in reply to Nagesh
    Nagesh:
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    I am surprising it took you so long to datter-mine this. What was first clue?
    +1 fpr "datter-mine".

  • (cs) in reply to Nagesh
    Nagesh:
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    I am surprising it took you so long to datter-mine this. What was first clue?

    Fake nagesh is double TRWTF.

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    Seriously. I'm starting to wonder if it's really just an Indian algorithm.

  • (cs) in reply to Nagesh
    Nagesh:
    Nagesh:
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    I am surprising it took you so long to datter-mine this. What was first clue?

    Fake nagesh is double TRWTF.

    Hell yes, one Nagesh is enough TRWTF

  • ORLY (unregistered) in reply to Bill's Kid
    Bill's Kid:
    ORLY:
    The Corrector:
    ORLY:
    Anonymous Coward:
    TRWTF is ColdFusion.

    TRWTF is endless dildos who think slighting every platform or technology other than the ont they're forced to use in their current slave-cube, is a WTF I've never used ColdFusion before, but I read somewhere that it's rubbish, and I believe everything I read, so I quote that article, to try and sound like I know what I'm talking about.

    FTFY

    FTFY

    I see what you did there. But, do you? hint: whose quote did you change...?

    Hey, after the first 'FTFY', it became our quote!

  • G. (unregistered) in reply to Nagesh
    Nagesh:
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    I am no troll. I am serous about use of magic values. E.F Codd also mention NULL as a magic value in his early papers.

    I may be very wide of the mark here, but do the words 'valoo chicken' mean anything to you?

  • ORLY (unregistered) in reply to hoodaticus
    hoodaticus:
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    Seriously. I'm starting to wonder if it's really just an Indian algorithm.

    Can't be - it works

  • (cs) in reply to boog
    boog:
    Sudo:
    Wouldn't it be just as easy to return an empty result set? Seems over-engineered to me.
    And some people think it's over-engineering to handle input parameters that are outside the function's domain.

    I'm not saying the API is intelligent, but the front-end should be aware of what inputs are valid and notify the user when they are not.

    Fair point... there's never an argument against validating inputs. Still, I'd personally consider an empty string to be a dumbass input rather than an invalid one, and just handle it gracefully... If they started passing objects or integers to the function, then I'd start throwing errors.

  • blue (unregistered) in reply to AnthonyC
    AnthonyC:
    Although you can type it backwards, which is dociousaliexpiisticfragilcalirupus, but that's going a bit too far, don't you think?

    That don't look backward to me....

    You're at least the second person here today who seems to struggle with the conspet of backward. Most of the syllables are still the right way

  • (cs)

    I'd add a new item to the database, maybe ...

    Entered search predicate atrocious, Expected a system precocious, Clicked search to find nada, Unexpected the yada: Supercalifragilisticexpialidocious.

    Now, let the developers try to figure out why it started giving this for an empty search string...

  • whila (unregistered) in reply to Peter
    Peter:
    hoodaticus:
    jumentum:
    hoodaticus:
    hoodaticus unregistered:
    hoodaticus:
    AnthonyC:
    Although you can type it backwards, which is dociousaliexpiisticfragilcalirupus, but that's going a bit too far, don't you think?
    That isn't backwards, dude. Neither character-wise nor syllable-wise.
    Never mind. I'm a moron. I didn't realize you we're quoting the movie.
    I'm just not homosexual enough...
    Hardly could tell, from the name and the self-talk.
    Wit Lesson #1 - before turning a phrase, it helps to understand the phrase you are turning.
    How do you "turn" a phrase?

    poke it in the bum

  • sdlfhgskd (unregistered) in reply to kastein

    There is an xedit version for windows

  • (cs) in reply to frits
    frits:
    I mean really boog, resorting to sock puppets. You should be ashamed of yourself.
    I have many reasons to be ashamed of myself, but resorting to sock puppets is not one of them.
  • frits (unregistered) in reply to boog
    boog:
    frits:
    I mean really boog, resorting to sock puppets. You should be ashamed of yourself.
    I have many reasons to be ashamed of myself, but resorting to sock puppets is not one of them.

    So you're proud of your sock puppets?

  • boog (unregistered) in reply to boog

    [quoteuser=whila][quote user="boog"][quote user="Unfrits"][quote user="frits"][quote user="boog"][quote user="frits"][quote user="boog"][quote user="java.lang.Chris;"]The only justifiable reason for the previous developer doing this is that he/she wasn't allowed to change the underlying data access code.[/quote]Why would the previous developer have needed to change the underlying data access code? Was it broken?[/quote]

    Oh I'm sure it worked as well as any super sophisticated SQL LIKE query would... [/quote] Maybe it does. And maybe the search operation starts out with

    if (parameter is invalid)
      throw a 500 error

    or something to that effect. Is it unlikely that the API developers decided "empty string" was an invalid input that they didn't want to handle?[/quote]

    You may want to re-read the article. The 500 error occurs when "supercalifragilisticexpialidocious" is the search term, not an empty string. Or do you mean that "supercalifragilisticexpialidocious" is a magic invalid term?

    The error encountered could be something similar to this. [/quote]

    [quote user="From the Article"]he noticed that he would receive a 500 Server Error if he tested against the API with an empty string[/quote][/quote]

    OK. I see right there:

    [quote user="From the Article"]

    <cfif Trim(url.searchText) EQ <span style="color:red;">"">
          <!--- empty string will cause an error --->
          <cfset <b>searchString="supercalifragilisticexpialidocious">
    </cfif>
    
    

    [/quote] [/quote]

    without saying "you're a fucking idiot"

    I think he was calling the API directly - so that little bit with the SearchString is on the website in the real world to avoid the issue happening [/quote]

    Thanks for that. I really am fucking idiot.

  • neminem (unregistered) in reply to boog
    boog:
    [enormous mess of incorrectly-quoted quote] Thanks for that. I really am fucking idiot.
    Apparently!

    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

  • unregistered (unregistered) in reply to neminem
    neminem:
    boog:
    [enormous mess of incorrectly-quoted quote] Thanks for that. I really am fucking idiot.
    Apparently!

    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

    so register - then you can edit

  • M (unregistered)

    Simply quite atrocious.

  • Mary Poppins (unregistered)

    If it ain't broke, it's supercalifragilisticexpialidoscious.

  • (cs) in reply to neminem
    neminem:
    boog (cheap imitation):
    [enormous mess of incorrectly-quoted quote] Thanks for that. I really am fucking idiot.
    Apparently!

    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

    Or a preview button. I think this boog was constructed from inferior materials.

  • (cs) in reply to frits
    frits (phony):
    boog:
    frits:
    I mean really boog, resorting to sock puppets. You should be ashamed of yourself.
    I have many reasons to be ashamed of myself, but resorting to sock puppets is not one of them.
    So you're proud of your sock puppets?
    Did I say proud? No, I don't believe I did.
  • (cs) in reply to Sudo
    Sudo:
    boog:
    Sudo:
    Wouldn't it be just as easy to return an empty result set? Seems over-engineered to me.
    And some people think it's over-engineering to handle input parameters that are outside the function's domain.

    I'm not saying the API is intelligent, but the front-end should be aware of what inputs are valid and notify the user when they are not.

    Fair point... there's never an argument against validating inputs. Still, I'd personally consider an empty string to be a dumbass input rather than an invalid one, and just handle it gracefully... If they started passing objects or integers to the function, then I'd start throwing errors.
    I'll buy that. What probably happened here is the API devs followed the path of least resistance. If frits was correct about the cause of the error, it'd be more work to handle an empty string and no work to just allow an error that shouldn't occur if the API is used appropriately (inputs within the domain and whatnot).

  • neminem (unregistered) in reply to unregistered

    [quote user="unregistered"](You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)[/quote]

    so register - then you can edit[/quote] Well, dang. I tried so hard to avoid Muphry's Law, and yet let a deeper I'm-a-moron mistake slip in. Learn something every day (I only haven't ever registered because, like probably most people here, I generally post from work, which employs a stupid content-blocker that doesn't block tdwtf, but does block its forum - and the 'join' link is on the forum subdomain. That and I'm lazy, and registering requires an additional 10 seconds of work. But screw it, quota time used, registration submitted, you win. You can all proceed to not care.)

    But speaking of, TRWTF is totally websense. It's hilarious what it does and doesn't block, sometimes.

  • unregistered (unregistered) in reply to neminem
    neminem:
    unregistered:
    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

    so register - then you can edit

    Well, dang. I tried so hard to avoid Muphry's Law, and yet let a deeper I'm-a-moron mistake slip in. Learn something every day (I only haven't ever registered because, like probably most people here, I generally post from work, which employs a stupid content-blocker that doesn't block tdwtf, but does block its forum - and the 'join' link is on the forum subdomain. That and I'm lazy, and registering requires an additional 10 seconds of work. But screw it, quota time used, registration submitted, you win. You can all proceed to not care.)

    But speaking of, TRWTF is totally websense. It's hilarious what it does and doesn't block, sometimes.

    I wonder how unregistered people could edit posts - based on comparing submitters IP to editters IP perhaps - or maybe just an assurance from the user (unregistered boog, say) that they really are the same unregistered boog that wrote the original post?

  • (cs) in reply to unregistered
    unregistered:
    I wonder how unregistered people could edit posts
    Yeah. Basically, I'm a moron, who forgot completely that he never registered, cause it remembers my username as if I was, anyway. (I suppose it could check the ip, but that'd be too much work for... basically negative gain, since it wouldn't be that difficult to spoof if you felt like it.)

    I also liked the perfect demonstration of Muphry's Law I just gave in the previous post, too - which, of course, was posted right before the registration went through. Awesome. Post about how people need to preview before submitting: you should really preview before submitting, yourself.

  • Curious George (unregistered) in reply to Sudo
    Sudo:
    Roy:
    Not so much a WTF as a "GoreBlimey"
    That should be "cor blimey", but it's easy to see how you came to make that mistake - Dick Van Dyke does the worst cockney impression known to man... it lies somewhere between Pakistani and South African.
    Yeah, it turns out that the vocal trainer they hired for Dick was Irish, and also couldn't do a decent cockney.
  • Seriously? (unregistered)

    What the damn is wrong with the comments on FireFox?

  • (cs)

    Another good test case is a string containing a single (... or multiple) Unicode Byte Order Marks, which is the encoding of character 0xFEFF, a "Zero width non breaking space", that is, it has no glyph, takes up not space, and does not affect formatting; and may be stripped from the string suring processing AFTER the string is checked to not be empty.

    good times.

  • Clueless (unregistered) in reply to unregistered
    unregistered:
    neminem:
    boog:
    [enormous mess of incorrectly-quoted quote] Thanks for that. I really am fucking idiot.
    Apparently!

    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

    so register - then you can edit

    They could at least come up with a **** *** preview button for those who aren't registered!

  • Effeminate Black Man (unregistered) in reply to ORLY
    ORLY:
    've never used ColdFusion before, but I read somewhere that it's rubbish, and I believe everything I read, so I quote that article, to try and sound like I know what I'm talking about.
    You are so dumb. For real.
  • (cs) in reply to The Great Lobachevsky
    The Great Lobachevsky:
    I randomly walk around singing "per clementina si!" when the mood strikes me :)
    ♥ That's my favourite part of that song (though the G&S ending is also good).

    Era legera E come un fairy E suo shoes numero nine Herring bo-ho-ho-hoxes senza to-ho-ho-hopses Sandale per Clementina si, per Clementina si, Per Clementina Sandale per Clementina Sandale per Clementine, Clementina, Clementina, Clementina. Herring boxes senza topses Sandale per Clementina, Herring boxes senza topses Sandale per Clementine, Che sciagura Clementina Che sciagura Clementina Cara Clementina cara Clementina-na-na-na-na-na-na-na.

  • Fermion (unregistered)

    How about Taumatawhakatangihangakoauauotamateapokaiwhenuakitanatahu

  • unregistered (unregistered) in reply to Clueless
    Clueless:
    unregistered:
    neminem:
    boog:
    [enormous mess of incorrectly-quoted quote] Thanks for that. I really am fucking idiot.
    Apparently!

    (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.)

    so register - then you can edit

    They could at least come up with a **** *** preview button for those who aren't registered!

    There is one...

  • f**king obvious (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    Nagesh:
    I have studied the above code and regadless to the language using by the programmer, it is valid.

    Using Magic values has been computer programming standard for donkey years.

    Ok, it's official. Nagesh is a troll.

    The comment above is MORE than enough proof...

    I would have thought his selective mastery of the English language would have given that away a LONG time ago...

  • Jugis (unregistered) in reply to Matt Westwood
    Matt Westwood:
    ORLY:
    Anonymous Coward:
    TRWTF is ColdFusion.

    TRWTF is endless dildos who think slighting every platform or technology other than the ont they're forced to use in their current slave-cube, is a WTF

    Endless dildos? Where can I get one? It's my wife's birthday in a few weeks' time.

    They're locked in a drawer in the server room. You may want to talk to Derek.

  • wthyrbendragon (unregistered) in reply to Anon Too
    Anon Too:
    Can't be arsed to debug? Just substitute the magic word supercalifragilisticexpialidocious!

    A real pro would have gone for disestablishmentarianism.

    However, a rebel with experience would go with 'antidisestablishmentarianism'

  • anonymous (unregistered)

    The real WTF is that it doesn't use the ItemNotFound Boolean value.

  • (cs) in reply to boog
    boog:
    ThingGuy McGuyThing:
    I'll probably take some flak, but I can see valid reasons for doing this rather than any of the other suggestions (bypassing search, returning the user to the search page, etc).
    1. Time constraints: If the dev had another 50 critical bugs to fix that day, there's no reason he should spend any more time on this bug. An if statement and a comment suffice.
    Wouldn't an if-statement suffice for bypassing the search?

    Not if there's additional logic embedded in the search function, like setting up parts of the search results page.

  • (cs) in reply to ThingGuy McGuyThing
    ThingGuy McGuyThing:
    boog:
    Wouldn't an if-statement suffice for bypassing the search?
    Not if there's additional logic embedded in the search function, like setting up parts of the search results page.
    Sure, but if the search string is empty, why would you even display a search results page? Shouldn't you display an empty search box with an error saying "please try again"?
  • QJ (unregistered) in reply to Fermion
    Fermion:
    How about Taumatawhakatangihangakoauauotamateapokaiwhenuakitanatahu

    Hi-ho Silver, away.

  • C-Octothorpe (unregistered) in reply to boog
    boog:
    ThingGuy McGuyThing:
    boog:
    Wouldn't an if-statement suffice for bypassing the search?
    Not if there's additional logic embedded in the search function, like setting up parts of the search results page.
    Sure, but if the search string is empty, why would you even display a search results page? Shouldn't you display an empty search box with an error saying "please try again"?

    Probably because that was above their head, or they didn't want to touch more than three lines of code to fix the defect.

    I've worked with people who would return an object from a GetById method regardless of whether it was found in the DB or not. They would simply add a property "IsValid", or some equally shitty named member and check that all over the place rather than checking for null.

    It's amazing what you take for granted (common sense, able to dress yourself in the morning, etc.), which some people simply lack.

  • Dr. Nil (unregistered)

    After eading theses comments, I'm starting to get the feeling that most developers are seriously flawed, passive aggressive losers.

  • Me (unregistered) in reply to John S.

    The whole thing

  • C-Octothorpe (unregistered) in reply to Dr. Nil
    Dr. Nil:
    After eading theses comments, I'm starting to get the feeling that most developers are seriously flawed, passive aggressive losers.

    Hey! Take that back! We're not passive-agressive...

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    boog:
    Sure, but if the search string is empty, why would you even display a search results page? Shouldn't you display an empty search box with an error saying "please try again"?
    Probably because that was above their head, or they didn't want to touch more than three lines of code to fix the defect.
    I doubt showing an error message and adding an "else" before the search method would require much more code than setting the search string to "supercalifragilisticexpialidocious" did, but point taken.
    C-Octothorpe:
    It's amazing what you take for granted (common sense, able to dress yourself in the morning, etc.), which some people simply lack.
    That's more-or-less the point I've been trying to make. The author's excuse was gross incompetence, not a broken API.
  • Sir Robin-The-Not-So-Brave (unregistered)
    jumentum:
    hoodaticus (unregisted:
    You've got to be fucking...me.
    What was that you were saying about homosexuality again?
    What is wrong with homosexuality? Some of my best friends (m/f) are homosexual. Personally I'm sapiosexual. Which means that most comments here are a total turn off, but there are a few gems that make me want to rub my genitals against the commenter's brains. (metaforically)
  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    ... I've worked with people who would return an object from a GetById method regardless of whether it was found in the DB or not. They would simply add a property "IsValid", or some equally shitty named member and check that all over the place rather than checking for null....

    Actually, there is merit in the idea of returning an object regardless. It all depends on your needs (or your team's needs).

    TRWTF is returning null, but not checking for null before trying to use the value as an object.

  • jumentum (unregistered) in reply to Sir Robin-The-Not-So-Brave
    Sir Robin-The-Not-So-Brave:
    jumentum:
    hoodaticus (unregisted:
    You've got to be fucking...me.
    What was that you were saying about homosexuality again?
    What is wrong with homosexuality? Some of my best friends (m/f) are homosexual. Personally I'm sapiosexual. Which means that most comments here are a total turn off, but there are a few gems that make me want to rub my genitals against the commenter's brains. (metaforically)
    In a previous post, he adamantly claimed not to be, but his follow-up posts clearly indicate otherwise.
  • boog (unregistered) in reply to Dr. Nil
    Dr. Nil:
    After eading theses comments, I'm starting to get the feeling that most developers are seriously flawed, passive aggressive losers.
    I'm pretty sure I would have strangled you if you said that to my face instead of over the internets.

Leave a comment on “A Spoonful of Sugar”

Log In or post as a guest

Replying to comment #:

« Return to Article