| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |
|
I think the only solution is to wire pepper spray to certain people's keyboards and have it activate when Ctrl + C is pressed.
|
|
This illustrates two of the fundamental axioms of development:
1) Given a piece of code, there must necessarily exist a more obfuscated and less readable way to write the same functionality 2) When encountering an if-ten statement that you don't necessarily understand, it is your duty as a programmer to add more &&s and ||s until it meets the needs of your particular bug fix (f*** testing the other, existing requirements) |
|
I don't even see &, | or () anymore. All I see is brunette, redhead...
|
|
I loved the "*".equalsIgnoreCase(sub.getReplaceOn())
It would be very bad have an uppercase asterisk slip unmatched against whatever that is. |
+1 Best idea ever. |
+1 :D |
They would simply learn to copy/paste using context menus. You know, assuming the didn't go blind from the first couple sprays. |
|
The purpose? Job security.
|
|
TRWTF is using spaces instead of tabs.
|
++1 |
|
a big differently?
Alex, hand over your English mastery card, I need to take a corner off it. |
Re: The Other If
2010-11-11 09:28
•
by
Skilldrick
(unregistered)
|
Of course, I meant "using tabs instead of spaces". :P |
It's not really a mastery of English problem. It's a reading-what-i-just-wrote problem. Spell check doesn't catch errors if the errors are legitimate words. I no I always check every thing that I wrote online to made sure that it is well wrote. To all who would post a thing online: Just take the time to read a post as though you were reading it for the first time. It's hard to find the extra minute or so, but it sure saves WTF readers a LOT of crying and wet pants. CAPTCHA: capio -- to seize (it's not fun when it's actual Latin) |
Re: The Other If
2010-11-11 09:40
•
by
anonymous
(unregistered)
|
I hope you're kidding. I no there is no way you took the time when posting a thing. |
Think about the sort of people we're dealing with here. The copy/paste buttons are probably the *only* way they know how to do it. |
|
"Perhaps you can figure out what those purposes are after reading this simple, single line of code."
To cause an aneurysm and to ensure job security? |
Damn you, now 1==2 and math's all screwed up. Someone call Russell and Whitehead in, we need to reboot. |
Re: The Other If
2010-11-11 09:48
•
by
Eaten by a Grue
(unregistered)
|
THIS IS TDWTF!!! /kicks TheSHEEEP into a bottomless pit |
I don't get it. Why would you want to mace someone for cancelling a job? |
|
The real WTF...
The code will cause a NullPointerException... params.get(sub.getParentField().toLowerCase()).getValue().equalsIgnoreCase(sub.getReplaceOn())is FOLLOWED by tests as to whether it exists. The clearer? form:
|
|
Suggestions, then.
Training: "See how many things you can find wrong with this code." Or: "The MD is a stand-up comedian in his other life and he needs some material." Or: "We need to hide the fact from the big bad headhunters that we have talent here, so we give them examples of stuff like this that will make them pass over us like a predator mistaking potential food for non-nutritious dead vegetation." |
Oh, *that* ctl-c...I'd wondered why y'all were wanting to spray them for force-killing a foreground job... |
|
To be fair, I once worked with a chap who solely used the Edit->Copy/Edit->Replace mouse-only method of C&P. It was kind of surreal watching him work, because he used it pretty much exclusively. You'd end up with one of those cobbled together applications that happens to send welcome emails (per the original requirement), and also do pretty much anything else you'd ever want it to in the other few thousand lines.
|
Sorry- my last post was in response to this. I suck at forums. |
It serves as a warning to others. |
Re: The Other If
2010-11-11 10:04
•
by
anonymous
(unregistered)
|
|
[quote user="wtf"]
++1[/quote] Damn you, now 1==2 and math's all screwed up. Someone call Russell and Whitehead in, we need to reboot.[/quote] You're an idiot. If anything, that's going to increment the value at memory location 1... not the value of one. int* i = 1; ++*i; |
Re: The Other If
2010-11-11 10:06
•
by
tovarich
(unregistered)
|
They could be using Mono, but for some reason I doubt the person(s) responsible for that code works on a *nix system. |
Re: The Other If
2010-11-11 10:08
•
by
Bryan the K
(unregistered)
|
C-C-C-C-Combo BREAKER |
Wow, someone got up on the stupid side of the bed this morning. |
This isn't even close to an if-ten, it's an if-seven at most. |
Clearly, your sense of linguistic sarcasm never developed. |
|
WTF (Why TF not so much as What TF) would anyone apply full text justification to code?
|
Re: The Other If
2010-11-11 10:21
•
by
BlueCollarAstronaut
(unregistered)
|
So, TRWTF is using tabs instead of spaces as well as both using "spaces" instead of "tabs" and "tabs" instead of "spaces"? This is becoming paradoxical... |
|
fixed?
|
|
For readability:
if ( Forgive my ignorance, but does the !"".equals() actually do anything useful? |
|
No, this is SPARTAAAAAAAAAAAAA!
|
I love this board. So much understanding of humour, irony, and any small mistakes are completely overlooked. No one here would ever try to argue with each other to prove they are more correct that everyone else. It is truly the oasis in the middle of an Aspergers desert. |
TRWTF is using spaces (http://www.retas.de/thomas/computer/programs/useless/misc/game_of_life/index.html). |
Re: The Other If
2010-11-11 10:37
•
by
Anonymous
(unregistered)
|
Thanks a lot, I just terminated a batch file and now I'm blind. |
|
So... requirements are:
1) The parent field must be non-null. 2) The field name must be non-null. 3) (The replace field must be an asterix and the field Name must not be blank) or (the replace field must have the same value as the parent field). It's pretty clear that they messed up the code, and after a quick look it is equally clear that they messed up the requirements. I do however appreciate the use of 'equalsIgnoreCase' just in case the 'toLowerCase' fails. |
Ohithere! You must be the new guy... |
Thank you for these rules. I have printed them out and taped them to my cube. I promise to follow them until I die or until one of my coworkers wires pepper spray to my keyboard. |
Re: The Other If
2010-11-11 10:46
•
by
Anonymous
(unregistered)
|
It will return "false" if the parameter passed into equals() is not an empty string. This is the retarded equivalent of doing ((param != null) && !param.equals("")). They've done !"".equals(param) because this means they don't have to null-check the parameter (instead they are calling equals on a new empty string and passing the param into that, so it doesn't matter if param is null). |
That is why I will make my Aspy son read TDWTF as an example of how adults communicate. Nothing like positive reinforcement. |
Re: The Other If
2010-11-11 10:59
•
by
Billy The Squid
(unregistered)
|
What of Shift+Delete / Control+Insert / Shift+Insert? Flying puppies that shit green M&M's fly from the wall to deliver gifts of canned walrus meat? |
Want that. |
|
"*".equalsIgnoreCase(sub.getReplaceOn())
This right here is an argument in favour of short function names like strcmp/stricmp. It wouldn't look so ridiculous if the superfluous 'do this check case insensitively' added only a single character to the line, although it's still superfluous in run-time cost (probably not an issue here as it seems to be in response to UI action). But seriously dude, didn't your mother ever tell you about temporary variables? |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Next » |