- 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
A Perfect 1st? No of course there's no such thing.
Admin
I second that.
Admin
Ummm... So... That code is a steaming third?
Admin
http://en.wikipedia.org/wiki/Loop_unrolling anyone?
Admin
Just plead the fifth.
Admin
something something sixth.
Admin
Doubtfull, it seems illogical to think that developers who are not aware of the existence of arrays to do compilation optimizations in bloody javascript!
Seems like plain old Copypasteware again
Admin
Every time I see repetitive JavaScript here, I wonder whether it's been generated. Something like this seems a perfect example of server-side code running through a list of keys and simply stamping out the same template. Ditto for yesterday's post.
Admin
what is 1st? Perhaps you meant frist?
Admin
My bet is today's was run through an obfuscator.
Admin
My hope is that is indeed true.
Admin
hmm guess they had to code first "if(index == 0" and the rest "else if(index ==" :smile:
Admin
Admin
Technically it was a frist - we normally have a few of the more observant members of our community ( :rolleyes: ) post before the thread is unhidden:
[image]And no - that Joke Badge isn't getting awarded to #10, since #7 technically broke it, and they're not getting it either...
Admin
Looks more like a code generator was the source of this code.
Admin
Still... The Goggles! They do nothing!
Admin
Is "code generator" some new slang for "clueless codemonkey" :interrobang:
If so, yes.
Admin
It's more of a Venn diagram.
Admin
TRWTF is that even if you haven't heard of any of those things the article mentions, there's still no excuse for writing the code like this. Use the unrolled loop to set the bits that vary, and then have the rest of the code once rather than repeating it for each value.
Though anyone who hasn't at least heard of loops really ought not be writing code at all.