back

by sergiotapia·13y ago·view on hn ↗
I've come to a situation in the past, where there would be endless lines upon lines of PHP code intermixed with random static functions and HTML markup.

I'm talking 40, 2000 LoC files that all called the database whenever they felt like it, all echoed out data and modifed each other in wierd ways.

I spent about two weeks trying to untangle the mess and threw the towerl in at day 15. We just rewrote it using a PHP framework that not only let us query the database using a sane ORM, but also gave the project STRUCTURE and added mantainability value.

Sometimes a rewrite is the best cure. ;)