Ask HN: What code should I be looking at?
Can you recommend some open source projects in PHP that are well written and well structured that I should be looking at to see how it's done right?
Can you recommend some open source projects in PHP that are well written and well structured that I should be looking at to see how it's done right?
Now that my biases are clear: You should take up Drupal. It's a big system with a lot of architecture, but the core is not too big; it's being hacked on by many thousands of people and is continuously evolving as the community learns; and it hits a sweet spot between being well architected and being open to the kind of simple cut-and-paste anarchy that makes PHP thrive -- it's designed to let you obsessively customize everything, but it tries to encourage you to contain your creativity within pluggable modules that can (at least in theory, but often in practice as well) be manipulated by noncoders.
If you want to try Drupal and you are a coder you must read VanDyk's Pro Drupal Development, Second Edition ASAP. Trust me on this.
As for Javascript, which is arguably more important: jQuery, jQuery, jQuery. Also: Douglas Crockford, Javascript: The Good Parts. And learn your CSS if you haven't already; I did that by reading Eric Meyer's O'Reilly book, followed by Dan Cederholm's book.
I'll look through the drupal code with your post in mind - sounds like a good learning experience. About javascript: I agreee, it seems that jquery makes a lot of stuff trivial, unfortunately I only discovered it after having (poorly) implemented quite some javascript myself. As for the CSS - I've got that covered pretty well.
That's only unfortunate if your poorly-implemented JS is live on a popular site and you have to maintain it. :) Otherwise it's a great educational experience!
You don't realize how great your tools are until you try to live life without them.
I would rather work with someone who produced excellent PHP than someone who wrote lots of weird hybrid procedural/functional Python full of esoteric array slicing hacks.
Being able to apply your intellect to revealing intention in code is a valuable skill in any language, and I suspect that it transcends any particular programming language.
PHP as a project is poorly structured, and all other things being equal, it should not define your programming worldview.
That's what happens when you build a language by piling hack upon hack instead of actually designing it. Languages like Ruby and Python actually have a philosophy and style that keep the languages self consistent. Consistency is a critical core feature of any good language, PHP doesn't have it.