4 ms·
> He didn't follow any pattern for what code was in which directory, and he reused class names so grep didn't work. Now where is that source file again? http:/
by vectorpush 11y ago
> He didn't follow any pattern for what code was in which directory, and he reused class names so grep didn't work. Now where is that source file again?
http://www.php-fig.org/psr/psr-4/ http://www.php-fig.org/psr/psr-4/
- fsk 11y agoNope, he didn't follow that, he had a bunch of exceptions coded in his autoload function. He also had a bunch of functions where a function in one class nothing but call another function in another class. He also had way too many classes.
- girvo 11y agoRight, but that's the problem. You can quite easily make an abomination of a class hierarchy in Ruby, or Javascript, or even Python to some extent. If people don't follow best practices, then of course things will not work with other tools that expect your work to do so. Also, I highly recommend XDebug with the Codebug[0] client -- if you're working with a crappy codebase and run into the issue of "what damned file is this?" it will solve that in a super nice way. It also gives you a full REPL in your working environment, pause execution and play around in the PHP side during your request :) [0] http://codebugapp.com http://codebugapp.com
- fsk 11y agoI'll look into Codebug. I haven't found a PHP editor I really like yet. I've been using dev-PHP and emacs. I'm using Netbeans at work and don't like it. Oh nevermind, Mac only, forget it.