Bits 'n Widgets
Thoughts on real-world, practical, common-sense approaches to Agile software development using Scrum and XP
Thursday, July 10, 2008
« Truck Count
|
Main
|
Artifact, Cause, and Resolution »
Agile Software Design, Refactoring, and Warts
First off, let's get something out in the open. As an agile software developer, I have a couple of strongly held beliefs.
Design isn't optional.
Architecture isn't optional.
DTSTTCPW doesn't mean "no up-front design, we'll just wing it." [That's DO THE SIMPLEST THING THAT COULD POSSIBLY WORK for all y'all who don't speak acronym.]
When we fail to refactor our new code into the existing code, we get odd bits of functionality that stick out from the existing design like warts on a bowling ball. The idea behind refactoring is that we intend to make sure that we *always* have a round ball. Refactor doesn't mean just change a signature or two. Sometimes it means we need to go back to the design white board and figure out what we need to have *now* given the current functionality requirements. We almost always need to change the existing code's design and integrate the new code so that all appears cohesive, each and every time we write new code. Iterative development doesn't intend that we make a bunch of atomic changes and just glue them together.
Code design at each check-in should be able to withstand scrutiny of any outside reviewer, and the design should be up to engineering standards. We still call it software *engineering* not software *art*. Many teams I see are missing this point completely and are producing code that should have been re-designed rather than just having new code glued on. With each check-in we should be able to look over our classes and functionality and say, "yes, this is something that would withstand the scrutiny of a code reviewer not on my team, without excuses or explanation." If I have to couch it and say "well, we will be fixing that in the next release" or "we'll revise that in a later check-in" this is technical debt, and therefore a process smell. Developers that are stuck in this rut need to be re-trained that they aren't "done" with the code until it is production-quality.
If there are warts on your software, this is a very loud process smell, and it should be addressed directly. Make sure that the team understands that this is not an acceptable way to work on an agile team. Re-design in refactoring and adding new code should be common, and discussed among the team after the stand-up meeting daily. "Yesterday I re-factored and re-engineered the Widget classes, so that they now have the new functionality we need in story XXX and are more streamlined to what we are delivering this sprint. Today I plan to have a half-hour review with the team so everyone is on the same page with the re-design. Then I will incorporate all the feedback, get the final code reviewed and coordinate the check-in with the rest of the team to make sure I don't block anyone. I'll make the appointment for the review with everyone after the stand-up."
Make sure that everyone understands that the code as a whole should be well-designed at each commit point, and that this isn't optional. It needs to be expected behavior on the team. This also means that estimation of effort may (and should) go up, for complexity on tasks in both story points and hours. We don't look at revising design as "additional work" just like we don't view unit tests as "additional work." These things are both fundamental parts of the iterative process. Without adhering to these principles, iterative development just won't work, and we might as well go back to waterfall.
If your team has the process smell of needing to budget additional work for refactoring the design, perhaps it's time to go to the team and discuss what Agile software development really means, and that it doesn't mean lower-engineering quality software.
Design
|
Refactoring
|
Team
Thursday, July 10, 2008 7:18:51 AM (Pacific Standard Time, UTC-08:00)
Disclaimer
|
Comments [0]
|
Trackback
Related posts:
Pair Programming - A Guideline
Preferences User Story
Automated Acceptance Tests - Who Should Write Them, Dev or QA?
Become a Certified Agile Developer!
#region is a Code Smell.
Truck Count
Comments are closed.
On this page....
Archives
<
November 2008
>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
6
October, 2008 (1)
September, 2008 (4)
August, 2008 (4)
July, 2008 (4)
June, 2008 (2)
May, 2008 (7)
April, 2008 (3)
March, 2008 (1)
Total Posts: 25
This Year: 25
This Month: 0
This Week: 0
Comments: 7
Search
Navigation
Agile FAQ
Agile Alliance
Agile Manifesto
Extreme Programming
Test Driven Developer
Test Driven Development, Defined (Wikipedia)
Test Driven Design
Test-Driven.com - Agile development tools
NUnit
Book: Test-Driven Development in Microsoft .NET
CodeProject - Advanced Unit Testing: Unit Test Patterns
John Boal's Personal Blog
John Boal's Agile Development Blog
Tags
ABN (3)
Acceptance Testing (2)
bugs (2)
Design (3)
DSL (1)
Refactoring (1)
scrum (8)
Security (2)
source control (1)
TDD (3)
Team (9)
testing (5)
User Interface (1)
Categories
ABN
Acceptance Testing
bugs
Design
DSL
Refactoring
scrum
Security
source control
TDD
Team
testing
User Interface
Blogroll
#2782
Ade Miller's Tech Blog
Agile Development
Mitch Lacey's Agile Development Blog
Agile FAQ
Frequently Asked Agile Questions - Vibhu's Blog
Espresso Fueled Agile Development
Mike Puleio's Blog
Geek Noise
Noise de Peter Provost
About
© Copyright 2008, John E. Boal
E-mail
Sign In