Page 1 of 1

Programming advice NOT to follow

Posted: Tue Jun 12, 2007 7:08 pm
by aaronhall
Pulled this off of reddit today -- a top ten list of common programming practices that the author thinks we ought not necessarily follow. I found a couple of the items interesting, and besides that, I thought we could get a nice little flame war going here on at least a few of the points :wink:

http://www.chrylers.com/top-ten-of-prog ... not-follow

Posted: Tue Jun 12, 2007 8:43 pm
by superdezign
:lol: I hate top ten lists because, oftentimes, they are written by random people who claim to be "experts." Almost any top ten list that I see online is extremely objective and shows little research -- just their personal experience.

Howeeever..

I like this one. Not everything, but number 1, 2, and 6 in particular.

1) Design first, then code.
I agree. When I code, I hate the plan it out first. I'm fine with planning out a website layout before writing the CSS and HTML, and I'm fine with drawing out storyboards before animating. However, when programming, this doesn't work. Every once in a while, I may stop programming and write afew notes on how I feel classes should communicate, but those notes are never more than three lines in Notepad.
When you're not coding, you're wasting time thinking. :-p

2) Code everything early.
Well, thats the summary of it. I agree that oftentimes, I'll be writing a class and simply don't feel like writing out every function. Sure, it will be able to do a whole lot more things, but for now, it isn't. I need the classes to be able to interact for the function I need to test, and thats it. I add the rest as I need it. I'm not developing for a community, and even then, the developers add things as they see fit.

6) Write lots of comments.
Oh, sooo agreed. I compared code with comments only on long pieces code with code that had comments on every single function and different operation, and gahh. Less comments are cleaner than too many. Code is more graceful than English, IMO, and comments only server to shorten the "skimming" process. ^_^

Posted: Wed Jun 13, 2007 12:30 am
by matthijs
superdezign wrote::lol: I hate top ten lists because, oftentimes, they are written by random people who claim to be "experts." Almost any top ten list that I see online is extremely objective and shows little research -- just their personal experience.
I'm sure you meant subjective :)