Is the "Clean Code ..." book targetted on Java programmers only? Or does it cover multiple languages. I browsed through the book "Beautiful code" by Andy Oram and Greg Wilson in a bookstore recently. I decided not to buy it, because it covered multiple languages and therefore the majority of code examples was in another language than Java. I think that reduces the usefulness of a book, since chances are little that one knows all languages well...
Whether it's using only java or multiple languages, the book is about best practices to write clean code in general, which can be used in any language. As for the code used in the book, I believe that it's java, since the examples in the preview on the Prentice Hall Safari website are in java, and there sections on java proxies, java AOP frameworks, AspectJ, JUnit, etc.
Mhh, I think the intentions of the two books are quite different. "Beautiful Code" seems to be a bit more "philosophical" to me. Having a wide range of different languages actually might have value in that case. And, frankly, as an experienced developer, being able to at least roughly understand a foreign programming language, to the amount that you are able to perceive its beauty, should be quite possible.
For a more practical book like Uncle Bob's, it might actually make sense to concentrate on one language, I guess.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Bart Kummel
author
Ranch Hand
Joined: Nov 30, 2007
Posts: 81
posted
0
Hi guys! It's great that you share your assumptions. But I hope uncle Bob can give a definitive answer to the question. (BTW: I agree with you about this book looking more pragmatic as opposed to "beautiful code", which seems more theoretical.)
Jeff Langr
author
Ranch Hand
Joined: May 14, 2003
Posts: 758
posted
0
Since Bob is trying to catch up (and since I contributed a couple chapters)...
The book is indeed all Java, the lowest common denominator (which of course represents the larger audience). While the concepts generally apply to all languages, there are a few things that are fairly specific to Java. There is a *lot* of Java code.
I always thought McConnell should have produced "Code Complete for Java," "Code Complete for C++," and so on. Maybe Uncle Bob or someone else will produce Clean Code for Ruby and other languages.
Thanks, Jeff! The book sounds very interesting. If I don't win it here, I think I will buy it!
Robert Martin
Author
Ranch Hand
Joined: Jul 02, 2003
Posts: 76
posted
0
Originally posted by Bart Kummel: Is the "Clean Code ..." book targetted on Java programmers only? Or does it cover multiple languages. I browsed through the book "Beautiful code" by Andy Oram and Greg Wilson in a bookstore recently. I decided not to buy it, because it covered multiple languages and therefore the majority of code examples was in another language than Java. I think that reduces the usefulness of a book, since chances are little that one knows all languages well...
All the examples are in Java, and the book's primary audience is Java programmers. That's not to say that programmers of other languages won't benefit from it -- they will!
---<br />Uncle Bob.
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Originally posted by Robert Martin:
All the examples are in Java, and the book's primary audience is Java programmers. That's not to say that programmers of other languages won't benefit from it -- they will!
I'm sure they will. I remember having learned quite some bit from "Smalltalk Best Practice Patterns", although I've never programmed in Smalltalk (well, at least not more than a few lines of code, anyway).
Remko Strating
Ranch Hand
Joined: Dec 28, 2006
Posts: 893
posted
0
Sounds interesting a book for clean code for Java only. How does this relate a Agile? With every method of working you want to have clean code?
Originally posted by Remko Strating: Sounds interesting a book for clean code for Java only. How does this relate a Agile? With every method of working you want to have clean code?
Thanks for your reaction. I understand that clean code is not necessary related to agile programming in your book. Mostly I work agile with my customers, because we don't know how the business will develop in time and I use simple examples of my code for showing how it will work. I will buy your book, because it will help me to develop better code.