Refactoring is a rabbit hole

I enjoy refactoring code.

Once I've finished writing some code and all the tests are passing, I like reviewing what I've written and looking for ways to make it more readable or easier to maintain whilst making sure it still works.

I usually start with one small refactor.

Then I spot another.

And another.

I end up going down a refactoring rabbit hole and I keep seeing changes I could make.

But, at some point, you need to say enough refactoring and decide if the code is good enough to release, whether you do this yourself or as part of a pair or mob.

It can always be refactored more in the future, if needed.