Skip to content

Comment on Ask HN: I just inherited 700K+ lines of bad PHP. Advice?parent

Comments

Can't agree more with this. The way you reduce risk when migrating code (especially code you don't fully understand) is to build strong integration and end to end tests.

This will allow you to be more aggressive when replacing crap code with new functionality.

Given this huge mound of code, this process will be quite a drag, but it will pay off in spades in the long run. Trust us.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.