PDA

View Full Version : xkcd Cartoon: How To Write Good Code




dejo
Jan 7, 2011, 11:32 AM
For a little levity in what is normally a fairly serious forum:

http://imgs.xkcd.com/comics/good_code.png

http://xkcd.com/844/



balamw
Jan 7, 2011, 06:56 PM
Reminds me of the old classic "Problem Solving Flowchart" http://dangerousintersection.org/2008/05/17/problem-solving-flow-chart/

B

robbieduncan
Jan 8, 2011, 04:10 AM
It's funny because it's true (http://www.youtube.com/watch?v=8DYje57V_BY)

(marc)
Jan 8, 2011, 09:11 AM
Haha, xkcd is priceless! :D And it happens to me every day...

firewood
Jan 8, 2011, 10:41 AM
What's missing is statefulness.

If you code well after coding fast, and learn from your prototypes, you might be able to finish before obsolescence.

It's called "Throw the first one out".

... maybe the first several. A programmer will make mistakes. You can't fix stuff until you make the mistakes, so you might as well make mistakes (in the general direction of the spec) as fast as possible. What you might learn from the hacked up early versions is how wrong the specs are when you actually play with the app, and what parts you might need to code well to finish.

Then rewrite (and rinse and repeat).