Live data from Hacker News

PHP is much better than what you think

fabien.potencier.org

51–60 of 346 posts

Re: PHP is much better than what you think

#51
post #38

"PHP is the best web platform ever", because it (finally) has a decent package manager. And don't mind that far fetched statement, the author will surely delete any rude comments. Congrats, PHP has a package manager. This does nothing to shake my feeling that PHP's most ardent advocates have little hands-on experience with the more full-featured alternatives. You know, like the ones that also have decent package mana…

When I first started looking for work here in Dublin, Ireland a few years ago, I saw tens of PHP web stack jobs, 1 RoR job and no Python jobs. While the tides have turned slightly, PHP web stack jobs here still far outnumber Ruby and Python equivalents, especially at the entry level. Some developers like PHP because they can get easily work doing it. Businesses likes PHP because they can more easily hire people. Argu…

How many of those jobs are for maintaining old PHP codebases written way back when, though? Basically, what is the ratio of "PHP the sexy web framework" to "PHP the new COBOL"-type of jobs. I can't imagine it's even close to 1.

Re: PHP is much better than what you think

#52

For reference's sake, this article is written by Fabien Potencier, the creator of the symfony framework. This guy's probably single-handedly responsible for lifting the PHP community to a higher level, by making great software (which, when he started, was pretty unique, with horrible hacks-upon-hacks like CakePHP being the norm), and by showing people how to do so.

Indeed a good point, fabien is the catalyst in the current generation of PHP projects, just take a look at Symfony2, Symfony CMF, Silex, Composer, Doctrine, ... they all spawned in the trail of his work. I actually wonder how he gets so much work done.

Re: PHP is much better than what you think

#53
post #37
post #21

Earlier quoted context omitted.

Facebook.

Yes. And now Facebook is spending a ton of resource and man-hours programming around this. They had to write their own compiler! Also, I think they are trying to move away from PHP as quickly as possible without rewriting the entire site. The new projects and tools are not in PHP; moreover, I think most of the new people they hire never have to use PHP at all. Finally, just because they managed to use PHP to run a bi…

Do you have inside info on this? I've seen several people from Facebook comment that they are in fact using PHP.

The fact that they're compiling to C++ is a consequence of the slowness of the programming language implementations of those languages that are used traditionally for web development. AFAIK Ruby was and still is the slowest of the bunch.

Re: PHP is much better than what you think

#54
post #49
post #38

Earlier quoted context omitted.

When I first started looking for work here in Dublin, Ireland a few years ago, I saw tens of PHP web stack jobs, 1 RoR job and no Python jobs. While the tides have turned slightly, PHP web stack jobs here still far outnumber Ruby and Python equivalents, especially at the entry level. Some developers like PHP because they can get easily work doing it. Businesses likes PHP because they can more easily hire people. Argu…

It's a bit of a Catch22 as well. We switched to using PHP for our agency client work because it was easier to hire developers. Not only that, but clients actually ask for it by name (and we lost a number of jobs because we didn't want to use PHP). The cycle continues.

I don't mean to belittle you or anything like that, but isn't it your job to consult the client on the best tool for the project? If they are adamant on using PHP, when it's clear PHP isn't suited, perhaps that implied an awkward client.

Re: PHP is much better than what you think

#55
post #27

Every blog post about PHP mentions its 'easy to set up for non-technical people'. I can't disagree more. PHP is as easy as any language should be. As if everyone implies the harder a language to use, the cooler it is. In my understanding a smooth set up experience is a sign community cares about the thing. Extensive and up-to-date documentation means the community is large and not stagnating. A language easy to learn…

Learning how to use a language is, essentially, an O(1) operation. The constant factor may be high, but it's just that--a constant. Moreover, it should not take you more than a couple of weeks to learn any language (save obviously impractical ones like Malbolge) well enough to use it for a web project. The policy at my school is that you should be able to pick up a new language well enough to use in a class over the weekend; I agree with this. Picking up a language to use for a web project should not take much longer.

A language that's more productive gives you an O(n) benefit where n is the amount of work you do. Assuming you do a nontrivial amount of work, this is always going to outweigh the amount of time it takes to learn even the most difficult of languages.

Now, in a perfect world, a language would be both easy to learn and productive. Unfortunately, in practice, the most productive languages are also the most difficult to learn. However, this doesn't mean they shouldn't exist--quite the contrary even; I think they are more important than languages easy to learn but less productive.

Assuming you'll be spending any significant amount of time programming, don't pick a language exclusively because it is easy to learn!

Re: PHP is much better than what you think

#56

I am so sick of this kind of talk. What language do you like to code in? Really? That's great. Now shut up and go code in it. What difference does it make to you that I use PHP, Ruby or original ASP? My website achieves the result I desire. I chose the programming language I use because of reasons that made sense to me and my project, not because I want the approval of a bunch of hipster start-up kids.

agreed. Language is nothing but a tool. A good programmer will get the job done with any tool.

Re: PHP is much better than what you think

#57
post #32
post #13

PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days. For those of us who aren't afraid of a little ops work, there are far b…

"PHP is easy to deploy on. That's it. That's why it's popular. It's braindead easy to go from text editor to web URL, it's braindead easy to unzip someone else's project and run it. It requires virtually zero sysops experience to be able to use. You don't even have to worry about setting those +x bits like you used to in the good old cgi-bin days." And that's exactly why PHP is the better choice for those of us who d…

Spot on - you nailed it.

The end user counts here, big time. A lot of the products out there would have precisely zero traction if they required literally hours of piddling around.

If you compare it to JVM based commercial offerings, and I'll pick Crucible as an example here, it requires:

1. Find a working JVM that matches it.

2. Piddle around with PATH settings and JAVA_HOMEW.

3. Unzip it.

4. Lots of database configuration.

5. Frig around with ACLs.on disk so it can actually write to its home directory.

6. Frigging around getting it to run as a service using a JVM service wrapper or init script that you have to write yourself.

7. Extensive backup/restore scripting.

8. Hours of dredging through Atlassian's shitty web site.

9. Fuck around with Tomcat to persuade it to work behind a proxy.

10. Set up an IIS ARR or apache AJP/HTTP proxy in front so you can serve it on a decent URL or port.

This applies to anything with stateful that requires any intevention other than copying files. That includes Python, Ruby, .Net (which is less painful I will say), Java, Scala, Clojure, common LISP. You name it.

The only things that it doesn't occur on are: ASP, PHP.

Most stuff in PHP is:

1. Unzip.

2. SFTP it up

3. Change the connection info in config.php

4. Run install.php and follow instructions.

5. Done.

People don't care about nginx vs fastcgi vs apache vs this vs that. They just want it to work and PHP gives a viable and simple solution to that.

Re: PHP is much better than what you think

#58
post #17

Earlier quoted context omitted.

Honest question: Do you have more than a months professional experience writing modern PHP? While I love appreciate the Java ecosystem with amazing stuff like Play framework, Scala, Camel (several apache sub projects actually), Python micro frameworks etc there still is something magic about PHP. I still haven't made up my mind but there is something about really fast turnaround time, transparency, and shared nothing…

I'd argue PHP is, for any project of reasonable size, harder to get up and running than say Rails. For any serious development a PHP developer (some experience, did several years of PHP dev) will have to setup a local instance of Apache/ MySQL/ PHP and deal with making sure libraries installed on this dev server match libraries on the production server. When it comes to deployment for both Rails (in this case) and PH…

PHP 5.4 has a local development server, so even that point is moot. But how hard is setting up apache, mysql and PHP?

sudo yum install apache php mysql

done.

And anyway, for a serious project you need a local dev environment that somewhat mirrors live, and then staging (which exactly mirrors live).

Re: PHP is much better than what you think

#59
post #49
post #38

Earlier quoted context omitted.

When I first started looking for work here in Dublin, Ireland a few years ago, I saw tens of PHP web stack jobs, 1 RoR job and no Python jobs. While the tides have turned slightly, PHP web stack jobs here still far outnumber Ruby and Python equivalents, especially at the entry level. Some developers like PHP because they can get easily work doing it. Businesses likes PHP because they can more easily hire people. Argu…

It's a bit of a Catch22 as well. We switched to using PHP for our agency client work because it was easier to hire developers. Not only that, but clients actually ask for it by name (and we lost a number of jobs because we didn't want to use PHP). The cycle continues.

The technical term for that is "network effect".

http://www.welton.it/articles/programming_language_economics (sorry to those who have read it, but it bears repeating)

Re: PHP is much better than what you think

#60
Hacker News really doesn't like PHP. There's a whole lot of blind prejudice in this thread

Arguments against PHP are as futile as arguments in support of PHP. It's a programming language. The only thing that matters is the person using it. I'm sure Ruby, Node and Go are super duper awesome in a lot of academic ways, but unless we're talking about awesome things that have been made with them, it's just blah blah blah boring opinions no one should care about.

Post reply on HN