aspose file tools*
The moose likes Agile and Other Processes and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark ""Clean Code: A Handbook of Agile Software Craftsmanship", why Agile?" Watch ""Clean Code: A Handbook of Agile Software Craftsmanship", why Agile?" New topic
Author

"Clean Code: A Handbook of Agile Software Craftsmanship", why Agile?

Cor Takken
Ranch Hand

Joined: May 21, 2007
Posts: 58
The question I have is not "Why use Agile", in my view Agile methods are just a group of means how to develop. The title of your book suggests that clean coding is not present, found or hard to achieve in Agile projects. Is it not true that the same rules that you have written down in your book are also applicable in development methods other than Agile methods? Clean coding is as important in RUP or even in ye olde waterphall methods. Clean coding is a necessity and should in my view not be tightly related to a development method as such. The craftsmanship of coding requires clean coding in whatever methodology one finds oneself.

Could you please tell me why my reasoning is incorrect?


SCJP 1.5
Dolphins are grey, but they dream in colour.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I'd actually say that clean code *is* more important in Agile development, because it is a vital prerequisite for the required flexibility.

On the other hand, I would argue that clean code generally makes your code more agile, no matter whether you are using an Agile approach or not.


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
Jeff Langr
author
Ranch Hand

Joined: May 14, 2003
Posts: 762
What Ilja said (as always).

To successfully be agile, your code must be of higher quality and maintain a clean design than in waterfall. Short iterations will only exacerbate the effect of poorly constructed code. Also, to successfully execute to agile, you need to collaborate on stories (i.e. not work in silos); to be effective at this the code must be clean. And so on. The best tool is pairing.

Jeff


Books: Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Robert Martin
Author
Ranch Hand

Joined: Jul 02, 2003
Posts: 76
Originally posted by Cor Takken:
The question I have is not "Why use Agile", in my view Agile methods are just a group of means how to develop. The title of your book suggests that clean coding is not present, found or hard to achieve in Agile projects. Is it not true that the same rules that you have written down in your book are also applicable in development methods other than Agile methods? Clean coding is as important in RUP or even in ye olde waterphall methods. Clean coding is a necessity and should in my view not be tightly related to a development method as such. The craftsmanship of coding requires clean coding in whatever methodology one finds oneself.

Could you please tell me why my reasoning is incorrect?


I completely agree that clean code should be a professional standard for every different methodology.

...However, to get clean code one absolutely must practice refactoring. You simply will not write clean code the first time. To get clean code you have to go back and refactor the code into a clean state.

...However, you cannot practice refactoring effectively if you don't have a suite of automated unit tests with close to 100% coverage. Without those tests the act of refactoring is fraught with risk that few sane developers would accept.

...However, it's virtually impossible to get a comprehensive suite of automated unit tests with close to 100% coverage unless you practice Test Driven Development. Without the discipline of writing your tests first, is is very hard to get your code to have a testable design. Without that design you have to compromise on the unit tests your write, which compromises coverage.

So, I would say that clean code is possible in any methodology that demands continuous refactoring and Test Driven Development. I could go on to describe why those disciplines also require short iterations, but I'll leave that as an exercise for the reader. ;-)


---<br />Uncle Bob.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Somehow I have never thought about it that way. Makes absolute sense to me...
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
Makes a lot of sense to me too


Visit my blog: http://jnassef.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Clean Code: A Handbook of Agile Software Craftsmanship", why Agile?