| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |
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. |
Re: A Spoonful of Sugar
2011-03-16 16:59
•
by
Cough Sneeze Splutter
(unregistered)
|
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? |
Re: A Spoonful of Sugar
2011-03-16 16:59
•
by
hoodaticus
(unregistered)
|
+1 fpr "datter-mine". |
Fake nagesh is double TRWTF. |
Seriously. I'm starting to wonder if it's really just an Indian algorithm. |
Hell yes, one Nagesh is enough TRWTF |
Re: A Spoonful of Sugar
2011-03-16 17:34
•
by
ORLY
(unregistered)
|
Hey, after the first 'FTFY', it became *our* quote! |
Re: A Spoonful of Sugar
2011-03-16 17:36
•
by
G.
(unregistered)
|
I may be very wide of the mark here, but do the words 'valoo chicken' mean anything to you? |
Re: A Spoonful of Sugar
2011-03-16 17:36
•
by
ORLY
(unregistered)
|
Can't be - it works |
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. |
Re: A Spoonful of Sugar
2011-03-16 17:53
•
by
blue
(unregistered)
|
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 |
|
I'd add a new item to the database, maybe ...
Now, let the developers try to figure out why it started giving this for an empty search string... |
Re: A Spoonful of Sugar
2011-03-16 17:56
•
by
whila
(unregistered)
|
poke it in the bum |
Re: A Spoonful of Sugar
2011-03-16 18:03
•
by
sdlfhgskd
(unregistered)
|
|
There is an xedit version for windows
|
I have many reasons to be ashamed of myself, but resorting to sock puppets is not one of them. |
Re: A Spoonful of Sugar
2011-03-16 18:08
•
by
frits
(unregistered)
|
So you're proud of your sock puppets? |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 18:09
•
by
boog
(unregistered)
|
|
[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) 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"]
[/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. |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 18:12
•
by
neminem
(unregistered)
|
Apparently! (You know what would be cool, just in general? An edit button. I hear fora have those, sometimes.) |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 18:13
•
by
unregistered
(unregistered)
|
so register - then you can edit |
|
Simply quite atrocious.
|
|
If it ain't broke, it's supercalifragilisticexpialidoscious.
|
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 18:21
•
by
boog
|
Or a preview button. I think this boog was constructed from inferior materials. |
Did I say proud? No, I don't believe I did. |
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). |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 18:48
•
by
neminem
(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. |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 19:01
•
by
unregistered
(unregistered)
|
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? |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 19:11
•
by
neminem
|
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. |
Re: A Spoonful of Sugar
2011-03-16 19:30
•
by
Curious George
(unregistered)
|
Yeah, it turns out that the vocal trainer they hired for Dick was Irish, and also couldn't do a decent cockney. |
|
What the damn is wrong with the comments on FireFox?
|
|
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. |
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 21:46
•
by
Clueless
(unregistered)
|
They could at least come up with a **** *** preview button for those who aren't registered! |
Re: A Spoonful of Sugar
2011-03-16 21:51
•
by
Effeminate Black Man
(unregistered)
|
You are so dumb. For real. |
♥ 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. |
|
How about Taumatawhakatangihangakoauauotamateapokaiwhenuakitanatahu
|
Re: Pendantic Aspie Reading Comprehension Fail
2011-03-16 22:32
•
by
unregistered
(unregistered)
|
There is one... |
Re: A Spoonful of Sugar
2011-03-16 22:51
•
by
f**king obvious
(unregistered)
|
I would have thought his selective mastery of the English language would have given that away a LONG time ago... |
Re: A Spoonful of Sugar
2011-03-17 00:09
•
by
Jugis
(unregistered)
|
They're locked in a drawer in the server room. You may want to talk to Derek. |
Re: A Spoonful of Sugar
2011-03-17 07:34
•
by
wthyrbendragon
(unregistered)
|
However, a rebel with experience would go with 'antidisestablishmentarianism' |
|
The real WTF is that it doesn't use the ItemNotFound Boolean value.
|
Re: A Spoonful of Sugar
2011-03-17 09:56
•
by
ThingGuy McGuyThing
|
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"? |
Re: A Spoonful of Sugar
2011-03-17 10:37
•
by
QJ
(unregistered)
|
Hi-ho Silver, away. |
Re: A Spoonful of Sugar
2011-03-17 10:55
•
by
C-Octothorpe
(unregistered)
|
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. |
|
After eading theses comments, I'm starting to get the feeling that most developers are seriously flawed, passive aggressive losers.
|
Re: A Spoonful of Sugar
2011-03-17 11:24
•
by
Me
(unregistered)
|
|
The whole thing
|
Re: A Spoonful of Sugar
2011-03-17 11:26
•
by
C-Octothorpe
(unregistered)
|
Hey! Take that back! We're not passive-agressive... |
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.
That's more-or-less the point I've been trying to make. The author's excuse was gross incompetence, not a broken API. |
Re: A Spoonful of Sugar
2011-03-17 11:49
•
by
Sir Robin-The-Not-So-Brave
(unregistered)
|
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) |
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. |
Re: A Spoonful of Sugar
2011-03-17 11:59
•
by
jumentum
(unregistered)
|
In a previous post, he adamantly claimed not to be, but his follow-up posts clearly indicate otherwise. |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Page 6 | Next » |