Saturday, September 15, 2012

Quality vs. Velocity

In Software Engineering terms, quality reflects how well the software conforms to a given design, based on functional requirements and the degree to which the software is built correctly. Whereas velocity simply measures how fast the software is built.

A piece of functionality needs to be added to the system; there are typically 2x options:
  1. Build a clean and solid design that is well tested but may take longer to integrate
  2. Apply a quick and dirty change that works but makes future coding more difficult
Cutting corners in terms of code quality may provide short term gains as features are implemented quicker, but this false economy leads to future costs: time spent refactoring, time spent fixing bugs; time spent re-understanding how the code works etc.

Technical Debt
Technical Debt refers to this false economy as the eventual consequence of poor software architecture and development within a code base.

In the example above, the quick and dirty change creates technical debt; similar to financial debt, technical debt incurs interest payments, which comes in the form of extra development which must be done in future because of the quick and dirty change.

In business, companies may be willing to incur financial debt to take advantage of market opportunities; they may also put pressure on developers to incur technical debt in order to hit important deadlines:

Here trading quality for development speed is really trading time now for time later; however, there is compound interest to putting off the work.

Therefore, there is constant challenge to minimize technical debt: work at high pace in order to meet aggressive deadlines while maintaining high levels of quality in the code.

SCRUM process is being adopted more frequently to provide an iterative incremental framework for managing complex work, minimize rework and improve velocity.

However, it is still important to focus on agile software development techniques in order to improve quality and minimize technical debt.

Why? Because good code quality should help you move faster:
  • Consistent coding style / naming conventions makes code easier to maintain
  • Well-defined interfaces make self-documenting code easier to understand
  • High test coverage can uncover issues quicker and reduce potential bugs
  • High test coverage also allows teams to refactor code with confidence
Let’s revisit the example above:

Build a clean and solid design that is well tested but may take longer to integrate: the additional time spent during development should be supplemented by a reduced QA cycle as fewer bugs are reported.

In my experience, promoting quality over velocity, in the long-term: projects always take a lot less time.

In conclusion, agile software development techniques such as the following can help instil quality:
  • Unit testing, test-driven development, pair programming
  • Design patterns, domain-driven design, code refactoring
  • Stability through automated tests / continuous integration
Goal: drive quality through each software development project in order to eliminate technical debt!

No comments:

Post a Comment