• iToad (unregistered) in reply to Mary
    Mary:
    You know, you can say it backwards, which is "docious-ali-expi-istic-fragil-cali-rupus"; but that's going a bit too far, don't you think?

    You want to be very careful saying that out loud. Do not call up that which you cannot put back down.

  • trtrwtf (unregistered) in reply to Pyroka
    Pyroka:
    Unless you're searching for hotels in Wales

    The very definition of the phrase "trwtf"

  • anonymous internet wanker (unregistered) in reply to Anon Too

    come on, don't you love doing some on the search function? I do. It's my favorite thing, I do it all the time! :)

    (well, my favorite thing besides the obvious)

  • fwfw (unregistered) in reply to java.lang.Chris;
    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. I once worked at a place where I was regularly coming across broken code in the lower levels of the ball 'o mud code base. I'd submit fixes, along with a unit test (a novelty at that particular firm - no one else had even heard of unit testing) only for a more "senior" developer to veto the changes every time.

    The fact that they use CF tells me that they regularly change production data by using the Edit Rows function in SSMS.

  • (cs) in reply to Power Troll
    Power Troll:
    ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL, SMALL WORLD!

    ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL, SMALL WORLD!

    ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL, SMALL WORLD!

    ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL WORLD, AFTER ALL! ITS A SMALL, SMALL WORLD!

    GOD DAMMIT!

  • Squidfood (unregistered) in reply to Someone
    Someone:
    Personally, I cannot think of a better string.

    But is it one of your favorite strings?

  • trtrwtf (unregistered) in reply to Squidfood
    Squidfood:
    Someone:
    Personally, I cannot think of a better string.

    But is it one of your favorite strings?

    No, that would be "Brown paper packages tied up with %s"

  • Wonk (unregistered)

    if comment EQ "" cfset comment = "Chargoggagoggmanchauggagoggchaubunagungamaugg"

  • Anonymous (unregistered) in reply to Squidfood
    Squidfood:
    Someone:
    Personally, I cannot think of a better string.

    But is it one of your favorite strings?

    private string _fav1 = "raindrops on roses";
    private string _fav2 = "whiskers on kittens";
    private string _fav3 = "bright copper kettles";
    private string _fav4 = "warm woolen mittens";
    private string _fav5 = "brown paper packages tied up with string";
    These are a few of my favorite strings.

  • Vacaloca (unregistered) in reply to lyates
    lyates:
    How do I get that song to stop playing in my head?

    song.Dispose();

  • (cs) in reply to Pyroka
    Pyroka:
    F:
    Llanfairpwllgwyngyllgogerychwyrndrobwllllantisiliogogogoch. There's no chance whatsoever of that accidentally producing a successful search.
    Unless you're searching for hotels in Wales
    Nope, not even then. Perhaps if you were searching for "places that sell novelty railway platform tickets in Wales" you might get lucky, but mostly you'd get back Llanfair, Anglesey (as distinct from all the other Llanfairs around Wales). Llanfair P.G. is also acceptable but nobody calls it Llanfairpwllgwll...gogogoch any more.

    If you want me, I'll be with the sheep.

  • BentFranklin (unregistered)

    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.)

  • trtrwtf (unregistered) in reply to MrBester
    MrBester:
    If you want me, I'll be with the sheep.

    I'll bet you will. Hey, McLeod! Get off of my ewe!

  • (cs)

    Once again we get a code sample where a programmer fixes a problem by using a "magic string".

  • Herby (unregistered) in reply to RichP
    RichP:
    D'oh, an error, a pes-ky error Ray, a bright idea'd fix Me, the coder to save the day, Far, a non-pool memory access So, I think I'll throw an error La, the yellow one next to Po Tea, a choice n'stead of coffee, which brings us back to D'oh!

    The hills are alive with the sound of music.....

    Sorry, wrong Julie Andrews movie. Never [Emily Litella] mind.

  • OldPeter (unregistered)

    You want long words? Forget English and choose German:

    Oberdonaudampfschifffahrtsgesellschaftskapitäswitwenrentenantragsformulartitelzeilenendbuchstabengrößenangabe.

    (Upper danube steam ship company captain's widow rent applicance form title line end letter size value)

  • (cs) in reply to neminem
    neminem:
    Also, if they really had to submit a search string, rather than random long words, fun as they are to name, couldn't they just have mashed the keyboard a bit, and gone with something like "CJFNNCNNOLIIEHREHCDMUCDGERWP"? Pretty sure *that* won't ever get any results anywhere.
    It does now. Nice work.
  • Fred (unregistered)

    The obvious approach to this problem is to create a thingy that responds to a search for "supercalifragilisticexpialidocious" and make sure it thoroughly insults the reader in the most vile terms possible. (Like maybe calling them a VB programmer...)

    Then just sit back and wait for the complaints to pile up, forcing management to authorize fixing the actual bug instead of papering over it.

    If they merely change the magic word, rinse and repeat...

  • (cs) in reply to neminem
    neminem:
    Also, if they really had to submit a search string, rather than random long words, fun as they are to name, couldn't they just have mashed the keyboard a bit, and gone with something like "CJFNNCNNOLIIEHREHCDMUCDGERWP"? Pretty sure *that* won't ever get any results anywhere.

    Whenever I need a magic string that should never appear in real-world data, I use something like this:

    "~~~!!!~~!~! THIS STRING SHOULD NEVER APPEAR IN REAL-WORLD DATA AND IS USED TO MEAN insert meaning here . IF IT DOES APPEAR IN REAL-WORLD DATA, THIS APPLICATION WILL PROBABLY BREAK OR BEHAVE IN AN UNPREDICTABLE WAY ~~~~!!!!~~~~"

    It has the benefit of being self-documenting, and if it ever does show up in real-world data, someone is clearly messing with the application's head.

  • (cs)

    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.

    2. Global search: He can't return the user to the original page. If this search appears at the top of every page, then he'd have to go through the pain of ensuring that every form in the application was correctly populated on a bad search.

    3. One-off effects: If the search operation has one-off effects, then it's far easier to pass it a bad string than try to reproduce those effects outside of the search operation.

    Bear in mind that if the above apply, it indicates a WTF somewhere further down the line. But we knew that when we found out the search API didn't allow empty strings.

    Really, the best suggestion I've seen was by RobFreundlich - the actual string should be self-documenting.

  • Vic (unregistered)

    It would be a real WTF if the client was Disney and people were trying to find the correct spelling.

  • (cs) in reply to ThingGuy McGuyThing
    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?
  • (cs) in reply to ThingGuy McGuyThing
    ThingGuy McGuyThing:
    - the actual string should be self-documenting.

    <cfif Trim(url.searchText) EQ ""> <!--- empty string will cause an error ---> <cfset searchString="If you are reading this, you are likely a fellow coder, or a general web geek. We have to pollute our code with this crap because the stupid fecks on the [insert team name] team at [insert company name] cant write an API worth a damn. No search string generates a 500 error from that pile of stinking mess they delivered, so instead, you get to read this."> </cfif>

  • (cs) in reply to Zylon

    Mahatma Gandhi, as you know, walked barefoot most of the time, which produced an impressive set of calluses on his feet. He also ate very little, which made him rather frail and, with his odd diet, he suffered from bad breath. This made him a...

    super calloused fragile mystic hexed by halitosis.

  • (cs) in reply to java.lang.Chris;
    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.
    Why would the previous developer have needed to change the underlying data access code? Was it broken?
  • BF (unregistered) in reply to Michael
    Michael:
    Anonymous Coward:
    TRWTF is ColdFusion.

    Understatement of the year.

    CAPTCHA: mara ... jade?

    I think we can all agree that the real WTF is the brain dead .NET webservice API that they were using to do the searching.

  • (cs) in reply to BF
    BF:
    Michael:
    Anonymous Coward:
    TRWTF is ColdFusion.

    Understatement of the year.

    CAPTCHA: mara ... jade?

    I think we can all agree that the real WTF is the brain dead .NET webservice API that they were using to do the searching.

    Does ColdFusion pay you to say that, or didn't any of the .Net shops want you after reading your resume?

  • foo (unregistered) in reply to neminem
    neminem:
    Also, if they really had to submit a search string, rather than random long words, fun as they are to name, couldn't they just have mashed the keyboard a bit, and gone with something like "CJFNNCNNOLIIEHREHCDMUCDGERWP"? Pretty sure *that* won't ever get any results anywhere.

    CJFNNCNNOLIIEHREHCDMUCDGERWP is probably a Welsh word.

  • (cs)
    John S. was doing some on the search feature of a client's website...
    I tried that once, but it didn't work out as well as using a mirror.
  • AnthonyC (unregistered)

    Although you can type it backwards, which is dociousaliexpiisticfragilcalirupus, but that's going a bit too far, don't you think?

  • (cs)

    So TRWTF is that the DAL code was off limits, and he should have used wrapper pattern? Which, in a sense, he did?

    So TRWTF is that there is no RWTF?

  • (cs) 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 isn't backwards, dude. Neither character-wise nor syllable-wise nor phonetically.
  • Bob (unregistered)

    Luckily, Bobx can automatically catch this exception and produce a meaningful error message in less than 20 lines of code.

  • hoodaticus (unregistered) in reply to hoodaticus
    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.
  • The Great Lobachevsky (unregistered) in reply to neminem

    neminem - I'm glad I'm not the only one here that appreciates Tom Lehrer.

    I randomly walk around singing "per clementina si!" when the mood strikes me :)

    captcha: nimis

  • Helps the Medicine Go Down (unregistered)

    Why exactly was Brian testing with an empty string, anyway? I hate it when devs do crap like that.

  • kastein (unregistered) in reply to steenbergh
    steenbergh:
    BF:
    Michael:
    Anonymous Coward:
    TRWTF is ColdFusion.

    Understatement of the year.

    CAPTCHA: mara ... jade?

    I think we can all agree that the real WTF is the brain dead .NET webservice API that they were using to do the searching.

    Does ColdFusion pay you to say that, or didn't any of the .Net shops want you after reading your resume?

    Didn't you know? Microsoft is replacing Visual FoxPro with Visual ColdFusion++ .NET Live Edition

    if this sentence didn't give you chills, you are probably not human.

  • (cs) in reply to 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 to have memorized the lyrics to every musical. Tho thorry, my apologieth.
  • (cs) in reply to boog
    boog:
    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.
    Why would the previous developer have needed to change the underlying data access code? Was it broken?

    Oh I'm sure it worked as well as any super sophisticated SQL LIKE query would...

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

    The correct solution to this problem would have been,

    <cfif Trim(url.searchText) EQ "">
          <!--- empty string will cause an error --->
          <cfset searchString="<b>null</b>">
    </cfif>
    
  • JJ (unregistered)

    I'll be in my bunk...doing some.

  • (cs) in reply to jumentum
    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.
  • (cs) in reply to frits
    frits:
    boog:
    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.
    Why would the previous developer have needed to change the underlying data access code? Was it broken?

    Oh I'm sure it worked as well as any super sophisticated SQL LIKE query would...

    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?
  • Peter (unregistered) in reply to hoodaticus
    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?
  • (cs) in reply to Roy
    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.
  • (cs) in reply to Bert
    Bert:
    lyates:
    How do I get that song to stop playing in my head?
    Simple; replace it with this one:

    Chim chimin-ee, chim chimin-ee, chim chim cher-ee, A sweep is as lucky, as lucky can be; Chim chimin-ee, chim chimin-ee, chim chim cher-oo, Good luck will rub off when I shakes 'ands with you!

    Go fly a kite.

  • (cs) in reply to Pr0gramm3r
    Pr0gramm3r:
    The correct solution to this problem would have been,
    <cfif Trim(url.searchText) EQ "">
          <!--- empty string will cause an error --->
          <cfset searchString="<b>FILE_NOT_FOUND</b>">
    </cfif>
    
    FTFY
  • Gunslinger (unregistered) in reply to kastein
    kastein:
    steenbergh:
    BF:
    Michael:
    Anonymous Coward:
    TRWTF is ColdFusion.

    Understatement of the year.

    CAPTCHA: mara ... jade?

    I think we can all agree that the real WTF is the brain dead .NET webservice API that they were using to do the searching.

    Does ColdFusion pay you to say that, or didn't any of the .Net shops want you after reading your resume?

    Didn't you know? Microsoft is replacing Visual FoxPro with Visual ColdFusion++ .NET Live Edition

    if this sentence didn't give you chills, you are probably not human.

    If you were someone who used visual FoxPro, then you weren't human already.

    CAPTCHA: nobis - Only a nobis uses FoxPro.

  • Lois Griffin (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?
    God, you're dumb! Thank God for that ass!

Leave a comment on “A Spoonful of Sugar”

Log In or post as a guest

Replying to comment #:

« Return to Article