Disclaimer: I am a PHP programmer. I write PHP every day.
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.
When you have more pride in your tools than in your craft, you're not doing it right.
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.
Here's the thing: I'm not interested in being a 'programmer', I just want to build out my product ideas. And right now I do it with the language I know best: PHP.
You're doing yourself a massive disservice to know PHP and only PHP. There are literally hundreds of other languages out there, some good, some bad, but all of them have something to teach you.
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.
I'm definitely interested in other languages but as long as I feel I can do the same with PHP it's just wasting opportunity costs to spend much time on it (I could've build a whole new startup in that time). The day PHP doesn't cut it for me anymore is the day when I need to use another language. And by then, I definitely will.
Whilst there is definitely an advantage to using tools that you already understand,
you might be surprised how much of your current skills are transferable to a different language.
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 :)
Would you go to a hospital where all the equipment was at least thirty years old, where the newer medications weren't available because the old ones were good enough in the opinion of the head doctor? Learning about the new equipment, techniques and medication is just wasting time that could be spent on treating patients, right?
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 you take this story, remove anything specific to PHP and then copy paste it a few times replacing PHP successively with Perl, Ruby, Python, and JavaScript then you have my trajectory as a coder.
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.
Obviously the complexity of my projects have also been increased since I started out 10 years ago. But thanks to frameworks like Kohana I've been able to manage it pretty well.
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.
Saying that PHP has value because it lets beginners get up and running quickly is like suggesting we outfit babies with jetpacks so they can get about quicker without all that crawling nonsense.
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.
I think it's more like arguing that one can safely drive on the freeway with a tricycle, after all it has wheels and it moves quickly if you pedal fast and hard enough.
What I don't get about these "I get shit done with PHP so booya" posts is that people get shit done with better designed languages too. So where's the advantage?
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.
The advantage is that this guy, who otherwise wouldn't have been able to accomplish his goals, did. He did because PHP was accessible. And till other languages are as dead-simple to accomplish small-to-medium tasks, PHP will continue to have fans such as the OP.
Who gives points to an article like this. It's just a opinion, with nothing informative in it? On that note, does HN have an extension like the Reddit Enhancement Suite, to maybe setup or hide posts I'm not interested in?
"Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.
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. "
Stop blaming the tools for the stupidity and unoriginality of the carpenter. The tools don't make the house stable, look good, or even become something people want. How the carpenter uses those tools and puts his own vision into it does.
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.
Tools have a lot to do with setting the range of possible creations you can make. If I have better tools I can build much larger buildings than you on similar timescales. It's the difference between using wood and all the standard tools to build a skyscraper and using forklifts, cranes, and welded beams. No amount of skill is going to turn your toolbox into a forklift. Similar sorts of increases are possible with other programming languages and better toolsets, unfortunately you usually have to use them to see these things. You'll probably ask why everyone isn't using these tools if they're so good. The answer is for the same reason people write articles like this. New stuff is scary and weird and the old stuff works well enough, right?
Wrong. Just because you can build faster with a supposedly "better" tool, doesn't mean everyone else can. I know Python, I know Node.js, I know a bunch of other languages, but I don't know them better than PHP, and to be honest, my job doesn't pay me to learn a new language at the same scale as I know my current language, all because a group of people THINK that my language is crap, when in reality, to the end user, my language looks no different than theirs.
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.
> 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.
It wouldn't be so bad if standard practise was to put them in a separate files/folders with the original authors header left on with a link back to where it was downloaded.
Instead I tend to find the same POS code repeated 20 times in the codebase.
#1: fair, but when was the last time you had to install mod_php outside of a local development environment? Ever come across commodity hosting that didn't have apache + mod_php?
#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?
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.
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.