Before Martin Fowler's book "Refactoring: Improving the Design of Existing Code" came out, we used to call major changes to code "rearchitecture" and minor changes "cleanup". IMO, refactoring techniques are all common sense / obvious things we've been doing forever.
Do you think refactoring was ever anything new? Perhaps just a way to trick management into allocating time for code cleanup?
Refactoring's older than the hills, so no, it's not anything new.
And refactoring's not cleaning up. Well, it can be, but it's not limited to cleaning up.
It's adjusting the architecture of your application (whether at large or small scales) while preserving behaviour.
That means that while some part of your application might have been perfectly clean and fine yesterday, today's new feature requires adjusting that part to accomodate the new feature.
You don't want to break existing functionality, so you adjust the structure of your application while preserving behaviour - which is refactoring.
This said no matter what changes are made to the code one should always run his tests... just in case.Tweet