Live data from Hacker News

PHP Sucks, But It Doesn't Matter

codinghorror.com

31–40 of 112 posts

Re: PHP Sucks, But It Doesn't Matter

#31
post #9

Earlier quoted context omitted.

> Instagram team have been as successful had they chosen > PHP? I think not. Can you elaborate, why you think so? PHP worked OK for Facebook and Wikipedia.

The time you don't waste fighting with the language and coding around its deficiencies is time you can spend improving existing features and adding new ones. If you're trying to run a lean startup with only three backend people like Instagram these effects are very important. Those three engineers could have coded something similar in PHP but I'll guarantee you it wouldn't have been as good. Facebook can afford to th…

  > fighting with the language and coding around its
  > deficiencies
That's still too vague. Sure PHP has it warts, but I don't recall anything I could call "fighting with the language". Yep, stack/needle mess and inconsistency in naming is annoying, but not exactly a huge time waster.

Re: PHP Sucks, But It Doesn't Matter

#32
post #6
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…

This is the wrong way to think about it. Just because people can hop on one leg across the finish line doesn't mean that's a smart way to run a race. Ask yourself this: would the Instagram team have been as successful had they chosen PHP? I think not. Javascript is different because we're stuck with it for historical reasons but there are so many better choices on the back end that there is absolutely no excuse to st…

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?

Re: PHP Sucks, But It Doesn't Matter

#33
I've always thought that php was the script equivalent of c, in as much as it'll run anywhere and any library that's ever been written will probably have a version that works in it.

Perhaps those two factors alone outweigh all the others?

Re: PHP Sucks, But It Doesn't Matter

#34
post #26
post #22

The article claims that YouTube is written in PHP. As someone who worked there, I can tell you it's not. YouTube is written mostly in Python plus some Go. Some of it is a mess, but that's beside the point.

This was actually the reason why I started learning Python for web development. I can't remember how long ago it was, but I had spent months/years burying myself in PHP and hoping to see the light... after having a short affair with rails, Python was the language that called out to me from... eh, usenet probably. It seemed so simple and pleasant, yet with the performance to be powering the 'Tube.

You chose python for its performance?

Well, I guess it's no Ruby.

Re: PHP Sucks, But It Doesn't Matter

#35

Earlier quoted context omitted.

This kind of careless, selfish attitude really pisses me off. If I walked into a doctor's office for an operation, saw a tray full of old rusty instruments, was told by the doctor that they were "good enough" and that I should just worry about the result then I would not only walk out of that office but also file a complaint with the hospital. If you're selling your services as a professional to clients you owe them…

Are you serious? PHP is not "tray full of old rusty instruments". Please give me one concrete example what is wrong with a blog running on PHP. Or a small store? How is the END result differ between say Magento or something running on Django? Could you tell the difference? No, you could not. And while the PHP version would have been up and ready, you would still try to figure out how to properly run WSGI server in sh…

> PHP is not "tray full of old rusty instruments".

Clearly that's a matter of opinion.

Re: PHP Sucks, But It Doesn't Matter

#37
post #34
post #26

Earlier quoted context omitted.

This was actually the reason why I started learning Python for web development. I can't remember how long ago it was, but I had spent months/years burying myself in PHP and hoping to see the light... after having a short affair with rails, Python was the language that called out to me from... eh, usenet probably. It seemed so simple and pleasant, yet with the performance to be powering the 'Tube.

You chose python for its performance ? Well, I guess it's no Ruby.

[As only a novice could...] But yeah, I've only recently gotten back in to Ruby because performance be damned, it's fun in its own way (to someone who doesn't do any programming for a living at least). Edit: though I'll freely admit that for my purposes, performance has yet to be much of an issue.

Re: PHP Sucks, But It Doesn't Matter

#38
If you think about it, there are two noticeable motives that put PHP where it is:

- The language has been made and (poorly?) designed around the web. While PHP is a language itself, it usually has no purpose outside the web, while Python and Ruby do not address the same problems the same way.

- Deployment is easy.

And yet, it seems all these articles fail at noticing these two simple things.

Re: PHP Sucks, But It Doesn't Matter

#39
post #13
post #6

Earlier quoted context omitted.

This is the wrong way to think about it. Just because people can hop on one leg across the finish line doesn't mean that's a smart way to run a race. Ask yourself this: would the Instagram team have been as successful had they chosen PHP? I think not. Javascript is different because we're stuck with it for historical reasons but there are so many better choices on the back end that there is absolutely no excuse to st…

You're missing the point. PHP works. A priori arguments from faults in the language don't explain its success. Replaying that old record doesn't add anything to What We Already Know. Also: I didn't say that Javascript is different - I'm talking about the curmudgeons in comp.lang.js who argue that the practical benefits of using a JS library are outweighed by their flaws. This is clearly dis-proven by their popularity…

I know why it's successful.

I remember when PHP was becoming popular. It allowed for inroads to code from front end designers who hated coding in Flash at a time when academia-based Java people were running all the big websites. If you wanted to hack up and put up a website, you can do so in a few minutes with a LAMP stack where a Java stack needed some lessons in Java.

Same is pretty much true today, but it's 10 languages instead of Java.

You know, Java was the same way. It was originally made in the 90s as a language made for embedded devices (toasters, refrigerators, etc). No one expected it to be a web language.

But Java offered something that was attractive to C++ coders: garbage collection. that made learning the language a lot easier. C++ people joked about Java never becoming popular. It crashed a lot! (core dumps - a common issue in PHP)

PHP reminds me a lot of what Java was 10 years ago. It's not as well put together as Java was. And it too took about 8-10 years to introduce templating.

My point:

1) PHP is popular because it has a more welcoming barrier of entry into coding.

2) PHP's problems appear the same to me as Java's problems 10 years ago.

That's all. Not saying one is better than another. Use whatever the fuck you want. I use both so as long as my employer pays me. Tell me to code mindfuck and I will. As I get older, I think I hate them all.

Re: PHP Sucks, But It Doesn't Matter

#40
post #26

Earlier quoted context omitted.

This was actually the reason why I started learning Python for web development. I can't remember how long ago it was, but I had spent months/years burying myself in PHP and hoping to see the light... after having a short affair with rails, Python was the language that called out to me from... eh, usenet probably. It seemed so simple and pleasant, yet with the performance to be powering the 'Tube.

do i understand you correctly - you found it harder to learn PHP because its so unorganized and inconsistent , and found Python easier to understand and learn than PHP ... anyone else here with similar experience ?

Absolutely. I feel like I wasted some of my most able years fiddling with code that was complete garbage (my fault) and not learning much of anything because I was constantly looking for explanations of, well, everything. Granted, I was young, foolish, and accepted what everyone was saying ("All you need for webdev is PHP... shhhh shhhh"). I didn't really 'get' programming due to all that. But Python was a breath of fresh air, and while I'm no expert I feel much better for it even while going through snippets of PHP.

Basically, I saw PHP as the pragmatic solution to programming for the web. Problem was I didn't really understand programming until Python showed me the light, and while I'm much happier now using and [still] learning C I found it to be an immense help.

Post reply on HN