Get the latest tech news

Reasons Not to Refactor


Refactoring is great and most developers should refactor more, but there are times when it is not appropriate. Ironically, if you’re aware of these, you may find yourself refactoring even more often than before.

Knowledge of how each species behaves was contained in a single line but is now split up over the entire method. This is the basis of Michael Feather’s process for identifying good refactoring targets(spoiler: code that is complex and changes often is the best place to look). If we’ve been working in small low-risk steps the way that the refactoring community encourages, the tidying we did already was either valuable and should be kept, or is really safe and easy to revert.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Reasons

Reasons

Photo of Refactor

Refactor

Related news:

News photo

YouTube shut down audio developer's channel of 15 years standing for "reasons"

News photo

Three reasons to preorder the Galaxy S25 Ultra through Samsung — and one reason why you shouldn't

News photo

Ciri as Witcher 4 protagonist 'really, really interesting for all kinds of reasons', says Geralt voice actor