3 ms·
>That why tending to really old PHP code bases is the comfiest job ever. Everyone understands that the code is horrible and you are regarded as a hero for divin
by heurisko 5y ago
>That why tending to really old PHP code bases is the comfiest job ever.
Everyone understands that the code is horrible and you are regarded as a hero for diving in but honestly most of it is just straightforward procedural code and you can be productive in minutes. Now those projects that went all crazy on OO? Yeah, I would rather burn it all to the ground.
The comment could have just as easily been:
I've worked on legacy PHP code. Most of it is just straightforward OOP code.
Now those projects that went all crazy on procedural code? Yeah, I would rather burn it all to the ground.
I know, because that's my experience. The issue is not particularly OOP vs procedural, but rather how crazy it is.
However in the PHP world, I would question those wanting to write in a procedural style, as all the mature libraries and testing tools are built with OOP in mind.
- cardanome 5y agoThere was no OO before PHP 5 so you are missing the point. Obviously you wouldn't write modern software like this but maintaining those old systems is a hell lot easier then those where people went nuts on OO and inheritance was used more lightly. Bad abstraction are worse that lack of abstractions, basically. Either work on a modern project that has been build in recent years or if you have to maintain things, better go with something really, really old. Those in-between projects that don't seem to be totally hopeless but are still rotten, yeah that is there most pain lies. Sure it depends depends on the specific project, everything can be abused but that is a totally different discussion.
- heurisko 5y ago> Bad abstraction are worse that lack of abstractions, basically. I have found creating test seams in legacy OO code easier than starting from scratch with an untested 5000 line procedural file. In that case, having some abstractions was better than having none. But that's just my opinion.
- cardanome 5y agoTesting? You think the people with such horrible legacy code would pay me to write tests? I am happy if they don't want me to edit it directly on the live servers. But yeah good point with the testing. I should have specified that I am talking about agency work, not actually caring about the software you keep alive.