4 ms·
How to write "Pretty Code"?
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.
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.
- nimmen 15y agoi read some great book about similar things you looking for, but forgot its name :/ http://www.amazon.com/Code-Craft-Practice-Writing-Excellent/dp/1593271190 http://www.amazon.com/Code-Craft-Practice-Writing-Excellent/... this one might be it, but i dont remember now as i dont have that book near me
- DanielStraight 15y agoTwo words: Code Complete. http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670 http://www.amazon.com/Code-Complete-Practical-Handbook-Const...
- mooism2 15y agoMost 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 http://www.joelonsoftware.com/articles/Wrong.html