2 ms·
(edit: artmageddon beat me to the punch below.) What I found most depressing about this post were the comments. Yes, it's bad code. But just declaring that i
by dlytle 15y ago
(edit: artmageddon beat me to the punch below.)
What I found most depressing about this post were the comments. Yes, it's bad code. But just declaring that it's bad code isn't at all productive.
What would be useful is a breakdown of where problems exist, even in brief, and what the problem was; pointing out where it fails in each area. That would be a potential learning/teaching tool. Right now, it's just an easily forgotten "WTF" that more experienced coders can use to feel good about themselves.
- brendn 15y agoI don't know if you're disappointed that some comments were stating the obvious (the code stinks) or that all the more experienced coders joined in on the pile-on. I agree that it would be nice if the OP took the time to deconstruct the example and explain why some of the coding practices are bad. Then again, some of the comments do explain why it's bad code. Seeing comments like the one below, however, makes me wish there were enough time in the world to educate beginner programmers (and that they'd all give a darn about avoiding problems like this). > Hm... I like this code. All the stuff is combined together in one place.