View more context

 

zanderwar

i mean it removes duplicates automatically but god damn, imagine the rest of the 1800 lines of code in this file...

wmk

@zanderwar time for refactoring or at least some calesthenics?

zanderwar

the person who wrote this, didn't use any framework or anything just all raw mysqli_* queries, and he's created this massive PDF by referencing row fields by their integer key (0,1,2,3,4 etc) except the table has been modified massively, so some keys that the script references don't even exist anymore.

zanderwar
Files: Requires logging in with Slack to view/download
image.png
zanderwar

like, some comments at least please fam, respect your future developers

zanderwar

right now, i, nor them have nfi what 29 used to once represent

wmk

or write code that's self explanatory... good variable names, short functions...

Firesphere

Not just unclear, also a massive anti-pattern. This could easily be solved with a static array and a single selector, instead of 3 if statements

Dennis Basa Guinto

I write SOLID (the principles) codes. People who write big procedural methods (like in that image) actually complains that my classes are too small and too many.