Taking PHP Seriously (2016)
121–130 of 150 posts
Re: Taking PHP Seriously (2016)
#122> By starting each request from a known state, we get a kind of organic fault isolation; if request t encounters a software defect and fails, this bug does not directly interfere with the execution of subsequent request t+1.
Is there a modern web framework where a failed request can crash the entire server? I'm not sure this is a problem in other languages.
> Second, concurrency. An individual web request runs in a single PHP thread.
Huh, so maybe this could be an interesting concurrency model. But it's not that different than say, Node's promises. The only difference is Node's promises aren't tied to literally making a web request.
The restarting the server problem also is not an issue. Almost every mature web stack I've seen has hot reloading. Yes, even in 2016.
There are certainly reasons to use PHP, but the trap I see a lot of PHP proponents fall into is assuming that the benefits they see are somehow unique to PHP. Laravel fans love to cite packages, migrations, the ORM, etc. as reasons to use PHP. I certainly think all of these are great features but they're not unique to PHP.
Re: Taking PHP Seriously (2016)
#123PHP has some great properties, and if you're tolerant of its sharp edges, great. But up until recently (and perhaps still?) it's got many of its safeties turned off by default. When I left PHP, (insecure) mysql bindings still came included pretty much universally, but often not PDO. They have every amazing helper function under the sun at your fingertips (urlencode and htmlentities!) but also some tremendously dangerous ones (backticks! variable variables!).
What's most striking to me is that Slack is 100% off of PHP now (onto Hack). There's something telling when neither the syntax nor the runtime nor the standard library are sufficient for the biggest users of a language. With recent versions of the core runtime finally getting fast, I wonder if they'll rip off the bandaid and break backwards compatibility to dull some of the larger sharp edges.
Re: Taking PHP Seriously (2016)
#124Earlier quoted context omitted.
Close I think - the best language to use is the one you will have the easiest time hiring good talent for. If you found a startup and all really love and are fluent in COBOL that's great but... good luck when it comes time to hire another employee.
If you have a good product new engineers will learn whatever language it is in. This very article is a perfect example. I'm sure Slack isn't hiring kids out of college with extensive PHP experience.
A lot of interns end up using php(symfony). If they know Perl or Java they can pretty much jump right in. Python they take a little bit though not much more.
Re: Taking PHP Seriously (2016)
#125The best language for a startup is one the founders know the best. Every other discussion will at best make a 1% difference.
No, really no, as someone who has worked on code bases where people followed the path of least resistance (PHP in this case) things turned into a giant mess of human suffering. Pick a language that has tooling for what you want to achieve otherwise everyone reinvents it or just makes a mess.
I spent a lot of my career consulting as a mess cleaner, more or less, and even very smart people end up making a mess sometimes. Time constraints, shifting goal posts, all of it.
I’d say the worst thing I ever see, regardless of tools, is premature optimization getting in the way of everything else.
Re: Taking PHP Seriously (2016)
#126I would personally love to get beyond that bias. However, every single time I install any piece of software written in PHP, it's simply a nightmare (e.g. Matomo, rss-bridge).
Unhelpful error messages, unexplained or undocumented features, all held together with metaphorical duct tape.
I always have to dive into the source code to figure out things that a README or tutorial should be able to help me with.
I can't recall ever doing that with tools written in any other language.
Is it simply that PHP programmers care so little about their products?
Re: Taking PHP Seriously (2016)
#127I don't doubt that PHP has some benefits. That said, the reasons cited in the blog post don't seem that unique to PHP. > By starting each request from a known state, we get a kind of organic fault isolation; if request t encounters a software defect and fails, this bug does not directly interfere with the execution of subsequent request t+1. Is there a modern web framework where a failed request can crash the entire…
Re: Taking PHP Seriously (2016)
#128It's like an ugly C. It's a perfectly reasonable choice for web development, just like a Chevy Caprice is a perfectly reasonable car for a taxi service (as evidenced by the thousands of them in NYC, still plodding along). You'd still rather ride in a Mercedes E430 taxi (long time European standard)... unless you had never experienced both, in which case you probably think the Caprice is just fine. And if you knew Rub…
Re: Taking PHP Seriously (2016)
#129Why do engineering blogs have to share this stuff? Is it an attempt to hire?
Re: Taking PHP Seriously (2016)
#130The best language for a startup is one the founders know the best. Every other discussion will at best make a 1% difference.
I espoused this sort of rhetoric until I worked at a PHP shop. Every other discussion was about problems posed by the shortcomings of the language, crossed with mistakes made by past staff. It's so easy to make assumptions about "good actors" and "reasonable developers" that just fly out the window with a team that picks PHP and/or doesn't know much else.