Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What's the best book about coding conventions (and perhaps design patterns), that you highly recommend (at best code samples in Python, C++ or Java)?

It would be good, if the book (or just another) also covers the topics project management and agile software development if appropriate (for example how projects fail through spaghetti code).

I will accept the answer with the book(s) (maximum two books per answer, please), that looks the most interesting, because the reading might take a while :)

share|improve this question
3  
Coding Conventions would be better observed in actual code. Which open source projects interest you? Why not use them as examples? – S.Lott Mar 18 '11 at 12:09
S.Lott, This way would be great for learning a language, but not so effective for learning standards. These books listed below such as Code Complete are accepted by the majority of programmers to date. Thus, I feel it would be wise to at least skim through them so you can hold your own if an argument over methodology or style should arise. – chrisw Mar 18 '11 at 17:19
I'd strongly suggest picking a language, or maybe a few languages. – David Thornley Mar 18 '11 at 20:21

closed as not constructive by Mark Trapp Dec 8 '11 at 4:29

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

8 Answers

up vote 24 down vote accepted

Code complete, Second Edition

From Wikipedia:

Code Complete is a software development book, written by Steve McConnell and published by Microsoft Press, urging developers to get past code and fix programming and the "big design up front" waterfall model. It is also a compendium of software construction techniques, from naming variables to deciding when to write a subroutine.

share|improve this answer
1  
Good call, but you definitely want the second edition, it's practically a complete rewrite. – Paddyslacker Mar 18 '11 at 18:14
1  
@Paddy I have added that. – Matěj Zábský Mar 18 '11 at 18:42
+1 One of the few subjective programming questions with an objectively correct answer. – CodexArcanum Mar 18 '11 at 19:50

For java - Sun Java Coding Conventions

Its not a book. But its worth reading.

share|improve this answer
It's not "language-agnostic" either. – Johnsyweb Mar 18 '11 at 11:47
2  
@Johnsyweb: Coding conventions cannot possibly be language agnostic. – S.Lott Mar 18 '11 at 12:09
I think they can be if they don't always refer to problems in only a specific language but rather in a more general way. But after all, there have to be code samples in one programming language. – Joschua Mar 18 '11 at 12:23
1  
@Joschua: "if they don't always refer to problems in only a specific language"? But the syntax is different, and the various expectations for the languages are different. Python and Java, for example, have diametrically opposed ways to handle function argument signatures. A single book can't cover both without so many exceptions and special cases that it would be two separate books mashed into one set of cover pages. – S.Lott Mar 18 '11 at 14:07
@S.Lott: I have to admit, that such a book would be a fail. (I will remove the language-agnostic-tag) – Joschua Mar 18 '11 at 15:26
show 8 more comments

Clean Code might be what you are looking for. It's a quite detailed book that covers things such as how to write clean code (duh), using good naming, formatting code better, transforming bad code into good code, and so on.

share|improve this answer

I cannot recommend "Uncle" Bob Martin's Clean Code enough as a guide to how to write good, clean code. Clean Code Cover, Amazon

Then there is the Gof book: Design patterns : elements of reusable object-oriented software. Another must-read for any software engineer.

share|improve this answer
2  
A language-specific book that I'd recommend is C++ Coding Standards by Herb Sutter and Andrei Alexandrescu, but that's an aside. – Johnsyweb Mar 18 '11 at 11:51
1  
+1 A classic, even if some views of Uncle Bob are a little bit radical and subjective. – Oliver Weiler Mar 18 '11 at 13:04
2  
Subjective - fits right in here then! Clean code is fully of fantastic advice that can be applied to just about any language. – Paddyslacker Mar 18 '11 at 18:16

As others have said, Code Complete. Also, for design patterns, you may want to try Head First Design Patterns as a great introductory read.

share|improve this answer

C++ Coding Standards: 101 Rules, Guidelines, and Best Practices is quite good (for C++, of course).

share|improve this answer

For C++, I like C++ Coding Standards by Herb Sutter and Andrei Alexandrescu. Most of the topics covered in Effective C++ by Scott Meyers are also worth incorporating into a C++ coding standard.

share|improve this answer

For Lisp, I'd strongly recommend Peter Norvig's Principles of Artificial Intelligence Programming. Despite the name, it's a great resource on writing industrial-strength Common Lisp.

For Forth, I think Leo Brodie's Thinking Forth is the best. It's certainly the best I've seen.

share|improve this answer
Did you mean "Paradigms" instead of "Principles" for the first book ? amazon.com/… – Matthieu Nov 22 '11 at 16:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.