|
|
|
| Non-WTF Job: Software Developer at Rustici Software (Franklin, Tennessee) |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |
|
Because you never know when TRUE might equal FALSE...
Hope be with ye, Cyan |
|
Pshh, that doesn't even do tribool. What crap.
|
|
An excellent example of defensive programming. You'll all be sorry you mocked it when the next version of the CLR adds "maybe" and "sometimes" to the list of possible values for a bool. Fools! |
|
Let's see.... true, false, maybe, possibly, should-be .... there must be a thousand other cases that we could test for ... maybe the language spec for a primitive will change -- who knows. |
You beat me to it! |
|
if a boolean isn't true or false, then we have some bigger issues to address, no?
|
|
Wow, think of all the lines of code that could be used to validate that an integer is an integer. Or testing every possible string combination. That's like infinity billion lines!
|
|
Hmm...this quality of this WTF just isn't up to snuff. C'mon Alex, give us some good ones!
|
well, if you don't should on me, i won't should on you. |
|
What about "File Not Found" ?
|
No ... Booleans are! or Booleans not are! there is no hard! |
Re: Outsourced Property Value
2006-04-20 15:16
•
by
marvin_rabbit
|
God! That took 13 minutes people! We're slipping! |
|
Should have been "throw new EndOfUniverseException();" If you are going to write code that is never going to get executed, it should at least be creative or something...yuck. |
|
The Daily WTF zings Slashdot; Slashdot takes a shot at Digg. What's next? Digg attacks Fark?
|
|
Validating booleans is scrap, but converting them to strings to validate then (to two different strings each, because of the the uppercase conversion) is even worse.
|
|
The fun part comes when Boolean.ToString() is localized to return true/false strings in the appropriate language, at which point m_ISO9001.ToString().ToUpper() returns "VRAI"/"FAUX" on a computer in France and the program dies horribly.
|
|
bool v_ISO9001 = value; Wouldn't the [bool v_ISO9001 = value;] part throw an exception if value couldn't be made into a bool type anyways thus making the rest of this code pointless? |
They lost it. |
AH! so the whole point was to make sure that only ENGLISH speaking people can use the software! Very creative security, and curse the french! |
Dumb This guys ip should be banned Is this a first form or the daly wtf form? |
|
But at least this code will catch it if someone tries to pass "hard" instead of "TRUE" or "FALSE"
God, this guys a genious! I wanna be like him when I grow up! BTW, does anyone else have trouble with the CAPTCHA? I'm colour blind, and most of the time all I see is a pink block :S |
|
Without bashing the developer, I would really want to know why the
developer really felt it was important to go this route. Absolutely, this is "wtf-code", but, someone actually sat down to think this out - I would have to ask myself "why didnt they see the circular logic in using a Bool, casting to a String, and checking the string result in a boolean fashion?" Something is critically wrong when a developer, who obviously understands the OO principles of Get/Set and constructs of IF..THEN..ELSE plus Casting, yet, writes total bunk like this. Sure, you can say "well, thats what you get when you outsource stuff", but I dont buy that. I've worked with lots of people from India, Russia, Eastern-Europe, China - they understand and get the concepts of programming just as well as you or me. Something more sinister is at hand - is it "Antagonizing Compliance" between a sour employee and a sour manager? Is it compliance with a tersely worded spec that ridiculously demands "each and every parameter will be checked on entry and exit, in each and every call" [I've seen crap like that]. Or is it just someone who plainly doesnt get it? I hope this isnt the case - oh it would be sad to think that someone next to me might be perpetrating a coding-crime like this, and actually mean it! |
I don't do much C# but I would assume they removed localized Boolean string-castings as of VB6. I may or may not be wrong |
|
They know something you don't. In 2012, MS will release a quantum
computer compatible version of the .net runtime that will replace the two-valued boolean with a fuzzy value that can take any value between false and true. Think of it as a float, constrained to a value between 0 and 1. 0=false, 1=true, 0.5=maybe, 0.2=rather not, 0.9=most likely etc. The way they programmed this property, they can make sure that only true and false slip through, not those undecided other values. |
|
This is not a WTF - it is just garbage.
Where's the brillance? Where's the juice? Where's the factoring of CSS back into each and every element to which it should be applied? Where's the inspired stupidity? The essential 'NOT GETTING IT'? A WTF is breathtakingly a WTF. This is not even worth a comment. I seriously considered not pressing the 'post' button. I think I will just blow away the window... |
Re: Outsourced Property Value
2006-04-20 15:28
•
by
AnonymousJack
|
I'm pretty sure it's a forum |
Yes. |
Pffft you don't need infinite lines, you can recurse infinitely!
Now, in PHP that's a funny useless waste of processor time |
if (m_ISO9001.ToString().ToUpper() == "TRUE"){return true;} |
|
Obviously they were trying to address the quantum theory of superposition. One can never know if a boolean is true or false until it is acted on.
|
Re: Outsourced Property Value
2006-04-20 15:39
•
by
marvin_rabbit
|
I surf the Quantum Foam. |
|
That made my day. Thanks! I wonder if this outsourcing shop was CMM level 5. I wonder if it had all this redundant code because it was CMM level 5. |
Nerd fight! |
I would have to guess a code generator did this. No sane person would go though all of that without having to think to themselves, "This looks so enterprisy!" |
|
Oh ho, you laugh at this WTF, but it's not a WTF, it's a carefully planned performance upgrade! Just think about it.... they can increase the performance of the ISO9001 property by an order of magnitude in their next version by simply deleting the ToString().ToUpper() calls and the senseless "make sure it's a boolean" check in the set method. I'm telling you, this isn't a WTF, this is planned incompetence! |
Re: Outsourced Property Value
2006-04-20 15:52
•
by
Whiskey Tango Foxtrot? Over.
|
Hehee... am I the only one imagining Kyle and Cartman's limp-wristed slap-fight on South Park last week when I hear those words? [:D] |
Re: Outsourced Property Value
2006-04-20 15:57
•
by
Nomen Nescio
|
|
So... does verifying that all booleans are either true OR false, help one become a ISO 9001 compliant enterprise programmar?
|
|
When I read the title I feared some guy managed to programmatically go through several internet protocols, office documents and executables just to validate a value. Compared to the other wtfs this is just harmless tomfoolery.
|
|
Could this be the remainders of code refactored from public string ISO9001 { get {...} set {...} } or worse public object ISO9001 { get{...} set {...} }? |
This is definitely an applicatino of String Theory! |
Re: Outsourced Property Value
2006-04-20 16:23
•
by
Richard Nixon
|
I think you missed the point of the LOC metric. Clue brick - coming your way. sincerely, Richard Milhouse Nixon |
IMO, a programmer doesn't have to vomit into his IDE in order to produce a WTF. Someone had to understand that a boolean produced true or false, and then added logic for those "other" values. Think of it like this... if I, as a developer, walked up to you and said, "If I don't want a boolean to be true or false, what value do I set it to?", what response do you think would go through your mind? Anything that makes you say WTF... is by definition, a WTF. |
Is an applicatino one of the fundamental particles of computing? |
|
This is one real whopper. Really...just off the charts.
|
|
> may-or-may-not-be-wrong
That's the next-gen Boolean! New and improved for enterpricy, value driven and customer adding SOA and XML based BI/ERP systems that may-or-may-not-be FileNotFoundException. Order now! And get a free press release from Microsoft stating how much they are better than Linux. Next-Gen Boolean, It's just Brillant! And you knwo, Paula (who is now outsourced to Mongolia) said it! |
|
Wouldn't it simply not compile if value wasn't a bool? The property is defined as a bool, therefor, value will always be a bool, no?
|
|
come on! does Paula code in c# too?
return 'Brillant!'; |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |