• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clean Code: Java only?

 
Bart Kummel
author
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 799
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Jeff
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 893
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


See http://www.coderanch.com/t/131128/Agile/Clean-Code-Handbook-Agile-Software
 
Remko Strating
Ranch Hand
Posts: 893
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic