Live data from Hacker News

PHP Sucks, But It Doesn't Matter

codinghorror.com

81–90 of 112 posts

Re: PHP Sucks, But It Doesn't Matter

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

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.

Re: PHP Sucks, But It Doesn't Matter

#82
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 have the fit-and-finish that the successful PHP apps have.

Other languages, on the other hand, grow frameworks like cancer cells, and I wonder what disease they have that prevents these frameworks from being actually usable to build apps.

Re: PHP Sucks, But It Doesn't Matter

#83
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.

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) information [2] for all the weapons. With these two pieces of information, it is possible to empirically determine the "best" weapons in the game for a given scenario; that is close-quarters, mid-range, or long-range engagements. Yet I can equip the perfect weapon for a given scenario and still go 2/12 [kills/deaths] -- or worse -- in a round.

No one is scratching their head after reading the above. The answer is obvious. Even given the best weapon, my skills (or lack thereof) relative to the other players in the game result in a net negative kill/death ratio.

Programming languages are no different. PHP may not scratch your itch, but if you collect a group of talented, motivated PHP programmers, you're likely to end up with a working product. The end-user doesn't really care if the application was written with PHP, Python, Ruby, Haskell, Lua, Scala, Java... They don't care. They care that it solves their problem. They care that it makes them feel good to use the product.

In today's development landscape, these goals can be achieved with a staggering number of languages. Some won't look as pretty on the back end, and some may not be as hip as another, but to focus on that aspect is to miss a large part of the point. If you want to build successful software, the tools you use should be mid-pack on your list of priorities.

1 - http://symthic.com/?s=bf3 2 - http://symthic.com/?s=bf3&sb=timetokill

Re: PHP Sucks, But It Doesn't Matter

#85
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.

There's also a "familiarity breeds contempt" angle.

Re: PHP Sucks, But It Doesn't Matter

#86
The religious wars over the interpretation of languages needs some serious self-reflection.

There is so much confusion between a language and a framework. Blindingly.

The religions of one language compare their experience, due to a framework, with another language without using a framework.

How does this make sense?

As a non day to day PHP developer:

- The Web, as a platform is relatively a baby, compared to platforms like PCs, going back to mainframes.

- I feel for too many devs, the relationship to production code that is more than a few years old seems foreign, especially to those who have joined the Web in the past 5 to 7 years.

- Most languages used on the web, were not designed for the Web, first. Instead, most languages have a framework to extend a language to the Web.

On Languages:

- Having seen sites built without a framework in many languages leads me to wonder: Why do we act horrified at old code? It seems reasonable that our old ways of thinking would improve, maybe even be expected for the level of intelligence on hn.

- Most languages now a days have capable Web frameworks. Instead of focusing on advocating for the use of a framework, we keep the discussion at a much more surface level, like which language.

- Language is merely syntax. Granted some languages are interpreted to be more eloquent/elegant/efficient than others. Yet the language we all speak, English is the most universal and in a way quite hacked up. Yet we don't take any upfront to bash fellow developers instead of supporting the use of frameworks today so in 5 years, the next batch of people who know lots don't look back and find less fault in todays perfection.

- I'm at a loss to try and argue one language is the way. It isn't. Nor is one framework. But if your language of choice is not natively made for the Web, make sure you use a framework. Add a beginner it might be one kind, advanced developers can likely pick something else.

- A mess can be made in every language. What's our point, really, when we can't see the forest while so obsessed with the trees?

On Code:

- All code older than a year starts to become legacy.

- I'm not sure if we really understand old code was often written with less foresight than we have today. It didn't make the tools obsolete, as much as old thinking obsolete.

- There will be new things coming out all the time, few last. As much as it's fun to go on a language witch hunt, we have our own skeletons waiting for us as our projects live on longer and longer.

- with the Web in it's infancy, is be surprised if 30% of developers have a relationship with 10 year old code at all let alone with code that still is in use on the Web. It's great that we can do things the new way, but we'll always have a growing history of code to maintain a relationship with.

- PHP might suck along with a lot of other languages, but I hope we consider whether the lens we live we see ourselves thought couldn't use some improvement.

On Frameworks:

- Every problem someone had with a language is more likely a problem with not having used a framework, instead of the language itself.

- For those learning coding, learn it from someone who had good habits and thought processes, those are the things that are the most important to have as the language de jour makes it's rounds. Having the transferable skills of decently evolving application design between languages and frameworks will forever leaving.

From where I see it, most languages now have capable frameworks, and all languages have capable developers. Please stop the witch hunts. The amount of vile filth spread about others preferences compared to your preferences based on 10 year old experience and hearsay of a particular language to this developer, is akin to believing and propagating a nasty stereotype about a particular culture or nationality without learning for yourself. It's not that much different than being that ignant.

Developers, let's continue discussing, but more importantly educating and spreading the wisdom of good practices in all the communities we participate in so there's more of us.

Let's spend less time talking trash about others based in hearsay, interpretation and preferences in language, and instead build stuff people want, because we really can make the world a better place with software.

0.05

Re: PHP Sucks, But It Doesn't Matter

#87
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…

> 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 disagree with this, take it up with Paul Graham. The idea that a good tool can give you a competitive advantage underlies many of his essays on startups and software development.

Re: PHP Sucks, But It Doesn't Matter

#88

Earlier quoted context omitted.

"(core dumps - a common issue in PHP)" Ummm.... I've been working with PHP for 16 years, and I could count the number of coredumps I've had in production on one hand (maybe 2). Early on, when compiling extensions by hand, I'd get some when I compiled something wrong, but that was always in test areas on dev machines. If 'core dumps' were 'a common issue', I doubt it would be as widely used as it is now.

Bahh.. it was at where I worked. It was because we relied on C libraries that PHP connected to. When PHP is slow, they make links to C libs to get speed. Java did the same with JNI. PHP simply isn't fast enough in some situations where C libs are necessary to hook up with. (private message me if you disagree.. I'll be glad to go into details) We were typically getting up to 200 req/second on our stack. So it was pret…

Sure... when dealing with custom C code and hand-rolled non-vanilla PHP, I can see that happening. Understand that your experience was in the realm of the .01% of PHP usage. 200/req second isn't all that outrageous for run of the mill PHP (depending on hardware) but when you're throwing in custom connector stuff on top of that, yeah, you'll get core dumps. :/

Re: PHP Sucks, But It Doesn't Matter

#89

Things that don't matter: - OS - Language - Compiler - Runtime - Editor - Testing process - Deployment process - Bug management systems The thing that does matter: - Building something successful that people want Frankly, I don't care what language you used to build it. I don't care what shoddy infrastructure supports it. I don't care what hacks you put into place to scale that infrastructure. You know why? Because y…

While I agree with your priorities, I think it's misleading to say they "don't matter". They do matter. They just don't matter as much.

Re: PHP Sucks, But It Doesn't Matter

#90
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…

> there is absolutely no excuse to start new work in PHP.

I hate PHP myself, but as far as my personal projects go, PHP is perfect for cheap shared web hosting. Some fairly basic and crappy functionality to prevent users from stomping on each other's files is included. Something that can reasonably replace PHP in that role would be what it took to phase it out of my personal use, and what people choose for their own work affects their choices on all work.

Post reply on HN