Clear. Consistent. Correct.
purchase books through Program with Style

The syntax of a programming language tells you what code it is possible to write-what a computer can understand. Style tells you what you ought to write what humans will understand.

Code written with a consistent, readable style is robust, maintainable, and contains fewer bugs. Code written with no regard for style, or with a warped style, contains more defects, leads to more problems, and is more likely to be thrown away rather than supported and extended.

Many style guidelines are language-specific. But the principles are shared. Be clear. Be consistent. Keep it simple. And especially, avoid write-only code.

Do you have better books or links?
Send your ideas to .

General Style Guides

Code Complete: A Practical Handbook of Software Construction, Second Edition
Code Complete: A Practical Handbook of Software Construction, Second Edition
Tom Cargill, 1992
Widely considered one of the best practical guides to programming, Steve McConnell's original CODE COMPLETE has been helping developers write better software for more than a decade.
"Easily the best book on software development. The information is described clearly and the examples highlight the message. Many supporting references validate the author's observations and conclusions."
Refactoring: Improving the Design of Existing Code
Refactoring: Improving the Design of Existing Code
Martin Fowler, 1999
Refactoring is about improving the design of existing code. This book offers a thorough discussion of the principles of refactoring, including where to spot opportunities for refactoring, and how to set up the required tests.
"Great examples, very well explained."
"Essential reading for professional programmers."
Scientific software
Writing Scientific Software: A Guide to Good Style
Suely Oliveira, 2006
This style guide for numerical software points out good practices to follow, and pitfalls to avoid. By following the advice, readers will learn how to write efficient software, and how to test it for bugs, accuracy and performance.
"The chapter titles are a good summary of its contents: basics of computer organization, software design, data structures, design for testing and debugging, global vs. local optimization, memory bugs and leaks, Unix tools, and so on. "

Useful Links