File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Cor Takken
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Robert Martin
Author
Ranch Hand
Posts: 76
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. ;-)
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow I have never thought about it that way. Makes absolute sense to me...
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes a lot of sense to me too
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic