

How to write "Pretty Code"? - iloveprettycode

I'm looking for books, guides, tutorials to "beautiful code". I'm looking to improve my programming style with better variable name choices, comments, and white space usage. I'd like to learn reasons why certain bracket placement is advantageous to others, or why 2 space indents are better than 4 and so forth. I realize that some of these issues may be language dependent, but there are some general rules to follow.<p>The only book I've come across regarding this is the Kernighan and Plauger's "The Elements of Programming Style". However it's a bit outdated.
======
DanielStraight
Two words: Code Complete.

[http://www.amazon.com/Code-Complete-Practical-Handbook-
Const...](http://www.amazon.com/Code-Complete-Practical-Handbook-
Construction/dp/0735619670)

------
mooism2
Most of what is written on this topic is essentially opinion and not fact.

In that spirit, this is an article worth reading and thinking about:
<http://www.joelonsoftware.com/articles/Wrong.html>

------
nimmen
i read some great book about similar things you looking for, but forgot its
name :/ [http://www.amazon.com/Code-Craft-Practice-Writing-
Excellent/...](http://www.amazon.com/Code-Craft-Practice-Writing-
Excellent/dp/1593271190) this one might be it, but i dont remember now as i
dont have that book near me

