Hacker News new | ask | show | jobs
by amelius 2551 days ago
This only works when you have a test suite with total coverage. Otherwise, you're bound to introduce bugs and annoy users and colleagues.
1 comments

Tests are nice to have but there are not that many tests in the projects I work. Sometimes the code is not that critical, no lives and money at risk. Then I do not refactor the entire project but only 1 section and I refactor it because it is required, like I discover a function with 5 level of nesting and 500 lines of code, if I do not rush then refactoring should be simple and I can reduce the big function in a few smaller functions , reduce some big unclear code in something that is readable like a story.

I agree that someone handing you a project that you have no idea what it does, what the features are and going and randomly refactor is stupid.