Comment On A Spoonful of Sugar

John S. was doing some work on the search feature of a client's website when he noticed that he would receive a 500 Server Error if he tested against the API with an empty string. [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6Next »

Re: A Spoonful of Sugar

2011-03-16 09:03 • by Someone (unregistered)
Personally, I cannot think of a better string.

Re: A Spoonful of Sugar

2011-03-16 09:03 • by Anon Too (unregistered)
Can't be arsed to debug? Just substitute the magic word supercalifragilisticexpialidocious!

A real pro would have gone for disestablishmentarianism.

Re: A Spoonful of Sugar

2011-03-16 09:03 • by renewest
That is a bad search function indeed. Google returns over 1.770.000 results.

Re: A Spoonful of Sugar

2011-03-16 09:04 • by Someone (unregistered)
Also, since it seems to be tradition, I claim the first and second comment positions.

Also, a better search string I guess would be;
"StupidRubbishAPINeedsFixing"

Or perhaps;
"HeyYouWantAJobFixingThisAPICallUs"

Re: A Spoonful of Sugar

2011-03-16 09:06 • by Anon Too (unregistered)
"John S. was doing some on the search feature..."

Umm ..... work, brain surgery, carburetor rebuild? What was he doing on the search feature?

Re: A Spoonful of Sugar

2011-03-16 09:07 • by Agile (unregistered)
This is what's great about unit tests: it doesn't matter how you get the right answer, it just matters that you get the right answer.

Re: A Spoonful of Cream

2011-03-16 09:11 • by frits
To ensure no search results they should have used:
~~~<==$

Re: A Spoonful of Sugar

2011-03-16 09:12 • by The Boss (unregistered)
Remember, my minions, you must never ever capitulate to the requests of other departments. If they complain that something is "broken," and you fix it; not only are you squandering valuable company resources, but you are also demonstrating that this department is subordinate to that one! That is an offense up with which I shall not put. Feel free to offer solutions that will force THEM to fix THEIR code, but do not change your interface.

Never forget: this department is a team, and we work together as a team. Failure is not an option: we must all fight together to defeat all other teams. Only by meeting our deadlines and causing the others to miss theirs will I achieve the promotion I so blatantly deserve.

Re: A Spoonful of Sugar

2011-03-16 09:13 • by Anonymous Coward (unregistered)
TRWTF is ColdFusion.

Re: A Spoonful of Sugar

2011-03-16 09:17 • by Michael (unregistered)
341105 in reply to 341104
Anonymous Coward:
TRWTF is ColdFusion.


Understatement of the year.

CAPTCHA: mara ... jade?

Re: A Spoonful of Sugar

2011-03-16 09:18 • by John S. (unregistered)
I accidentally the search feature.

Re: A Spoonful of Sugar

2011-03-16 09:21 • by apaq11
<easyjoke>

He did that even though the sound of it is something quite atrocious!

</easyjoke>

Re: A Spoonful of Sugar

2011-03-16 09:23 • by operagost
As is your spelling!

Re: A Spoonful of Sugar

2011-03-16 09:30 • by passby (unregistered)
341111 in reply to 341100
Anon Too:
"John S. was doing some on the search feature..."

Umm ..... work, brain surgery, carburetor rebuild? What was he doing on the search feature?

Some. Do you have trouble reading or something? It's written right there!

Re: A Spoonful of Sugar

2011-03-16 09:34 • by Roy (unregistered)
Not so much a WTF as a "GoreBlimey"

Re: A Spoonful of Sugar

2011-03-16 09:34 • by itsmo (unregistered)
This is just brillant

Re: A Spoonful of Sugar

2011-03-16 09:36 • by Anon (unregistered)
341117 in reply to 341100
Anon Too:
"John S. was doing some on the search feature..."

Umm ..... work, brain surgery, carburetor rebuild? What was he doing on the search feature?


Oh you don't want to know. Pervert!

Re: A Spoonful of Sugar

2011-03-16 09:36 • by AndyCanfield
341118 in reply to 341097

A real pro would have gone for disestablishmentarianism.

Nope; I'm an antidisestablishmentarianist.

Re: A Spoonful of Sugar

2011-03-16 09:40 • by JamieC (unregistered)
341120 in reply to 341097
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification

Re: A Spoonful of Sugar

2011-03-16 09:43 • by EJ_
coldFUSION!!! Akismet!!! bunch of unrelated words for askismet to choke on

Re: A Spoonful of Sugar

2011-03-16 09:57 • by JayC
341124 in reply to 341103
The Boss:
Remember, my minions, you must never ever capitulate to the requests of other departments. If they complain that something is "broken," and you fix it; not only are you squandering valuable company resources, but you are also demonstrating that this department is subordinate to that one! That is an offense up with which I shall not put. Feel free to offer solutions that will force THEM to fix THEIR code, but do not change your interface.

Never forget: this department is a team, and we work together as a team. Failure is not an option: we must all fight together to defeat all other teams. Only by meeting our deadlines and causing the others to miss theirs will I achieve the promotion I so blatantly deserve.


YES! From one who has worked in such a department, I can't agree more.

</Edit>

Erm.. I mean't that only when it's the OTHER department's crap that's broken.

Re: A Spoonful of Sugar

2011-03-16 10:02 • by golddog (unregistered)
I presume that ColdFusion is setting the search term in that mark-up. If so, still doesn't explain the 500; seems like it should've simply not found matches (or returned a list, depending on the content against which it's searching).

I mean, if I substituted "bob" for your sarch input, I'd expect to find all documents referring to bob, not a 500.

Re: A Spoonful of Sugar

2011-03-16 10:05 • by Mary (unregistered)
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?

Re: A Spoonful of Sugar

2011-03-16 10:06 • by Bert (unregistered)
341128 in reply to 341127
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?

Indubitably!

Re: A Spoonful of Sugar

2011-03-16 10:12 • by jpers36
341130 in reply to 341120
JamieC:
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification


No mention yet of Pneumonoultramicroscopicsilicovolcanoconiosis?

Re: A Spoonful of Sugar

2011-03-16 10:12 • by Nagesh (unregistered)
341131 in reply to 341097
Anon Too:
Can't be arsed to debug? Just substitute the magic word supercalifragilisticexpialidocious!

A real pro would have gone for disestablishmentarianism.


Not if he was trying to be precocious.

Re: A Spoonful of Sugar

2011-03-16 10:15 • by A Gould (unregistered)
341132 in reply to 341100
Anon Too:
"John S. was doing some on the search feature..."

Umm ..... work, brain surgery, carburetor rebuild? What was he doing on the search feature?


Whatever he's doing on the search feature, don't you think it's time for him to get off it before he breaks something?

Re: A Spoonful of Sugar

2011-03-16 10:17 • by 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.

Re: A Spoonful of Sugar

2011-03-16 10:19 • by tehR
341135 in reply to 341126
golddog:
I presume that ColdFusion is setting the search term in that mark-up. If so, still doesn't explain the 500; seems like it should've simply not found matches (or returned a list, depending on the content against which it's searching).

I mean, if I substituted "bob" for your sarch input, I'd expect to find all documents referring to bob, not a 500.


The 500 error is returned by testing the standalone API with an empty search string.

The ColdFusion wraps the case of empty search strings in order to never present the API with an empty search string.

Re: A Spoonful of Sugar

2011-03-16 10:20 • by octal (unregistered)
Please, enough of this sesquipedalianism.

Re: A Spoonful of Sugar

2011-03-16 10:20 • by lyates
How do I get that song to stop playing in my head?

Re: A Spoonful of Sugar

2011-03-16 10:21 • by minion (unregistered)
341138 in reply to 341103
The Boss:
Remember, my minions, you must never ever capitulate to the requests of other departments. If they complain that something is "broken," and you fix it; not only are you squandering valuable company resources, but you are also demonstrating that this department is subordinate to that one! That is an offense up with which I shall not put. Feel free to offer solutions that will force THEM to fix THEIR code, but do not change your interface.

Never forget: this department is a team, and we work together as a team. Failure is not an option: we must all fight together to defeat all other teams. Only by meeting our deadlines and causing the others to miss theirs will I achieve the promotion I so blatantly deserve.


Would it help if we changed the API three times before releasing the final version with yet another API? After all if we want to ensure victory over the other teams, that of course means making it difficult to follow in our tracks.
Also, we can't let them squander our innovations - patent everything in the name of the department and force them to license or to work around our patents.

Re: A Spoonful of Sugar

2011-03-16 10:26 • by Pytry (unregistered)
341139 in reply to 341105
Michael:
Anonymous Coward:
TRWTF is ColdFusion.


CAPTCHA: mara ... jade?



I have supercalifragilisticexpialidocioused your search engine. Pray I don't supercalifragilisticexpialidocious it more.

Re: A Spoonful of Sugar

2011-03-16 10:29 • by airdrik (unregistered)
341141 in reply to 341137
lyates:
How do I get that song to stop playing in my head?

By getting a different song stuck in your head, like: chim-chiminey, chim-chiminey, chim chim cher-ee, or: This is the song that never ends ...

Re: A Spoonful of Sugar

2011-03-16 10:31 • by Bert (unregistered)
341143 in reply to 341137
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!

Re: A Spoonful of Sugar

2011-03-16 10:35 • by Anon (unregistered)
341144 in reply to 341141
lyates:
How do I get that song to stop playing in my head?


airdrik:
By getting a different song stuck in your head, like: chim-chiminey, chim-chiminey, chim chim cher-ee, or: This is the song that never ends ...
Bert:
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!


Arghhh, Mary Poppins hivemind! Flee the city! Burn your daughters!

Re: A Spoonful of Sugar

2011-03-16 10:37 • by Power Troll (unregistered)
341145 in reply to 341143
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!


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!

Re: A Spoonful of Sugar

2011-03-16 10:39 • by boog
I don't see what's wrong with this code. Clearly similar validation logic couldn't have been used to dodge the search API altogether in the event of a predictable, erroneous input, or even print a message to the user informing them that the required input was invalid. What a ludicrous idea!

Obviously this workaround was the author's only option.

Re: A Spoonful of Sugar

2011-03-16 10:41 • by Zachary (unregistered)
341147 in reply to 341130
jpers36:
JamieC:
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification


No mention yet of Pneumonoultramicroscopicsilicovolcanoconiosis?


You beat me to it. That is the word I was going with.

plaga - Speaking of diseases

Re: A Spoonful of Sugar

2011-03-16 10:42 • by Zylon
341148 in reply to 341137
lyates:
How do I get that song to stop playing in my head?

Perhaps this will help--

I would have gone with "iamtheverymodelofamodernmajorgeneral".

But seriously, the practice of coding around errors instead of fixing them is an aspect of programming that I don't see discussed much. Off the top of my head, the only print reference I can recall to this topic is in passing in Steven Levy's excellent Hackers.

Re: A Spoonful of Sugar

2011-03-16 10:56 • by Sarah (unregistered)
Would be even more funnier if some article (or what it is that would be found) would contain that search string..

Re: A Spoonful of Sugar

2011-03-16 10:58 • by 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!

Re: A Spoonful of Sugar

2011-03-16 11:01 • by kastein (unregistered)
341151 in reply to 341107
apaq11:
<easyjoke>

He did that even though the sound of it is something quite atrocious!

</easyjoke>



I think you mean </cfeasyjoke>

coldfusion is one of the many real WTFs

Re: A Spoonful of Sugar

2011-03-16 11:06 • by Candy (unregistered)
341152 in reply to 341097
I understand you're against the antidisestablishmentarianism movement...

Re: A Spoonful of Sugar

2011-03-16 11:06 • by airdrik (unregistered)
341153 in reply to 341130
jpers36:
JamieC:
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification


No mention yet of Pneumonoultramicroscopicsilicovolcanoconiosis?


Be careful with those long words, you might trigger someone's Hippopotomonstrosesquipedaliophobia

Re: A Spoonful of Sugar

2011-03-16 11:09 • by F (unregistered)
341154 in reply to 341130
jpers36:
JamieC:
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification


No mention yet of Pneumonoultramicroscopicsilicovolcanoconiosis?


I should hope not.

Obviously preferable: Llanfairpwllgwyngyllgogerychwyrndrobwllllantisiliogogogoch. There's no chance whatsoever of that accidentally producing a successful search.

Re: A Spoonful of Sugar

2011-03-16 11:18 • by Wyatt (unregistered)
341155 in reply to 341127
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?


Indubitably.

Re: A Spoonful of Sugar

2011-03-16 11:19 • by Ray (unregistered)
341156 in reply to 341154
@F: So YOU'RE the one who coded that railway routefinder...

Re: A Spoonful of Sugar

2011-03-16 11:23 • by neminem (unregistered)
341157 in reply to 341148
Zylon:
I would have gone with "iamtheverymodelofamodernmajorgeneral".

That's pretty funny, as the first thing that popped into my head on the topic of catchy songs was:
There's antimony, arsenic, aluminum, selenium,
And hydrogen and oxygen and nitrogen and rhenium,
And nickel, neodymium, neptunium, germanium,
And iron, americium, ruthenium, uranium

And really, we hack around bugs in APIs we don't control, all the time. That's not a WTF. This particular *method* of hacking around it... is. (Also generally, if it's a bug in an API coming internally from another team, we first hack around it, and then also file a bug report.)

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.

Re: A Spoonful of Sugar

2011-03-16 11:25 • by Pyroka (unregistered)
341158 in reply to 341154
F:
jpers36:
JamieC:
Anon Too:

A real pro would have gone for disestablishmentarianism.


A really real pro would have gone for floccinaucinihilipilification


No mention yet of Pneumonoultramicroscopicsilicovolcanoconiosis?


I should hope not.

Obviously preferable: Llanfairpwllgwyngyllgogerychwyrndrobwllllantisiliogogogoch. There's no chance whatsoever of that accidentally producing a successful search.


Unless you're searching for hotels in Wales
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6Next »

Add Comment