5 ms·
Code Complete was my first book on engineering (the first edition). Even though the coding examples were in Ada and Pascal, I ate it up. It provides a lot of u
by msg 13y ago
Code Complete was my first book on engineering (the first edition). Even though the coding examples were in Ada and Pascal, I ate it up.
It provides a lot of useful mental approaches to programming, and the reasons to code something one way or another. If it's long winded, that's a consequence of its being a comprehensive survey. Certainly, as a software engineering textbook, it has no peer.
- RogerL 13y agoSame here (ate it up). We bought the 2nd edition as a library book here at work recently. I couldn't get into it at all. I wonder if there is a qualitative difference between the editions, or if perhaps I internalized the first book enough that the 2nd edition just didn't capture my interest in the same way. But, in case the article has you doubting the value of the book, I found it to be tremendous. With every line I write I have all of the ideas in that book running through my head. Take a simple example. Braces on the same line or next line? Well, to me the answer is clearly same line (I used to prefer next line, until Code Complete, btw, I am not just using the book to justify a random preference). Why same line? Because studies show that as soon as you need to scroll a window to see all of your function, bugs go up and comprehension goes down. So, by putting the braces on the same line I can sometimes significantly improve vertical density, and thus improve the code reading experience. I do not intend a brace war - please don't start one. The point is that we can use empirical studies to guide how we code. Not just layout issues, but how we name variables, how we enter and exit loops, how we break things into functions, and so on. I cannot overstate how much I value the book and the ideas contained within it. If it was up to me (and, it's not) every programmer in this company would have a copy on their desk, and would be expected to either follow it or have a good reason for not following it (and there are good reasons sometimes - no rule is cast in stone). Get the book. Learn the book. It will make you better.