- 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
You, sir, win the internets. That was downright hilarious.
(and to you people without a sense of humor - I'd joke about it, but you wouldn't get it anyway)
Admin
The problem I have with this is your assumption that your programmers are going to screw up things as commonplace as logical intersections and unions, and building an entire system of inefficient, inappropriate code structures around it. My solution to a programmer who worries me that he won't be able to evaluate X = (A and B) or (C or D) and E is to replace the programmer, not the program.
The correct answer is whatever form of the code does NOT have that co-worker working on it. Which points to the solution for the whole problem.
If Microsoft had this problem on the Windows team, we would all be using Macs, because Windows would be slower than molasses. Clarity in your code, besides being slightly subjective, is not an absolute end in and of itself but must be balanced with other considerations.
Just reflect on what you are defending here:
... an anti-pattern for a reason.
Admin
Admin
True that! That was absolutely hilarious!
Admin
This comment is absolutely DailyWTF-worthy.
Admin
I think that's great. I thought that was great. That's great. That was great.
Admin
i feel like your comment was generated with this code
Admin
Please post whoever was crazy enough to hire you, so that I know never to work there...
Admin
Admin
I see what you did ther.
Admin
I get jokes.
Admin
pmsl at last comment... lulz
Admin
Where is the WTF? I can see it plainly.
Okay, your comment was sort of unclear and repetitive so I'll try my best to help.
Shouldn't coding be as small as possible to optimize performance? Eg: If 5000 lines of code will do, why write 6000?
Your comment was a little repetive and unclear. Where is the WTF? I can see it plainly.
There isn't a issue with the code. However, it doesn't follow the proper programmer's guidelines.
Again, your comment was a little repetitive.
Copying and pasting code is encouraged but when it is used without understanding it fully, it becomes clutter.
So why write more code than you need.
But what happens when you need to clean up the code? Everything needs /* to be redone */ almost redone.
Where is the WTF? I can see it plainly.
I completely disagree that repititious code isn't cluttered. What happens when you need to unrepetidize it?
AGain, your comment was unclear
Admin
The "for" loop that only does anything for value 0 doesn't bother you?
Admin
In other words, the coder is wearing seven pairs of pants (each with holes in different places) to cover his behind.
Admin
Admin
I wonder if the submitted understands JavaScript function parameters.
function OpenWindowToReports (address, height, width) { //var features = "height=" + height + ",width=" + width; var features = "height=640,width=480"; address = (address == null ? "http://server/reports.aspx" : address); return window.open(address, null, features); }
This allows specific caller-level overrides while also preserving the option of making changes in only one place.
Admin
Ever heard of ... (gasp) ... umm... (>.>) ... uh... regular expressions?
Admin
Hopefully you aren't serious, or hopefully you aren't the programmer that actually coded that. Just look at that "for" statement. LOOK!
Admin
how about setting a return statement in a for loop(which is always reached) it's like they expected it to return without breaking the for loop
and @anonymously yours: why do you state the same thing 9 times
Admin
failage comment from me, forgot what the for loop looked like still, pointless to make an if(i = 1 || i = 2 .....|| i = 9){nop} statement(besides, continue; should give an error, because as far as i know it's not a function, but that might just be me)
Admin
Are you serious? Did you see the for loop?
Admin
^ Amazing