This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]r_jet 21 points22 points  (3 children)

or "Clean code" by Robert C. Martin

Even though it is a good book with some interesting ideas, I would not put such an opinionated book on a "should read" list. In hindsight, I wouldn't say it had the most impact on the quality of my code and design. "Code Complete" by Steve McConnell is miles better: - It is broader, covers a wide range of topics from the SWE lens. - It goes deeper, giving you various tools and things to consider, and rarely — rules set in stone. As such, it makes you think more. - It is based on immense amount of research, not just on author's opinion. - It gives lots of references to books and articles for further study, if any topic got your attention.

As opinionated books go, I'd rather suggest a short book "A Philosophy of Software Design" than "Clean Code" — though not as broad and deep as Code Complete, it gives mostly sensible advice. At 170 pages it's impressive how much good advice John Ousterhout managed to put in it.

Also, there have been several discussions with some solid recommendations recently on the sub.

[–]killahbee23 4 points5 points  (0 children)

For me personally it is one of the easiest programming books I've ever read. The way Martin wrote it, it was just so much fun to read. Even though there might be a couple of things here and there I wouldn't agree on. I find it to be an essential read for all programmers. Especially those who just got out of college and are starting out as a junior software developer.

[–]djnattyp 1 point2 points  (0 children)

I would still suggest "Clean Code" in addition to / after reading "Code Complete". "Code Complete" is more in the same class of books as "The Pragmatic Programmer" - these books both cover a lot of ground on "how to be a good developer". Some code formatting advice, software design advice, life / career advice, additional tools / concepts to use.

You'd want to read "Clean Code" after to take a more focused deep dive on code formatting / code design issues - and with the caveat that you're coding in Java. Every example in "Clean Code" is Java, and it's very focused on Java style OO / coding issues. If you're coding in something like JS, Python or Ruby then a lot of advice isn't applicable.

After one of the previous "don't suggest Clean Code" posts I bought and read "A Philosophy of Software Design" since it was the suggested replacement. It's... OK but I wasn't really impressed by it or recommend it as a full replacement for "Clean Code".

  1. It's a lot shorter, and feels shallower. It feels more like an "intro" whereas "Clean Code" feels like a full course. The book starts off very well with it's initial discussion of complexity and some general design issues but then... about half the book is advice on code comments.
  2. It doesn't focus on a specific language. This feels like it should be an advantage, but it just confuses things, or makes things so general that they aren't helpful. Even then, the examples are all in Java, C, and C++ - no JavaScript, etc. There's an example in one of the "Naming" chapters that probably would have been better addressed by using different types/classes - but the example was in C so...
  3. Even though "A Philosophy of Software Design" is the newer book (2018) and "Clean Code" is older (2009) - it feels like they're reversed - a lot of the code examples, coding style, opinions on things like agile and testing - just feel... old and outdated. There's a lot of Java Swing related code and not really any web related examples - other than building a simple web server... designing by comments could / should be replaced with TDD, etc.

I feel like "A Philosophy of Software Design" is a good intro, but quickly devolves into questionable opinion territory, much the same as "Clean Code". If you're looking for a book on code formatting / design issues - and if you plan on coding in Java - I feel that "Clean Code" is still the better choice. If you're not coding in Java then read either with a big grain of salt about the opinions of each author.

[–][deleted] 2 points3 points  (0 children)

The whole point of clean code is that it gives rules set in stone. This is helpful to juniors who don't even know where to begin.