Here’s to the PHP Misfits
melvinmt.com
melvinmt.com
With that said, oh god please shut up already! This dick-waving is getting out of control. It has gotten to the point that people are writing these articles just because they know they will get hits.
PHP is a good tool. It's not the best tool, but it's good enough. Over time it will get better. It is what it is.
Anyone who's been using PHP long enough to be proficient in it should move to a more robust toolset simply to get more done. To sneer on Python and Ruby as being elitist is just the sort of thing a self-proclaimed "PHP programmer" would do.
You shouldn't aspire to be an "X programmer", but a programmer period. Learn more tools, more techniques, even those outside your immediate comfort zone, and you will be able to improve in ways that being locked into a single way of thinking will never offer.
Programmers, you are not in a position to defend a language if said language is all you know.
Remember a programmer is not necessarily interested in programming, but often in having programmed, where the end result is paramount.
When I see "PHP programmer" it's all too easy to jump to the conclusion of someone who's too timid to go outside their little bubble and see how other people get things done.
Whenever I patrol the PHP section of Stack Overflow it's like teleporting back in time a hundred thousand years and watching people bang rocks together in the hopes of making fire.
People are trying to do things that should be simple but are needlessly hard because of PHP's language design and the poisonously bad ecosystem. It's because most programmers in the PHP universe always build directly on top of the primitive library functions. For some reason this is the standard way of doing things.
The things you can get done in a framework like Django or Rails with a few off-the-shelf add-ons and some duct tape is so impressive it's somewhat terrifying. To do the same in PHP would take weeks, and even then, only if you know what you're doing.
If nothing else , learning another language will help you write PHP because PHP uses a number of paradigms , all of which are done better by other languages. So learning another language that is more tightly coupled to (say) Object Orientation (Ruby/Java) will help you understand program design better.
Depending on the size of your codebase , I think it's possible to overestimate the cost of changing tools. For example, I have a ~100Kloc PHP codebase. When it was around ~20Kloc we had considered re-writing it in a different language. We decided it wouldn't be worth the time spent, I now kick myself for making that decision :)
Similarly, I wasn't interested in the computer science part at first either, but boy has the importance of the "managing complexity" part made itself obvious over the years.
Why is it that the people who take the time to blog defensively about PHP are typically monoglot coders? After my third or fourth language helped me understand what programming was at its core, I stopped using just one and ended up writing...a lot less code for any particular task.
I'm not saying that I will never use another language (obj-c has caught my interest) but I will never use another language for the sake of using it - especially not when I can do more or less the same thing as with PHP.
I'm being over dramatic of course, but I find it interesting that in a lot of these posts the author doesn't seem to consider if it's really a feature that you can just hack away and not have to think or work to much to get something running.
Hanging out on help forums and irc I see a lot of requests for help in dealing with the fallout from poorly coded PHP applications; whether it's been hacked, they need to update it but the design is poorly thought out, etc etc.
I think in reality like most things, it's shades of grey. It is nice that people can use it to just get up and running quickly but that also lands us tons of poorly coded, brittle, and insecure websites. This of course isn't a problem unique to PHP, but I think because it's considered a "good language for beginners" and the barrier is a little lower, more beginners or "Just hack and slash until I have something that works" types end up using it and the effect is more pronounced.
IMO, PHP is only "magically productive" when you're starting out and banging out scripts over FTP on Shared Hosting with Apache/mod_php. Once you start running a "real app", with servers/deployment/nginx/php-fpm/frameworks, it requires the same amount of setup complexity as Rails/Django/etc.
Disclaimer: I write PHP for a living. Not a hater.
Oh, and:
> I said: “give me 3 days” and I learned everything I needed to know about OOP that weekend and showed off a OO-based numbers game on Monday.
Perhaps he learned all that he "needed" to know for that job, but I kind of doubt that he 'learned everything he needed to know about OOP'.
I get so tired of people tooting their own horns, but I guess I should get used to it in this new era of what I like to call conference-coders.
Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door. "
That's a straw man. There are thousands of sites out there, running on PHP, that are incredibly well-engineered.
The same hammer, nails, screwdriver, whatever is used to build mansions... It's also the same tools used to build shitty houses that fall apart... Your point means exactly what the original author meant. Don't worry about the tools used to build your product, just build the damn thing.
My mentality is to use whatever tool you feel comfortable with, and don't let someone else tell you to use something different because THEY can build faster.
Sure a nail gun is faster than a hammer, but if I have problems with an nail gun and can bang in nails faster with a hammer than a nail gun. I'm gonna use the hammer.
The biggest draw of PHP seems to be that there is a large quantity of (often bad) copy paste-able code out there on the internet.
- a wide selection of well documented frameworks to choose from
- a wide selection of robust CMS's to choose from
- a variety of CRM's to choose from
- runs on a bog-standard web server (apache, IIS) right out of the box
I'd be hesitant to call a CMS or CRM built on something that doesn't understand utf8 "robust".
There's plenty of great , well documented framework available for Java & Python too.
#2: also fair, however Wordpress and Drupal are by far the most popular open source CMS's on the planet, despite this apparent handicap. If # of websites is your metric, what would be the closest competitor written in another language? Plone?
#3: also fair, no rebuttal.
Instead I tend to find the same POS code repeated 20 times in the codebase.
This is the standard TransIP page for reserved domain names. No website
has been published for this domain. Are you still seeing this after
publishing your website? Please make sure you upload your website to
the /www directory and clear your browser cache before reloading
this page.wget -4 output: http://scrp.at/bAD
wget -6 output: http://scrp.at/bAE
As an IPv6 advocate on the side, I'm disappointed by this.
Here's my longer response: http://tumblr.crazydogsoftware.com/post/27412353720/when-the...