5 ms·
I inherited some code written by a junior. It was messy, with lots of code (and bugs) copy pasted everywhere and gigantic god methods which took up 4/5 of the f
by muzani 6y ago
I inherited some code written by a junior. It was messy, with lots of code (and bugs) copy pasted everywhere and gigantic god methods which took up 4/5 of the file. It would take 4 hours to copy a thing like loading a paaginated endpoint, because of the heavily coupled nature.
I realized it would only take about 8 hours to refactor some of those parts to 30 minutes, and about a week to refactor that 30 minutes of work to 5 minutes. The pages now not only load better, they're free from copy-paste bugs, and easy to add new modules. At peak refactoring, I was removing thousands of lines of code a week, with some good teamwork from QA to keep it clean.
A year later, and I'm now able to integrate new features in half a day compared to about a week, leaving me about 20 hours/week free to do whatever, which I'm using to upgrade the whole codebase to reactive and native code, as well as learning iOS programming. It is very nice to go from a week behind schedule to several days ahead of schedule.
My plan for next year is to keep cutting down the cost for new features. Everything that takes me 20 hours to do today should take me 2-3 hours in the future.
- dave_sid 6y agoWell done. That’s the perfect attitude to writing and maintaining code.