Wednesday, July 29, 2009

How can code reviews help with Agile development?

Effective Code reviews can help scrum teams scale in agile environment. In scrums I have managed, each team member allots 10 to 15 hours of their overall capacity to perform code reviews. It's encouraged that each member burn out their allotted hours for code reviews before the end of each sprint. We are also trying to follow certain best practices around defining tasks that are granular enough so that the resulting code to be reviewed turns out small enough for team members to review.

What does code review help achieve
  1. It helps teams get familiarized in different areas of the code base.
  2. This makes each team member a generalist instead of a specialist in particular domain. No individual team member becomes a bottleneck (sick leave, vacations, etc..) as others within the team can fill in for their tasks.
  3. It helps establish common coding standards and gives common look and feel in the entire code base.
  4. Ensures that every one is generating enough documentation, writing unit tests for their classes, and functions.
The traditional way of code reviews resorts to email or some bug tracking tool like ClearQuest. In traditional code review, the reviewers have to switch between emails and bug tracking and it is kind of time consuming as well as at times a nuisance.

In my team we use open source tool Review Board. Review board is web-based and helps reviewers collaborate. It provides interface to enter comments on the code and has a summary page which lists comments from all reviewers. In addition, it maintains a history of submitted code reviews -- a tool worth exploring.

I have seen overall Agile development experience as well as productivity of scrum team improve over time by promoting code review as one of the essential attributes before a story can be marked complete/Done.

There are plenty of good resources on the web to help you and your team get started with code review.

Scrum team organization - Feature teams or Component teams - Part 2

Component Teams (CT) are specialized teams organized around the architecture of the product under development. Examples of such teams are UI / User experience teams, Database design and modeling teams, team of Architects, Security team, etc.


A typical component based scrum team is more or less similar to a feature team i.e. each CT will have 3 to 4 developers, 2 to 3 testers, a Product Owner & Scrum Master with Documentation and Architect representation as needed.



The top node of the diagram "Theme/Epic"depicts customers value add features (Features that customer value). Think of this as some high level requirement that marketing will use in their presentation to advertise a product. This value add feature might not be small enough to finish in one sprint and gets decomposed in to multiple smaller features i.e. Feature 1, Feature 2, Feature 3, and Feature 4. What this essentially means is, once Feature 1 through 4 are done in its entierty, the top level Theme/Epic is "Done".


The stories for component based teams are fed by these decomposed features Feature 1, Feature 2, Feature 3, and Feature 4. As the diagram shows, Feature 1 is dependent on Component Teams C1, C2 and C3. Similarly, Feature 2 is dependent on component team C1 and C2, Feature 2 is dependendent on CT C1 and C3 and so on. Component teams in general provide functionality and serve multiple Features. Component teams generally don't generate products that get shipped to the customer. But they develop functionality that is consumed by feature teams and indirectly helps add value to the features being delivered to customers.


If organizations are structured in a way that specialized teams are spread globally then forming component based teams might make sense. Component based teams are great to keep site affinity, work across different timezones and also to keeping team culture intact. But it also comes at an expense of management overhead.


Few challenges with component teams based on my experience

  1. There is overhead of integrating component team's delivery with the top level features. In the example above, when C1, C2 and C3 finishes the deliveries for Feature 1 they have to be integrated together in Feature 1.
  2. To ensure all scrums are aligned well to deliver end-to-end customer functionality, it will take lot of upfront planning as well as tracking during the entire sprint.
  3. In my experience, with component based teams it's very difficult to deliver thin slice of end-to-end functionality at end of each iteration because feature team needs time to harden (stabilize code base + write integration tests) their code with component team code delivery.
  4. Since component team serves multiple features teams, negotiation needs to happen between Feature Team and Component teams to avoid starvation. For Ex. In the diagram above Component Team C1 gets requirements from Feature 1, Feature 2, and Feature 3. In the upcoming iteration let's say C1 can only serve Feature 1. In this case Feature 2 and Feature 3 teams will have to wait until next iteration before their needed functionality is delivered and will be starved.

Thus, for component teams to succeed open communication channel should be established throughout the organization.


Please share your experiences.

Friday, July 24, 2009

Scrum team organization - Feature teams or Component teams - Part 1

There is a big ongoing debate within Agile/Scrum community on whether Scrum teams should be Feature based or Component based. I am currently experiencing this dilemma in my organization and would like to share my thoughts on this.


Feature teams are long lived, cross-functional, co-located teams with 7 to 8 members in a scrum team that completes many end-to-end customer features, one by one. These comprise of subject matter experts from various component areas e.g. UI, Middleware, Database designer, Architects,


Business Analyst, Testers, Documentation etc. In short, a self sufficient team with no dependencies. By organizing teams in this fashion, feature teams can develop a thin slice (enough for one iteration) of customer valuable, end-to-end features at the end of each iteration.


The pitcure on the left is a over-simplified diagram of how a scrum based feature team will start executing priortized stories from overall product backlog. Each story, i.e. User Story f1.1, f1,2, ... represents a thin vertical slice i.e. end-to-end incremental functionality delivered at end of each iteration. The picture shows that at end of iteration 2 feature f1 and f2 are complete.At end of iteration 3 feature f3 is complete and most likely this product can be shipped to customer. In most cases, your organization will have multiple feature teams and in that case, work allocation can be handled in many different ways. Ex. FT A can work on developing feature 1, FT B can work on developing feature 2 and so on. Other way would be in iteration 1, FT A works on story f1.1 and f1.2 as that's their capacity and FT B can work on User Story F1.3 and other stories from feature 2. With this approach you can have customer shippable feature f1 at end of iteration 1.


As shown above, feature based teams can deliver thin slice of customer visible functionality one after the other at end of each iteration. This is possible because there is no dependency, delay or hand-off issues between teams.


Forming feature teams for an organization where everyone is co-located or at least in the same timezone seems practical. However for global teams, where expertise is spread throughout the globe, forming feature teams that develop thin slice of end to end functionality is a challenge. Forming a FT which spans multiple timezones violates most of scrum principles - as this team will have a difficult time self organizing for various reasons like culture, timezone differences, etc. This will have a negative impact on team's velocity and their performance will suffer. In short, FT can't scale in geographically dispersed large teams which is more or less a reality for all organizations.


In the next post, I will discuss component teams and present my view on how we can use hybrid approach that will allow scaling Agile software development in global teams.


Thursday, July 23, 2009

Implementing Agile Software Development with Scrum for “Zero Dollars”!

Agile Software Development with Scrum for Zero dollars you say – huh? Yes, software development with utmost quality is now possible with zero dollar investment. This has become a reality, with open source software for product development available over the internet.

I am listing out some software my team has used for more than a year to build a solid product with utmost quality. Each software listed below solves specific problem area and when these software collaborate in development environment, the results are amazing.

Every developer or for that matter an organization should set standards on quality of code they want to deliver to their customers. For example, a goal might be - A delivery is complete only if you have 90% code coverage, 100% automation with all unit and integration tests passed, zero defects and proper documentation. The software listed below help you define, monitor and report on your established goals. It also enforces you and your organization to follow development best practices to meet the stated goal.

I don't plan to get into details of these software as there are tons of reference material out there on each product to help you get started and running in no time. The best part is it's FREE.

Eclipse - IDE to develop applications in Java
Java - Java, a programming language
Junit - Helps with Test Driven Development
Hudson - Continuous Integration engine
Maven - A tool for building and Managing Java-Based projects
Subversion - An open source revision control system
EMMA - A Java code coverage tool
Checkstyle - A development tool to help programmers write Java code that adheres to a coding standard
Wiki - Software for easy creation and collaboration of documentation.

My team is using these tools in Agile Software Development with Scrum practices and above products have kept us honest in building quality product sprint over sprint.

Please feel free to share your thoughts and let me know if you have any questions.