Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
(never mind the line numbers, it's normal in this "project")
ojt-rant92152dI find the most bizarre elements of legacy code isn't down to one coder fixing an issue in an odd way, but over time probably 10 different coders over many years all trying to add / correct bits that the company has latched on to an aging system.
The lack of (at the very least) a "require_once" is, however quite shocking.
just … wow
All this effort to replace a language feature called include_once().
It‘s beyond me how that person did not find that but any other way.
AmbientTea83152dThe deviest of them all.
Lensflare570652dThis is hilarious 😂
I‘m sorry for you because you have to deal with this pile of horse shit.
AleCx042794752dPHP, where just because we can, it don't mean we should, but mfkers still do anyways.
I feel for your pain.
That line count man....
I sat with the "automation expert" to see what he was up to.
Fucking idiot was asking me how to use pyaml to parse the cicd file to get the EnvVars values. In the process triggerd in the same cicd job.
It went like this:
"Have you ever used Enviriment vars" "Yes!" "So what are trying to do again?" "Get the vars for my process by reading them from the cicd file!" "Have you ever used Enviroment.... never mind. I give up"
So to prevent overriding or getting a wrong value we parse via regex the config file which is set in a variable $configfile which could be overwritten from anywhere...
Remarkable. Though I admit I'd rather expected to see a direct call to the php binary to include file and run serialize with get_defined_vars - captured from stdout and then unserialized for usage.
Hope I remembered it correctly - think it was PHP -r to directly execute code.
But. That's heretical magic. No one understands that.
Config files must be read, otherwise where do da values come from?
TeachMeCode341252dWhy is this block in the middle of nowhere?
hidd3ntrack403829dThis is truly one of the codes ever written