.NET, Xamarin, and mobile software development

A BLOG BY DAN HERMES

Refactoring to Design Patterns

15 September 2013No Comment

Coding, testing, and releasing at breakneck speed.
What could go wrong?

Technical Debt

Constant changes to a system lead to disorganized code, which is fragile and costly to maintain. Each feature we add without spending an equal amount of time reorganizing the code accrues some measure of technical debt. Agile’s fast pace and change-orientation raises the risk of bringing about the early demise of a system through this process. So how do we pay off that debt before it accrues?

The lifecycle of software is well-established: Enhance the code until it becomes unmaintainable, then build a new system and repeat the cycle. Though this cycle is unavoidable, agile coding techniques counter the erosion of design and can lengthen the life span of a system, keep it in better working order while in use, and lower the costs of maintaining it. As new features are added and bugs fixed, the developers reorganize code to absorb all those changes. The reorganization is informed by industry norms, providing developers with tried-and-true approaches to solve common problems. Refactoring happens daily, even hourly, slowing the accrual of technical debt. The norms for this discipline are design patterns and the coding techniques are called refactoring.