4 ms·
Cool, it's like watching how people did PHP 4-5 years ago when there weren't many frameworks available, and people used GLOBAL variables for accessing the DB/ca
by kurrepalt 13y ago
Cool, it's like watching how people did PHP 4-5 years ago when there weren't many frameworks available, and people used GLOBAL variables for accessing the DB/cache.
- wdewind 13y agohttps://github.com/WhatCD/Gazelle/blob/master/classes/wiki.class.php https://github.com/WhatCD/Gazelle/blob/master/classes/wiki.c... Yeah, not to be negative, but it literally has SQL and HTML in one file. Ooof.
- kurrepalt 13y agoYes, the thing I also noted first was that it doesn't have any bootstrap/router (only 'bootstrap' is the one that's included at the top of each .php-file, wordpress-style). Development must have been pure pain. :( I really understand why people hate PHP so much when all they get to see is purely non-optimized shit. It generally has a really bad reputation which it doesn't deserve. Especially in HN-circles.
- wdewind 13y agoYes I agree wholeheartedly. There are two very fair knocks against PHP: it's not the fastest, and the API uses somewhat inconsistent standards and conventions (isset vs. is_array for instance...so frustrating). But for the slowness aspect, it's not so slow that you are really hindered by this unless you are doing something that requires very intense performance, in which case why are you using a higher level language anyway. Pretty much the rest of its bad reputation is undeserved, and the downsides are on the level of give and take you get with any other language.
- mercurial 13y agoI guess coding standards where that locality trumped separation of concerns. Also, I find string interpolation in SQL kind of hot. Especially when magic quotes are deprecated. I'm sure you can do nice things in PHP if you try hard enough, but you sure don't need to make any effort to do something absolutely terrible.
- dewey 13y agoWell, the project is about 5 years old and grew over time. There were discussions about moving to a framework/a rewrite but that's something you can't pull of with < 5 developers while still keeping the current codebase up to date and fixing bugs.
- FZeroX 13y agoIt's not an age thing, the code we were writing was considered terrible back then too, and there were frameworks available. Wheel re-invention is fun though!