As a programmer, it is nice to work on a new development project that you find interesting, especially if you are highly motivated to do so. But it can be extremely frustrating if you get called away to work on a bug instead. It can be worse if it is not your code, and you don't have the full understanding behind the code. It is even worse still if it is your own code and you have that "What was I thinking?" moment! The more you get called away from new development to perform maintenance on existing code, the more you begin to appreciate the need for unit testing. As this appreciation grows, you begin to see the real benefits of learning testing methodologies and techniques such as Test-Driven Development (TDD) and Behavioral-Driven Development (BDD).
When you've spent a period of time working as a maintenance programmer on other people's code, you get to see the good, the bad, and the ugly. Such code can...