logoalt Hacker News

ramesh31yesterday at 11:19 PM1 replyview on HN

Indeed there's a distinction that needs to be made here between "not refactoring this code means I'll need to add hacks" and "Oh I'll just clean that up while I'm in here." The former can be necessary, but the latter is something you learn with experience to avoid.


Replies

cassianolealtoday at 7:35 AM

> the latter is something you learn with experience to avoid.

The latter is something you learn to judge the right time to tackle. Sometimes a small improvement that's not required will mean you're not pressed to make the refactor to avoid hacks. The earliest you can tackle problems, the cheaper they are to solve.