I love these types of articles.
What's wrong with this code, really?
201–210 of 217 posts
Re: What's wrong with this code, really?
#202Would love to see more articles like this.
Re: What's wrong with this code, really?
#203Cool analysis.
Re: What's wrong with this code, really?
#204Oh god I hope I never wrote code like taht when I first started out.
Re: What's wrong with this code, really?
#205It makes me recoil in horror.
Re: What's wrong with this code, really?
#206Excellent writeup.
Re: What's wrong with this code, really?
#207Seeing code like this almost makes me want to give up programming.
Re: What's wrong with this code, really?
#208Maybe there should be a competition to see who can write the worst piece of code. :)
Re: What's wrong with this code, really?
#209Very well written analysis.
Re: What's wrong with this code, really?
#210The article's point about writing code that does what it says it does is fine. But as an interview question, I have trouble imagining that candidates won't figure out that this is a game of "guess the answer I'm looking for" and say that they would rewrite this code. A better question would be, there's tremendous deadline pressure, the company is in imminent danger of losing a giant deal if we don't have working code…
The correct answer is "This code looks ugly, and bad".
Couldn't have said it better.