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
-
@magicMirror Pornhub runs well doe, plus, I was in an pornhub dev interview once 😅
-
Would you blame me if that sounded a lot like WordStress for a moment? :^)
But yea, I see it so often as well...
I once was tasked with assisting a colleague in building a project for work...
- Indentation was all over the place.
- Opening and closing a MySQL connection for *each* query.
- all functions in a 3k lines long file "functions.php".
- all database shit in a 1k lines long file "database.php".
- Didn't sanitize user input (both when creating a query or displaying it's results, so both SQLInjection and XSS attacks were possible and trivial).
- "I don't want to waste 10 seconds writing a comment".
- Directory traversals! (should maybe still thank him for his waifu collection... someday...).
- Editing bootstrap4 colours n shit... in the minified bootstrap.css...
- "Just make sure to *manually* change your database to make it work".
- Spending more time fixing a single bug than I took to rewrite with CakePHP (the entire bug was him missing a value in his SQL query)
Related Rants
Once I maintained one of the most used and fucked up codebases on the market with almost 1M+ daily users. (cannot say more, sorry).
It's written in PHP and is absolutely terrifying,
the first time I saw some lines of code I was about to scream and cry.
- spaghetti code
- no indentation
- random SQL query unoptimized
- unused vars
- Code is split among several files with no logical reasoning
- Mixed procedural and oop programming
- Unsanitised user input (yes, you got it right)
No test environment, no backup database, every commit goes straight to production.
It's a real disaster but the company prefers to keep it as it is without refactoring or anything else.
Just to make it clear:
It's not hatred against PHP, it's against the code's current status and the older programmers which used to work on it.
rant
codebase
hell
php