Live data from Hacker News

Taking PHP Seriously

slack.engineering

351–360 of 673 posts

Re: Taking PHP Seriously

#351

Earlier quoted context omitted.

But the wrong foundation can tank a good one.

That's true of all languages, though. A truly good idea will generally find a way to succeed despite the technology it is built on, though. Look at Facebook, Slack, and countless others running PHP or Minecraft running Java and its apparently horrible code base (I've never seen it, so that is secondhand)

A number of things actually follow more logically than tech doesn't matter which is counter intuitive and counter to most other endeavors in life.

- We aren't very good at judging the relative virtues of tech

- Most tech is good enough to express most concepts even if not equally well. If its possible to express it even if it takes 3 times as much work and is only 70% as good you wont notice from the outside how much the tech mattered.

- Good ideas are worth enough money to throw enough time/money at them to be moderately successful

Re: Taking PHP Seriously

#352
I didn't understand some of the mentioned benefits of PHP.

Progressively adding types:

This isn't PHP it's hack. How is this different than typescript or flow?

Edit/refresh vs edit/restart server.

It seems like it's been several years that there have been things like meteor or webpack that make iteration super fast on JavaScript. Is that iteration slower than PHP?

Re: Taking PHP Seriously

#353

Earlier quoted context omitted.

I'll offer an alternate hypothesis. Some companies are succeeding in spite of php. There are many, many users of php, and we'd expect that there would be considerable variance, with some users doing awful (no traction, buggy sites, etc) and some hitting home runs (facebook). Because it's such a popular language, it will have users across this entire spectrum. It's easy to cherry-pick the winners and miss all of the t…

It would be an outlier company indeed who held an 'all hands on deck' meeting and said, "We're succeeding in spite of PHP everyone!" Only engineers care about programming languages. Seriously. That's it. No one else cares about them. I work in a large public university alongside a revolving door of student interns who are always 19. In 10+ years of work, I've still yet to meet the person who talked about their favour…

But program managers and CTOs and other non-engineers at a company care about scalability, performance, technical debt and quality, right? Let's not pretend that these don't matter once you've gone past the "users actually care about our app" phase, because they do and they affect the bottom line of a company. And IMHO PHP falters in these regards.

Re: Taking PHP Seriously

#354

PHP is wonderful as a thin layer of glue between your database and the web browser. It's when you write a thick middle layer that PHP gets unwieldy. Business logic: Don't write it in PHP. Write it in PostgreSQL. Authentication: Don't write it in PHP. Use Apache 2.4's mod_auth_form. Replace hundreds of lines of PHP code with a few lines of Apache config. When it gets to your PHP script, all that's left to do is read $…

I always wanted to do PHP this way as I have a Perl background but since PHP5 appeared in 2005 the psuedo-Java posse took over and it was PHP Design Patterns everywhere and suddenly procedural/functional PHP was un-idiomatic. I find this odd as Java's verbosity can be forgiven as it gets compiled away. Not so PHP5's verbose OOP which has to be fed to the interpreter.

Re: Taking PHP Seriously

#355

Earlier quoted context omitted.

It would be an outlier company indeed who held an 'all hands on deck' meeting and said, "We're succeeding in spite of PHP everyone!" Only engineers care about programming languages. Seriously. That's it. No one else cares about them. I work in a large public university alongside a revolving door of student interns who are always 19. In 10+ years of work, I've still yet to meet the person who talked about their favour…

Doesn't it stand to reason that the people that actually know how things work under the hood are the people that care about such things. You could say the same thing about cars people don't care about what sort of engine is under the hood or how it works they just want to go places! It doesn't then follow that all cars are the same and you are just as well getting any one of the millions of cars or even any one of th…

You have a logical point for sure. I think it might be an apples to oranges comparison in this case though. I just don't know that building cars is the same as building websites and apps. I know Php and JavaScript can respond to an HTTP request. I don't know how to optimize an internal combustion engine. There's probably parallels in terms of expertise with software developers, but I can't be sure.

Re: Taking PHP Seriously

#356
post #120

Earlier quoted context omitted.

> If you're programming in PHP, you're not running around talking about "convention over configuration" giving talks, or trying to make your code beautiful. It's a garbage language, and you know it. This is exactly right. The right philosophy for PHP is to embrace the garbage. When you're done with a request, and have spit out all the HTML to the client, the server is going to throw everything away. So don't build a…

If I wanted to embrace garbage every day I would have skipped college and went straight to being a bum. Life is too short to "embrace the garbage" every day.

This. Developer happiness matters.

Re: Taking PHP Seriously

#357
post #353

Earlier quoted context omitted.

It would be an outlier company indeed who held an 'all hands on deck' meeting and said, "We're succeeding in spite of PHP everyone!" Only engineers care about programming languages. Seriously. That's it. No one else cares about them. I work in a large public university alongside a revolving door of student interns who are always 19. In 10+ years of work, I've still yet to meet the person who talked about their favour…

But program managers and CTOs and other non-engineers at a company care about scalability, performance, technical debt and quality, right? Let's not pretend that these don't matter once you've gone past the "users actually care about our app" phase, because they do and they affect the bottom line of a company. And IMHO PHP falters in these regards.

At this point, I would have no problem arguing with a straight face that your choice of technology stack might be the least important factor in whether your business succeeds or fails. I don't mind if I get torched for this, it's just my current, non-Silicon Valley, non-substantiated opinion at this time (though I don't think it's without merit).

Re: Taking PHP Seriously

#358
post #16

I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…

I'll offer an alternate hypothesis. Some companies are succeeding in spite of php. There are many, many users of php, and we'd expect that there would be considerable variance, with some users doing awful (no traction, buggy sites, etc) and some hitting home runs (facebook). Because it's such a popular language, it will have users across this entire spectrum. It's easy to cherry-pick the winners and miss all of the t…

Delivering enough value to users, faster and cheaper than the competition, wins.

The language you use pay second- and third order dividends, but most battles are fought and won on first order.

I'm a C++ developer, have shipped Java and C# and Haskell and Python and a bunch of other code in production. If a friend asks me to spin up a website for him/her quickly, I'd still do it in PHP.

Horses for courses.

Re: Taking PHP Seriously

#359
post #353

Earlier quoted context omitted.

It would be an outlier company indeed who held an 'all hands on deck' meeting and said, "We're succeeding in spite of PHP everyone!" Only engineers care about programming languages. Seriously. That's it. No one else cares about them. I work in a large public university alongside a revolving door of student interns who are always 19. In 10+ years of work, I've still yet to meet the person who talked about their favour…

But program managers and CTOs and other non-engineers at a company care about scalability, performance, technical debt and quality, right? Let's not pretend that these don't matter once you've gone past the "users actually care about our app" phase, because they do and they affect the bottom line of a company. And IMHO PHP falters in these regards.

The scalability of PHP is great, because each request is fully independent. This is like the Amazon lambda model. You /have/ to put your state in some storage back end, network attached RAM or such. This is a scalability best practice!

Re: Taking PHP Seriously

#360
post #16

I work on PHP at my day job (in a public company), before this, I came from Ruby, and .NET before that. I'm convinced the reason so many successful projects use PHP, is not because of any inherent nature of the language. I think it's the people who use it. They just don't care. A successful project needs to be started by someone that cares just enough, but not too much. If you're programming in PHP, you're not runnin…

Products fail. Languages solve problems. Business domains have different problems. PHP won't solve a telecommunication challenge at scale. I believe in polyglot development. Choose the language and framework that suits the challenge. Not all shoes fit.
Post reply on HN