- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
grep -iHIr disconnect *
Admin
What's with the $cientology adds?
Admin
Dunno - sounds like you need to get yourself Adblock!
Admin
Hehe, that's a scream... I'm willing to bet that this loop does not take longer than in the magnitude of 10 seconds on any standard PC hardware that was built in this millenium ;o)
It all depends on one's definition of "infinite", of course...
Admin
Admin
no, how about:
captcha: commoveo ... WTF is "commoveo"???
Admin
for(unsigned int i=42; i>=0; i--)
If you think the loop process goes something like "if i==0, exit the loop, else i = i - 1" you're wrong. And with unsigned int, 0 - 1 > 0.
Admin
Error on line 3: Undefined variable 'paula'
Admin
Two words: recursive symlinks.
Wait, you don't get them on windows server.
Oh, but you don't have grep on windows server either!
Admin
Or how about (in C):
Admin
Oops:
It should have been
boolean paul = true, brillant = true;
while(paula == brillant) {
}
Admin
Admin
I actually had an if else block almost exactly like that once in a program, with the comment something like // This will never happen.
And one time I was debugging the code through the debugger and it went down into that block. Which allowed me to quickly find the error and fix it.
But then I tend to try to bullet proof code, testing for errors that will "never" happen. So much in fact that one program I wrote for a software house the owner PUT a bug in so he could sell maintenance on the program (needless to say I quit very soon after).
Admin
//this is definitely [anything]
Doesn't that mean it's assertion time?
Admin
Its Java. Isn't its int always 32-bit?
Admin
One word: Don't.
As for the original comment - it seems to me like it might be sarcastic. I reckon whomever wrote it was probably told to do it like that by some kind of formal specification, and was in a shop where it had to be followed to the letter. Maybe. It's just bad code I understand, but bad comments...hmmm...
Admin
grep -R disconnect *
?
Admin
Hahaha. Nice one
Admin
But you wouldn't be looking for a bug documented as a feature.
Admin