What is
refactoring?
In one sentence
It is still the same thing and works exactly the same. You just tidied up the inside.
Like re-planning the paths in a restaurant kitchen: not one word of the menu changes and guests get the same dishes, but the cooks walk half as far.
How is it different
from what you'd expect?
Put simply: refactoring is nothing changed outside, everything changed inside. There is one test for whether it was done right: people outside can't tell.
Why tidy up
at all?
Because things get messier on their own if you don't.
At first, adding one thing takes an hour. After two years of cramming, the same small job means digging around for ages to find where to touch, and then worrying you'll knock something else over. Now it takes a day.
The mess itself isn't the disaster. The disaster is that every small job from now on gets more expensive.
That is why sometimes a week passes and you see nothing new. That week went into straightening the road so the next ten jobs go faster.
How to tidy up
without breaking things
All four steps mean one thing: catch every "oops, I broke it" on the spot, instead of letting a customer find it for you three months later.
What exactly
gets tidied?
One thing
it doesn't do
Same logic: if you want a new feature, tidy first, then add it. Don't move the tables while you're cooking.
Refactoring doesn't produce anything you can see today. It produces the ability to keep every future job fast. Never tidy, and eventually things don't just get slower, they get stuck. By then, if you ask for one small feature, the answer is "that needs a rebuild".