- [Narrator] One of the most important aspects
of good agile development is including refactoring
into your development time as the status quo,
rather than something you do
when there's free time in the schedule, or worse yet,
as an afterthought.
Let's look at some considerations for why refactoring
should be done at every step of development.
It produces more readable code,
better architecture and structure naturally evolve,
reveals hidden bugs and vulnerabilities,
and generally makes your project stronger.
If you're new to the idea, don't worry,
it's not about getting something working
then going for a total retrofit.
The idea is more along the lines of small,
continuous changes that improve your code base.
This way, you have time
to test your refactored improvements,
right alongside your development.
If you leave refactoring to the end of a project,
or after big chunks of code have been written,
you run the risk of sending fragmenting ripples
through your working code.
Just another reason why refactoring fits so well
within an agile workflow.
For a deeper dive into this topic,
grab a copy of "Refactoring:
Improving the Design of Existing Code" by Kent Beck.