Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669025y@NoMad haha, yea it be a mess - nicely putting it.
Following the code is hard and I'm glad there's a search feature that works in vsCode or god knows.. actually no, I doubt god knows either, what I would end up breaking.
This company doesn't enjoy hearing things will take time generally, it's last minute bombs with deadlines that don't make sense unless it's a major project that's changing the way the entire business runs, their a little more cautious on that front.
There's v2 files and _new files and there's calls to all of them like someone tried to migrate over to a new way of doing something but then left relics with operational code still pointed at the old version.
The commented out blocks I understand, this project wasn't on git for most of its life, so leaving it there for a quick and dirty rollback makes sense but never removing it, eh ๐ -
C0D4669025y@NoMad I don't think you're responsible, unless you were a guy a few years ago ๐ค
I mean not totally implausible these days but you know. -
C0D4669025y@NoMad ๐คyes this would have been 5+ years ago when this project was started.
I want to ask what company, but at the same time... I'm afraid to know.
Was a common mindset for people coming from php4 to php5 before oop was really a thing. -
C0D4669025y@NoMad that's ok. I understand.
I wouldn't be proud of this thing either ๐
now to go work our how to put this thing on a diet and clip some of the extra trimmings around the sides. -
For porting between python 3 and 2 there's the six library, which takes some of the core differences and abstracts them so you dont have to deal with them. Does PHP not have anything like this for 5/7.3 compatibility?
-
I feel connected to this on a spiritual level since i have to deal with this on a daily basis man
-
C0D4669025y@arcsector i could write wrappers and maintain the functions that way, but no.
I wouldn't write a mysql_ to pdo wrapper, I wouldn't need to change a lot of $http_raw_post_data over to php://input
If this thing used any sense of functions to atleast maintain common database queries or atleast seperate concern, it probably would be alright to add a wrapper. But when queries are inline (mixed with JS and HTML output) and serve only their purpose at that explicit moment, that's asking for massive refactoring just to seperate things so a PDO wrapper would be of much use.
Queries are typically select * instead of select field1, field2 ect and are used with magic numbers for references.
$row[0] instead of $row['field1] -
C0D4669025y@alexbrooklyn there are audits for those.
not all mysql_ queries are subject to sqli, it's just very easy to get it wrong when data isn't sanitised or escaped, which is why the community moved onto prepared statements so these occur without you doing it. -
@C0D4 aha, so altho the codebase is a clusterfuck it does not feature easy security issues?
-
C0D4669025y@alexbrooklyn if it does, someone's been ticking off the wrong boxes๐ค oh god... don't make me look deeper.
-
Typical php job, honestly we shouldn t put up with this shit, whenever I see this app shit at a company I'm out. I'd rather work with a new technology than work on dead php code.
-
C0D4669025y@galacticus not all php projects are beyond repair piles of shit, but sadly... there's a lot of them.
-
@galacticus I work with beuatiful Symfony php 7.4 projects, not all of them are bad
-
@C0D4 the project itself is semi-canceled, but the code works almost perfectly and is 90% tested:
https://github.com/marsh69/dPlanet/... -
tuc0w3085yOh boy that sounds like the "main product" I have to work on.. I got hired to improve it and get it from PHP 5.6 to 7 and change it from Zend Framework 1 to Symfony but nope, there is no time to stop bandaiding this pile of shit because there are so many unnecessary "features" to implement lol.. so I quit at the end of October and let them sort out how to continue this shitty "product" ๐คท๐ผโ๏ธ
Related Rants
-
franga200029These guys were studying for a Java exam...from PRINTED OUT PHONE PICTURES OF CODE ON THEIR SCREENS
-
franga200024"The difference between SSDs and HDDs is that HDDs store data on spinning CDs inside the drive" -- a 3rd year...
-
Grexius18Speaking of bad dev days, what a week I'll be having. Lead-dev: I've got some bad news for you. Me: Client X...
I have this project I've inherited, yea I seem to do that a lot, but this damn thing, has to run in php5.4, has deprecated functions for php7 everywhere and a lot of them and there's no classes anywhere beyond some libraries.
Everything is procedural with random scripts being injected left right and center.
I kid you not,
$thisThing = true;
If(x==y)
require "path/to/some/script.php";
else
require "path/to/a/slightly/different/script.php";
If($thisThing === false){
// well it was modified in that small block about 10 different times
}
Those injected scripts then accept data from the parent scope so, looking at file X, you need to have open file A,B, E, and M to understand where variables have been initialised and what there current state could potentially be.
Basically this thing was bandaid after bandaid for feature requests with 0 refactoring.
Here I am trying to implement some basic functionality (should only take an hour or so + a bit of manual testing) but no, I'm literally at the point of hitting the delete button on the entire project and starting again.
rant
why you no work
what did i do to deserve this
alcohol is your friend
commented out blocks everywhere
even with git there was no deleted code
kill me now
where the hell did that thing come from
cocaine may help
is this v2 file the right one
don't do drugs