Agile and software rewrite

Talk about software rewrite and one comes across varied opinions. With the advent of cutting edge engineering practices that facilitate opportunities to build things right the first time, many look at the need to rewrite software as a sin. When coming across developers and architects who want to rewrite software systems, you hear them saying things like the software is way too complex or the system was probably written by a dumb developer etc..

As you investigate the need for a rewrite, some of the more common reasons include:

  • System is not performant
  • System is too complex to understand
  • Technical debt
  • Unfamiliarity with domain and legacy code
  • Use of old technologies
  • Business feels the system is out dated
  • More..

So what is the right strategy for a rewrite?

Most business want to take a “like per like” approach, which means that the software be re-written to implement improvements without introducing any change from a customer experience view point since selling a change to a customer can be challenging. This mentality results in under estimating the complexity of the system and ignoring the opportunities for improvement.

A real world example that one can relate to is a new version of an existing car model that gets offered every couple of years. Would the car sell more if the company was to build a new version in the same exact way as the existing one? Well, not really. Customers look for improvements across the board, from improvement engine performance, latest features, more mileage and a refreshing look. So why should software be treated any different?

Is a complete rewrite acceptable?

The second is the most dangerous system that a man ever designs” Fred Brooks, 1975 & 1995

Complete rewrites will make sense if one can stop the world from changing but unfortunately that is not an option. So the first approach should be to refactor your way out of the problems. Most issues can be resolved by addressing the issues in a prioritized fashion. Systems when rewritten are mostly NOT written very differently from when they were written originally. There are still requirement gaps, architecture does not resolve all of the problems and teams still build a lot of technical debt.

Refactoring your way out turns out to be the most efficient both in terms of effort, cost and risk. Engineering practices like Test Driven Development (TDD), pairing through the issues and refactoring code can go a long way in making an existing system performant, allow teams to familiarize themselves with the domain and inside of the system and cut the effort of rebuilding features that never get used.

How can an Agile approach help?

Does Agile make sense for software rewrite? It absolutely does. Agile is all about continuous improvement and systems are rewritten to make them better in many ways including emerging improved architecture and value driven development. One huge benefit rewrites potentially provide is to get away from features not providing business value resulting in eliminating waste for development and maintenance activities.

In general, there is no reason to treat rewrites any different from a green field project. Agile approach if followed in a organized way should help building the right system maintaining a view of expected benefits. Lets assess one area at a time.

  • Requirements – Business and market situations change by the day. Rebuilding what you have today is not an option. Requirements should be captured and backlog created from scratch. While breaking requirements and creating stories, right amount of focus needs to be on the value each requirement offers. Systems with legacy code built over several years always carries a certain amount of risk. With churn in resources and changing business landscape, it is hard if not impossible to be aware of all legacy business rules. Hence, there is significant risk involved in assuming a complete familiarity of existing systems.
  • Small shippable increments and feedback loops – with focus on key improvements provide an opportunity to compare smaller increments with existing systems and adapt to missing pieces. This will also result in the need to understand only the part that is being recreated. Small shippable increments facilitate continuous feedback loops for faster validation and confirmation.
  • Speed to market – Continuous improvements in existing systems made in small shippable increments can be made available to customers frequently. This can go a long way in meeting customer satisfaction.
  • Customer collaboration – What better than engaging existing customers in making the product better. Most customers will be open to provide feedback about the system. Agile development principles encourage active ‘user’ involvement throughout the product’s development and a very cooperative collaborative approach. This provides excellent visibility for key stakeholders, both of the project’s progress and of the product itself, which in turn helps to ensure that expectations are effectively managed.
  • Team collaboration and knowledge building – Giving the team the space to understand existing system and propose what the new system should look like brings out the creativity to resolve business problem in more innovative ways and facilitates domain knowledge creation.
  • Engineering practices – are the key facilitators towards building software right the first time. Rebuilding is no different. These practices encourage refactoring to address issues with existing code and help in building quality with rewrites.

There are enough benefits to leverage agile principles and practices for software rewrite. Writing the software the way it exists today does not provide any benefits but results in significant waste and limits focus on improvements. I can say that Agile can be as effective for rewrite as it if for greenfield projects.

So, evaluate the opportunities through refactoring before you walk the road to rewrite from scratch. And if rewrite is the only choice, going with an Agile approach will provide the right tool towards building the next version.

Have you used Agile for a rewrite? If yes, do share your thoughts.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s