- 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
I ALMOST PEED!!!
Admin
What's wrong with this code ?
It's a "boolean" and not "Boolean", so the only thing that can be passed to that method is "true" or "false" and noway a null on a primitive isn't it ?
I guess you meant Boolean.
Admin
Admin
Actually, in Java 5 and above you can pass in null. Thank you auto-boxing.
Admin
Admin
Landing a job requires a different skillset than performing the job. In pretty much any job except sales.
Admin
Not to a function that doesn't take Booleans, you can't.
Admin
If you had enough time to read the entirety of the back archive, you must have read things about people reading the entirety of back archives while their fellow co-workers tried to code the soft for the deadline... :)
Admin
Sometimes the recruiting process is best characterized as a stochastic one, and in the end of the day, all it takes is an equally f-ed up hiring manager.
And do they exist? Well as Jamie and Adam would put it: "Myth Confirmed".
Admin
If that code is in C#, maybe the intent was to include a "?" in the method argument so that "value" could be nullable. In that case, the method would probably have made more sense.
Admin
This is C code, but i'm sure it would be easy to port to other languages:
Hmm... annoyingly the code tag seems to make it double spaced :-(
Admin
Enterprisey C - genius!
Admin
IsTrue(IsNotTrue(IsBooleanTrue(IsBooleanFalse(I_Dont_Know))))
Comment made with the EVE Online browser
Admin
The longer the code, the more bug-free it is, because writing longer code takes more effort, and squashing bugs is a lot of effort, so more effort logically leads to less bugs.
Admin
QFT.
Admin
Please someone do a webservice with it, because I don't know which implementation to choose for this function.
Thanks in advance !
Admin
No, there is no defense for this type of programming.
Admin
Clearly the man was getting paid by the line. In that essence, this is genius.
Admin
Admin
It should give the answer in XML.
Admin
It had to be initialized so just in case the value was neither equal to false nor not equal to false and so neither end of the IF executes, it would not be undefined.
Admin
And to the human race ...
Admin
Ohhh!! I thought an auto-boxer was a guy who has fist-fights with cars.
Admin
It would be interesting to stipulate that you could not use any language conditional logic in your answer...
Admin
string value = "1 and 2";
value comparison with (int)0 is meaningless value != "zero"
Admin
Its a never ending coding loop!!!!!!!!!!!!! == infinite recursion
Admin
return !isBooleanFowl
Admin
Admin
It's a Victorian throwback to refer to Homo sapiens that way. Technically we (or on this forum, at least the vast majority) are members of the human species, but we don't like to think of ourselves as being just another animal.
Admin
Admin
This happens all the time at my company, they call it "BTC" or before time code. This is compounded by the fact that I see new users doing the same thing. . ..
Admin
I think I know the person who wrote this code! It's the same person who also authored the code below:
// If true return inVal1 else return inVal2 // public double IfThenElse(bool inCond, double inVal1, double inVal2) { if (inCond) { return inVal1; } else { return inVal2; } }
Hector
Admin
Boolean.TRUE.equals(value) if you really need to be that paranoid about the value in question, and I sincerely doubt that.
Admin
no, he just figured that since he had isBooleanFalse() already written; he could just use !isBooleanFalse(x);
Admin
(I.e., stupid restrictions => stupid workarounds.)
Admin
Seems he's improving as he didn't call IsBoolFalse() - he didn't even write "if (inCond == true)".
Maybe there's hope for him yet, but I still wouldn't hire him.
We need a "double-checking booleans is broken" declaration in the spirit of the "double-checking locks is broken" declaration.
Admin
Not enterprisey enough. Where is my XML?
captcha: ingenium - ingenious gum? or slot #120 on the periodic table?
Admin
I see this sort of crap all the time.
I've even seen
if (condition) { MethodA(); } else { MethodA(); }
Admin
Vfxcbhhn. Bhun Great job cleaning input... NOT!!!!!I
Admin
Even shorter: Never even have that method
Admin
Admin
Hi would you mind sharing which blog platform you're using? I'm planning to start my own blog in the near future but I'm having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something completely unique.
P.S Sorry for getting off-topic but I had to ask! donate for ukraine