DEV Community

Discussion on: How do you cope with bad code?

Collapse
 
skydevht profile image
Holy-Elie Scaïde

I remember reading this line a while ago (not ad-verbatim):
Legacy code may be offensive to you, but remember that it's working code. Business always favors working over pretty or elegant. What you need to do is refactor only code that depends on your current task, do not go on a crusade to reshape the whole codebase.

I follows this advice to heart. I refactor only what I'm working on (taking care of not breaking anything).