6 ms·
The book Working With Legacy Code is fantastic and suggests something a lot like the approach you've outlined. I leaned on it as a source of ideas when I once t
by natch 11y ago
The book Working With Legacy Code is fantastic and suggests something a lot like the approach you've outlined. I leaned on it as a source of ideas when I once took over a fairly challenging old project. The other thing it recommends is adding tests but really all the parts you talked about are as important if not more so.
To OP, I'm repeating some of what blisterpeanuts said but it's worth emphasizing that refactoring, even with very small changes, will make a huge difference over time. It gets you engaged with the code, helps you know it, and gives you small things to do when the big picture is too overwhelming.
Also as he said, renaming variables as appropriate.. sounds minor, but this is huge, because you can make the names things that make sense and make the code more readable.
The small changes you'll make will add up and the code will become easier to work with, and then the work will go faster.