2
Nmeri17
1y

I am busting moves rn. I'm in the bathroom but the surge of energy is making me pump my arms like the time Leo Messi scored a clutch winner against Valencia in 2019

Remember the plugin I referred to in this rant? https://devrant.com/rants/6019851/...

Yup! I managed to subdue that fossilised codebase. Effected all changes required. To have a rough idea about how ancient the code is, its classes use constructors predating PHP 5. It throws away the ~15 years of autoloading, view templates, routing engines, DI, ORMs (NO PDO!!), lower-cased multi word variable names, etc. I'm looking at SCRIPTS with raw functions north of 4-600 lines. The client insisted I zip the folder across

BUT! The good news is, we surmounted it. In fairness to them, it's commendable for one man to have pulled this off. The codebase is massive and appears to have been predominantly written by some Gideon dude. Who knows where he is now

There is one pattern I appreciate –something I wish Transphporm does–some segments of the rendered view are composed using class methods ie instead of having the HTML file mixed with templating syntax, you have class methods that receive the raw data. Then you can extend this class as you wish, overriding just the method that composes the segment you intend to modify. That was elegant to work with. But it can become dreadful if the class expects a specific structure of data (an array with weird keys) that you have no access to sourcing

So, I finally get to enjoy one good evening in 2/3 weeks. I called 2 friends to express an emotion that's not gloomy, but they were unavailable. Will probably get some sleep

Comments
Add Comment