Live data from Hacker News

Why PHP continues to thrive in the age of the PaaS

plus.google.com

21–30 of 102 posts

Re: Why PHP continues to thrive in the age of the PaaS

#21
post #18
post #6

Earlier quoted context omitted.

Yes, that's because PHP operates at thermodynamic equilibrium and creating order from those states requires the expenditure of energy. Rails is great for creating a site with a form where people can upload images, it's a 20 to 30 minute project in rails, pretty much just take any rails blog tutorial and add paperclip. (Note, it's not a 20 minute project for anyone who doesn't already know rails) Rails is not for non-…

http://en.wikipedia.org/wiki/Automated_external_defibrillato... -- the AED is worse in every way than a properly trained professional with the right tools, except for one way: its there, it sort-of works, and you can't beat something with nothing. Requiring a professional is a flaw, not a virtue. It's particularly problematic in our industry, where the end-user and most of the people involved in the production are no…

Yup, often PHP is the right tool for the job, however, in professional settings it is invariably the wrong tool for the job.

Just as you'd never want to use an AED at a hospital (unless every medical professional was unavailable)

Re: Why PHP continues to thrive in the age of the PaaS

#22

I don't do much web development, just a product once every year or so to play around with an idea. Always in PHP. A few months ago I was asked by a close friend to help them with a not-so-serious site. I decided that I'd use Rails, because, hey, I've heard nothing but good about it from HN and the like. I was absolutely blown away by how much work it required to get started. That, and how painful it was to explain to…

If you were to start with a nearly blank slate in regards to your PHP knowledge + Laravel as a framework for example, throw in Composer, learning about Eloquent ORM and so on, you'd likely be facing the same reaction.

I'd like to also point out that if you want to do software dev by the book applying various sofware engineering principles and not just stringing something together that works, you're pretty much forced to use a framework. (either due to lack of time or lack of skills for building one the right way).

Sure, sometimes the most important thing is rolling something up quickly, but other times your project will be used by more than a handful of people, and/or you'll have expectations of producing monetizable value and anticipate regular maintenance/upgrades for which a different strategy is required.

Re: Why PHP continues to thrive in the age of the PaaS

#23

Earlier quoted context omitted.

Funny, but not necessarily true. With PHP, I do as you say and spend, if I know the language, 1 hour max setting up a CRUD list/view/admin. With Ruby, I have to spend, at least 3 months learning the concepts behind the Rails framework and what the article OP mentions just to get to that 20 to 30 minute mark. If anything it's all meaningless, and what everyone should understand is that while the closer you are to the…

I think your first two lines are a bit unfair. In the first line you say it takes you an hour while mentioning in passing already knowing the language. In the second you say it takes 3 months because you have to learn the framework. Honestly if it takes you 3 months to understand rails well enough to do a CRUD app there is no way you're learning PHP well enough to do the same CRUD app in less time.

The problem is learning PHP actually makes you worse at PHP.

The only possible way to program PHP is to be pretty much ignorant of everything in which case PHP will actually do kinda what you wanted. If you learned PHP then either it's not actually doing what you think it's doing, or some config variable changed and would have done what you thought except it didn't, but don't worry just add some code to change that config variable for a while, and then change it back.

PHP is zen.

There is a story of a young, but earnest PHP student who approached his teacher, and asked the Master, "If I work very hard and diligently, how long will it take for me to learn PHP?"

The Master thought about this, then replied, "Ten years."

The student then said, "But what if I work very, very hard and really apply myself to learn fast. How long then?"

Replied the Master, "Well, twenty years."

"But, if I really, really work at it, how long then?" asked the student.

"Thirty years," replied the Master.

"But, I do not understand," said the disappointed student, "at each time that I say I will work harder, you say it will take me longer. Why do you say that?"

Replied the Master, "When you have one eye on the goal, you only have one eye on the path."

Re: Why PHP continues to thrive in the age of the PaaS

#24

I don't do much web development, just a product once every year or so to play around with an idea. Always in PHP. A few months ago I was asked by a close friend to help them with a not-so-serious site. I decided that I'd use Rails, because, hey, I've heard nothing but good about it from HN and the like. I was absolutely blown away by how much work it required to get started. That, and how painful it was to explain to…

You're making the mistake of conflating PHP the language with Rails the Framework. I can do your app in Rails pretty damn quickly at this point (with one of my current skeleton frameworks I can add authentication administration and other nice features pretty much "for free" as well) But tell me I have to do it CodeIgniter or Laravel and I'd be completely lost for days.

> You're making the mistake of conflating PHP the language with Rails the Framework.

I've heard someone call PHP "the C web framework". I thought it was fitting, and in addition, it seemed that even as a C web framework, it was a failure.

Re: Why PHP continues to thrive in the age of the PaaS

#25

> Why PHP continues to thrive in the age of the PaaS Most companies/clients, particularly outside of the SV/SF bubble, value a working solution over technical elegance. They're not irrationally ideological about programming languages, and they don't want to pay $120,000/year or $125/hour to a developer with two years of experience. Given the supply of developers of various skill levels who can build working solutions…

"It's interesting that the author grouped Ruby, Python and Node with frameworks for his comparison to PHP sans framework."

Mainly because people rarely talk about pure Ruby/Python/Node CGI development. They're almost always run through an app server.

I realise there are indeed some excellent PHP frameworks nowadays, but to my knowledge, most can still be run in a basic CGI environment. And more to the point, probably the majority of quick hacks in PHP are still done without any framework.

[BTW I meant Meteor, not Metro.]

Re: Why PHP continues to thrive in the age of the PaaS

#27
From knowing nothing to building a simple web app, PHP is faster.

If you already know RoR and have your dev machine and deployment environment all set up, then it's not hard to get a Rails app working. Rails has a significant advantage with the use of gems (and bundler, etc.) for easily adding complex features.

I still use PHP for my home projects most of the time because I haven't bothered to set up Rails on my VPS, so the effort it would take to do so just isn't worth it compared to how easily I can drop a PHP app in place. (I am using a framework in PHP too.)

But then, the author was talking about PaaS not setting up Ruby on a VPS. So in that case it's probably just about how comfortable the developer is with each language. I'm a bit more comfortable with PHP because I don't like debugging Ruby GEMs that use instance_eval black magic for DSLs and/or have to be inserted as Rack middleware. Not unless the project is large enough to make Ruby gems worth it.

(Eg. if I want good unit and integration testing. For home projects I rarely do integration testing. E.g. #2 was rack middle ware for REST API.)

Re: Why PHP continues to thrive in the age of the PaaS

#29

> Why PHP continues to thrive in the age of the PaaS Most companies/clients, particularly outside of the SV/SF bubble, value a working solution over technical elegance. They're not irrationally ideological about programming languages, and they don't want to pay $120,000/year or $125/hour to a developer with two years of experience. Given the supply of developers of various skill levels who can build working solutions…

I agree that there is an absurd, nearly worshipful view of certain technologies in the "SV/SF bubble." That, however, is irrelevant. Your final comment regarding frameworks is also something I'd tend to agree with; frameworks are great for solving problems within the domain they're built for, but their applicability outside those domains is limited.

This, however, is going to be an unpopular opinion amongst the PHP crowd, but I can distill the rest of your comment into the following statement: "PHP is thriving because companies are cheap, don't care about quality as much as cost, and there is an over-abundant labor supply of poorly skilled, mainly self-taught PHP 'developers' who are willing to work for peanuts and get the job done to an adequate level." There's nothing inherently wrong with that, but trying to turn it on its head by implying developers skilled with, e.g. Ruby/Rails frameworks (see note below), are essentially overpaid and narrow-minded is just absurd.

Note: I especially am not a fan of Ruby, so don't take this as a defense of the language or its developer-adherents. I'm actually fairly language agnostic; "right tool for the right job" and all that.

Re: Why PHP continues to thrive in the age of the PaaS

#30
post #6

I don't do much web development, just a product once every year or so to play around with an idea. Always in PHP. A few months ago I was asked by a close friend to help them with a not-so-serious site. I decided that I'd use Rails, because, hey, I've heard nothing but good about it from HN and the like. I was absolutely blown away by how much work it required to get started. That, and how painful it was to explain to…

Yes, that's because PHP operates at thermodynamic equilibrium and creating order from those states requires the expenditure of energy. Rails is great for creating a site with a form where people can upload images, it's a 20 to 30 minute project in rails, pretty much just take any rails blog tutorial and add paperclip. (Note, it's not a 20 minute project for anyone who doesn't already know rails) Rails is not for non-…

Ruby is my favorite language but I had kept out of Rails for years besides hello-world stuff. The amount of layers upon layers upon layers makes one's head spin. And if something goes wrong, you better hope you are using the exact same toolchain as the audience on StackOverflow is using, because that's what they'll be expecting you to have as well.
Post reply on HN