Summary

We have seen that Refactoring not only reduce the number lines of code and make them readable.

By creating and maintaining your test suite, you are able to modify the design of your software solution. We prevent duplication in test code in order to manage changes from production code quickly. The test code is coupled and grows dynamically with the software solution. We have seen that this requires a familiarization phase.

In the beginning it takes comparatively forever, in contrast to conventional development methods. Just like with test-first, you will get faster and faster with targeted exercises. The effort of this approach pays off the larger a software product becomes.

Because then you catch up with the development time immensely and develop continuously, and you are able to shape and knead your software solution as you need it.

That keeps you agile

In order to develop and refactor production code, you reference from tests.

It is not uncommon for us to find untested code. Often production code is developed and the “annoying” tests are added quickly afterwards.

We refer here from production code to a test suite. And this is exactly the topic of the next blog: Working on legacy code.