Have the Spaghetti-ists All Migrated To PHP? · 12 August 2007, 17:32

I have been doing an increasing number of web site development jobs in PHP lately; the vast majority of the jobs have been enhancements to existing sites.

In the late 90’s I did a number of these kinds of jobs for perl/CGI driven sites. Many of them were written in such sloppy / unstructured perl code that I would either end up aborting the job (if the client did not have the money to pay for a full refactoring) or I would rewrite from scratch.

I thought that with PHP the situation might be different since so many things are so easy to do with PHP and surely developers would have more time to focus on program structure / design.

No. Same situation as with perl, I take over many spaghetti code projects and spend time either refactoring or rewriting from scratch. Often clients I work for are unpleasantly surprised to hear that the sites they had made will now cost them even more because the code was not written in a way that would make it easy for someone else to maintain / enhance.

This is not a rant about PHP developers in general; there are many PHP projects, especially on, that are very nicely written and that are easy to maintain and extend.

I guess the bottom line is that some things never change as much as I hope they would as software development ages and matures.

While it is nice to get paid to refactor (I really enjoy refactoring), I would prefer to spend my time developing new features and have refactoring just be a minor part of adding revenue-generating code to a site or project.

— Max Schubert



Textile Help