Live data from Hacker News

PHP Sucks, But It Doesn't Matter

codinghorror.com

101–110 of 112 posts

Re: PHP Sucks, But It Doesn't Matter

#101

Any critic of PHP who advocates other languages, like Ruby, Python or Java has to answer a question "Where are the apps?" PHP has accomplished code reuse on the app level: applications like Wordpress and Drupal are world class and you just can't find installable web apps in other languages that have reached anywhere near the level of success. Occasionally you find an app in another language and generally it doesn't h…

The only reason Wordpress and Drupal became successful is because PHP is present on basically every shared host you can find on the internet. They stayed successful by building a community of plugins and themes.

The actual internals of both are a complete mess, and trying to get them to do anything outside of trivial blog hosting and content management is a nightmare.

Just because you don't know of any Python/Ruby/Java "apps" doesn't mean they don't exist. Jenkins, Redmine, Trac, etc.

Re: PHP Sucks, But It Doesn't Matter

#102

Any critic of PHP who advocates other languages, like Ruby, Python or Java has to answer a question "Where are the apps?" PHP has accomplished code reuse on the app level: applications like Wordpress and Drupal are world class and you just can't find installable web apps in other languages that have reached anywhere near the level of success. Occasionally you find an app in another language and generally it doesn't h…

The only reason Wordpress and Drupal became successful is because PHP is present on basically every shared host you can find on the internet. They stayed successful by building a community of plugins and themes. The actual internals of both are a complete mess, and trying to get them to do anything outside of trivial blog hosting and content management is a nightmare. Just because you don't know of any Python/Ruby/Ja…

Note that all three examples of yours are software project management systems. That's a very narrow segment of the market.

You've also got to ask the question of why PHP is so widespread compared to the others.

Re: PHP Sucks, But It Doesn't Matter

#103

Earlier quoted context omitted.

> Ask yourself this: would the Instagram team have been as successful had they chosen PHP? I think not. I chuckled a little bit when I read this. I like video games, so I'll make a video game analogy. I'm playing a lot of BF3 right now, so let's run with that. A website called Symthic publishes a list of damage and ballistics information [1] for all the weapons in BF3. They also publishes TTK (time-to-kill) informati…

In every field of human endeavor where competition is extremely intense you'll find professionals optimizing their gear down to the last trivial detail. I very much doubt at professional gaming tournaments you'll find serious contestants using anything but the optimal weapons. Nobody's saying you can't build app X in PHP, but it's likely that your competitor using a better language will get there first. If you disagr…

> Nobody's saying you can't build app X in PHP, but it's likely that your competitor using a better language will get there first.

This is far more subtle than you think it is. The "speed" at which a team develops has very little to do with the actual language. The amount of time spent writing with the language pales in comparison to the time spent considering how your application will function, how you will structure it, and what you will call everything.

You may find, however, that it is easier to find teams that think in the "right way" in some language communities versus others. IMO, the community of developers that fit this "right way" of thinking (for startups) is migratory, so the answer today might not be the answer tomorrow. You need a team that balances conceptual purity with the pragmatism of results-based decisions.

The speed at which one language can be written versus another only applies in an "all other things being equal" scenario, and these scenarios almost never exist. The big differences in "time to successful solution" will almost always be decisions that aren't related to the language you choose.

Re: PHP Sucks, But It Doesn't Matter

#104
post #62
post #54

Earlier quoted context omitted.

> Tell me to code mindfuck and I will. I believe you referred to brainfuck, just for the record. > As I get older, I think I hate them all. There is some deep pessimism in the software world that I feel constructive . When engineers talk about how much they hate the tools even they don't have to use, I think it shows the care they have toward the profession.

It's the same reason people in any field put down things - they like to feel superior by putting down the tools that others use, thereby increasing their own relative stature.

On the other hand, you can generally complain the longest about the things you know the best.

Re: PHP Sucks, But It Doesn't Matter

#105
post #36

What surprises me is that "they" can find talented programmers who are willing to code PHP.

They don't. They find a lot of "programmers" who can hammer out PHP.

The talented programmers who end up writing PHP don't do it because it was their first choice. It was probably their tenth. Or twentieth.

PHP is one of those tools that you can find a lot of people who know how to use it. Certainly not all of them are actually talented or even competent. But there's a lot of them.

I think the article's conclusion is misguided.

Re: PHP Sucks, But It Doesn't Matter

#106
post #44

The TIOBE index shows PHP's popularity began declining two years ago. http://www.tiobe.com/index.php/paperinfo/tpci/PHP.html

Apparently Ruby peaked 3 years ago: http://www.tiobe.com/index.php/paperinfo/tpci/Ruby.html

And I don't know what to make of Python: http://www.tiobe.com/index.php/paperinfo/tpci/Python.html

Re: PHP Sucks, But It Doesn't Matter

#108
post #97
post #3

Note that this is a response to: EDIT: refer https://twitter.com/#!/codinghorror/status/18957165652253491... - Jeff's 4 year old response is still valid. http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de... Jeff gets it right - the language is poorly designed, but it hasn't stopped PHP powering many of the biggest most important sites on the internet today. Banging on about the language's flaws [again] is…

> What would be fascinating would be an attempt to understand why PHP remains so dominant despite the well-known flaws. I've actually put a fair amount of thought into this. I've arrived at the conclusion that it's because it ships with the Big Three parts of any web app in a single package: Request/response handler, scripting engine, and template engine. To the novice, there is no distance between the query string i…

That's a really good analysis. I'm currently mostly using Python, but I've had a lot of PHP experience. Once everything is configured python is a dream, but if I just want to prototype a simple website, it just isn't worth it. Same for the average blog or small scale business site.

To me this signifies a significant hole in the market that competing products could fill. We've already seen that, to some degree, with platforms like AppEngine, but not so much with self-hosted solutions. Or do such things exist? If so, why are they not more prominent?

Another huge bonus for PHP is that a AMP stack is easy to run on Windows, Mac or Nix. The same cannot be said for Rails or Python.

Re: PHP Sucks, But It Doesn't Matter

#109
post #81
post #32

Earlier quoted context omitted.

Ask yourself this: would the Instagram team have been as successful had they chosen PHP? I think not. Why not? You do realize the "team", facebook, that acquired them (worth many multiples of them at the time of acquisition) is a PHP-based company right?

The interesting thing to ask should be if Facebook or Wikipedia's engineers would use PHP if they had to start from scratch. I used PHP for a big project before for legacy reasons but I wouldn't choose it for anything new even with a machine gun pointed to my manly parts. Neither would I use Java or VB for that matter.

Pretty sure they would agree. The Quora and Asana founders seized on the opportunity to leave it behind, and what I've heard from Facebook staff is that they've managed to live with PHP. I can't remember anyone saying they like it.

http://www.quora.com/Quora-Infrastructure/Why-did-Quora-choo...

Re: PHP Sucks, But It Doesn't Matter

#110

Earlier quoted context omitted.

In every field of human endeavor where competition is extremely intense you'll find professionals optimizing their gear down to the last trivial detail. I very much doubt at professional gaming tournaments you'll find serious contestants using anything but the optimal weapons. Nobody's saying you can't build app X in PHP, but it's likely that your competitor using a better language will get there first. If you disagr…

> Nobody's saying you can't build app X in PHP, but it's likely that your competitor using a better language will get there first. This is far more subtle than you think it is. The "speed" at which a team develops has very little to do with the actual language. The amount of time spent writing with the language pales in comparison to the time spent considering how your application will function, how you will structur…

The "speed" at which a team develops has very little to do with the actual language.

This is strongly contrary to my experience and extensive reports online. You wouldn't hesitate to argue that PHP is probably at least an order of magnitude more efficient for building web apps than C, right?

So why is it so hard to imagine that a cleaner and more expressive language than PHP might be as much as 2x better than PHP?

Post reply on HN