Actually, that make me remember statements of Linus Torvalds on Git at Google Tech Talk Conference:
But I did end up using CVS for seven years at a commercial company and I hated it with a passion. When I say I hate CVS with a passion, I have to also say that if there are any SVN users in Subversion, users in the audience, you might want to leave because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started, because the slogan for Subversion for a while was, CVS done right or something like that.
And if you start with that kind of slogan, there’s nowhere you can go. It’s like — there is no way to do CVS right. So that’s the negative kind of credit.
I didn’t mean to stretch anything, that just the immediate thing that popped in my mind when I red "PHP – The Right Way".
Now, I don’t mean PHP is never the right way to go. Especially if you have to deal with a large existing code base, rewriting everything in whatever shiny bright language there is available currently on the shelve is probably a far worst option.
He seems pretty chill about Rust, maybe even positive.
He hates C++ with a passion though. (Like CVS.) And .. it's understandable. C++ did not fix anything back then, that he cared about. Quite the opposite, only made things even worse for low-level code, because it was even more undecipherable by mere mortals. (And ... mostly still is.)
I (not parent) have PHP hatred. It is fuelled by decades of PHP development and -exposure. My hatred is based on failing projects, missed deadlines, burnouts, money stolen, severe downtime, and companies going bankrupt. PHP had a role (not the primary, mind you!) in all of them.
You literally said you had only experience with WordPress. Yeah those failing project make a lot of sense now.. Do you know WordPress was build by web-designers, not actual developers?
Using it for anything else then a forward facing website is a bad idea. Even using it for a website is a bad idea btw, because it was made for blogs, but whatever, nobody listened then, nobody will listen now. But I have peace with it, as long as it's only used for simple stuff.
For clarity: I never said I only have experience with WP. I'm not grandparent commentor. Though I am old :)
I started serious with PHP early in the PHP 3 era. Back in 1998. Coming from Perl and C (in cgi-bin). Like everyone back then, I wrote my own CMS, hacked on PHP and Perl portals, hosted PHP forum software and finally did most of my work in Drupal.
I've seen stuff. And many of it requires eye-bleech if you ever want to look at code again.
No. In each and every of these cases the design of the language, the quality of community-code (libs) or the quality of the language was the cause.
I'll admit that in all cases, the humans involved where the actual root cause, but that is silly, because it always is. What PHP lacked in all these cases, was guidance, support or limitations to direct these humans to better architecture, or guide them away from bad decisions.
I'm not disliking PHP for silly designs inconsistencies, or hard-to-deprecate insecure functions. I'm disliking it for how it has taught generations of developers to not care about quality, to avoid software design and architecture, to work around hacks, to ignore failing tests, to "it's not a bug, its documented", etc.
To take a more famous, public example: MtGox, the primary Bitcoin Exchange, was hacked, BTC crashed, millions were stolen. Because adversaries breached a poorly written PHP backend service. Yes. MtGox was a bitcoin exchange moving millions a day, written in mostly PHP.
1. MtGox could have been written poorly in any other language and it could have been hacked. We find SQL injections in every language.
2. Facebook started with PHP, still runs a lot of PHP. It's not unsafe.
I've avoided, with care, the statement that PHP is unsafe. I've not even hinted at the statement that it is impossible to write good software in PHP.
PHP is not unsafe. You can write magnificent software in PHP.
But PHP makes the safe often harder than the unsafe. The community even more so. It direct newbies to write crappy software more than that it guides them to learn about architecture, maintenance, patterns. All the stuff the article we're discussing is promoting.
And yes, mtgox could have been hacked even if it was written in pure functions only (well...). What the exact reason is, is unclear. But researchers have pointed out that the sourcecode (leaked by the hackers), contained self-written elliptic curve cryptography, in PHP, which was flawed[1].
Before you comment 'writing your own cryptography is always dumb, has nothing to do with PHP', please note that 1. PHP lacked any libraries for this at that time (it still does?), 2. someone has to write these libs or bindings and 3. in this case it was written, in a language that is -and certainly back then was- unsuited to write such code in.
It was not the language itself. But PHP is more than a language, it is an ecosystem. And that ecosystem has brilliant code and magnificent contributors. But is overwhelmed with crappy wordpress hacks and similar WordPress "developers". As well as, apparently, frequented by people who think it is wise to write their own crypto libraries in PHP for a Bitcoin Exchange.
Not only that, I can almost guarantee that computers were involved in all of those failing projects as well, yet are not receiving any blame for it. Neither does the chairs. Damn chairs always avoiding blame.
Come on, CPUs aren't bedroom project hacked to write a bit of HTML. The depth of knowledge required to make one chip dwarfs all of PHP powered websites.
How about "there are no sides only progress in different areas"? I'm not saying writing PHP is more "valuable" than designing chips. Besides that, what does that have to do with anything mentioned in this very thread?
You mentioned computers hardware. But computers are not a shim like PHP. It's surprising if not disturbing people think PHP is a progress of any kind. But at least it's improving.
It looks like your projects employed PHP poorly. PHP has been great for my company and my developers. We have never had to face such grave consequences because of it, and we've employed it in companies generating millions of $ of revenue.
I will pick it over any other interpreted language.
One mistake was that PHP was chosen, when it really was unfit for the task at hand. Another one was that CMSes like WP or Drupal were shoehorned into projects that were really unfit for them. etc. But also being unable to upgrade underlying PHP versions due to breaking changes, or just p*ss-poor, bug-ridden PEAR packages. As well as the language design prohibiting proper TDD, isolation, etc.
I explicitly said that PHP was but one of the causes. But the language-design and the community certainly did play a significant role. I explicitly never said that you cannot achieve properly designed and maintainable software with PHP. I know you can, because I've also encountered many of those.
> Another one was that CMSes like WP or Drupal were shoehorned into projects that were really unfit for them.
I think this hits closer to the mark than the PHP blame. PHP is just a tool, WP or Drupal are very large codebases that each have their own inherent problems that you are not going to code your way around.
FWIW I've used PHP for a decade and a half and it never let me down.
I would imagine that your team picking WP or Drupal and attempting to shoehorn in your use case had more to do with your projects failing than PHP itself.
I see that happen a lot in the wild, and not just with PHP.
I bet you could have picked a python/node/c#/go CMS with a similar outcome.
I consider WP and Drupal (And Joomla and magento etc) all part of the PHP ecosystem. I consider them part of PHP.
Just like Rails is part of the Ruby ecosystem. Technically, it is wrong to blame Ruby for poor design decisions made in Rails. Like Rails monkeypatching stdlib classes. But Rails can monkeypatch stdlib classes because Ruby lets it. It did a lot of monkeypatching stdlib classes, because it was common thing to do in the Ruby ecosystem back then. So, I therefore, place just as much blame on those poor decisions in Rails as I place them on the language, Ruby. Whats more: I blame both for promoting this idea in the first place. A new dev may open the Rails code and conclude "if a popular framework is doing X, X is probably a good way to solve my issue".
The latter is, and always has been, my largest gripe with PHP. No, WP is not a good example to learn proper PHP development, but it is the thing most new PHP devs encounter PHP and are then stuck with horrible "best practices" for the rest of their carreer.
>> My hatred is based on failing projects, missed deadlines, burnouts, money stolen, severe downtime, and companies going bankrupt.
One can find example of this in almost all the languages. Most of the time mismanaged requirements, bad project planing, bad financial management are the issues for most of the things you have listed rather than the choice of programming language.
And don't forget the most important part - incompetent programmers. It is we, the programmers, who writes all that code that that ends up as steaming pile of garbage. We can't blame others on that one. We need to become better with the tools we have.
Thus it is naive to believe that by switching language you somehow magically will write better code but without doing any effort to improve yourself first.
Better tools lead to better outcomes if all rest remains the same, so I don't think that holds true even if we ignore the fact that languages (and their communities!) incentivize different things and can certainly lead to better code.
Its certainly a lot easier writing good Python than good C, for a quick example.
True, but they are somewhat different tools with different purposes, writing an operating system in Python is a bad idea and doing web in C is cumbersome.
Thus I wouldn't blame Python if I used it for something it wasn't designed for, similar I wouldn't blame the screwdriver if I used it for punching a nail into a board.
There seems to be a constant drive to have one language to rule them all, instead of using specialized languages that are designed for a specific domain.
That is why I think PHP is such a good fit for the web because it is actually designed with that in mind.
One of the gripes that I -and many- have is that PHP wasn't ever "designed" in the first place.
This is changing. Has changed. But for people, like me, who started with PHP back in the 3.x days, and left in the 5.x days, PHP has a bad history. It might overcome this, or already have. But the history sticks to it.
And it begs the question: why make PHP into a new Python, or Ruby or JS, if we already have a Python or Ruby or JS (or Typescript)? Because if any language is actually designed (for a broad sense of that term) for the Web, it is JavaScript.
PHP was made for the web and yes it was never formally designed, more of an ad hoc evolution, thus string functions differ from array functions and so on.
Today however in respect to the many improvements, not only for the language itself but also to tooling, frameworks and libraries, this is largely irrelevant.
And this is also the case when it comes to history, the past is the past, when comparing technologies it needs to be an up to date comparison and not how it was 20 years ago. And with a relevant comparison PHP has won that every time, today as in the past.
But it seems like many out there carry around these grievances about PHP and even if they know that PHP has changed they can't let go, thus we are no longer in the realm of technology but in the realm of the human psyche.
JavaScript early days was similar to PHP early days, ad hoc evolution made by one person. It was much later JavaScript became more formally designed with committees, standards and backed by billion dollar companies.
But JavaScript was actually never designed for the web, it was designed for the DOM, a browser technology. It was much later that JavaScript got things like template literals, tagged templates and multiline strings, these things are essential when doing web, things that PHP has had from the start.
If your language can't put out a proper HTML document without doing tricks it sucks as a web language. Early days of JavaScript was full of unreadable string concatenation, arrays as string builders and just a bunch of functions calls to the DOM API. It was awful.
Because PHP is a community driven language and it is not backed by billion dollar companies, PHP does not afford to invent new language constructs out of the blue or take the risk of designing fringe features that could potentially alienate large group of programmers, PHP needs to stay mainstream so to speak, thus the design of PHP is largely affected by what is happening in other languages, good and bad.
Funny thing here is that much of the criticism against PHP is that it is becoming a Java like language, where Java on the other hand is designed language, but still Java has become a mess with things like Collections, Iterators, Iterables and Streams - all work differently and requires clunky casting between them, and then the checked exception and unchecked exception debate, especially combined with Streams where checked exception is non-compatible.
Thus somewhere along the line a language that historically was designed becomes a language based on evolution because of the simple fact that we still can't predict the future. Therefore the "not designed" argument can eventually be applied to every other other mature language or at least large parts of it.
I haven't worked with recent PHP versions, other than through WordPress, which, if I understand correctly, does PHP a big disservice.
My last serious encounter was when I build and scaled a WordPress hosting company 5+ years ago. Which meant all my exposure to PHP was WordPress, which meant I wanted to avoid it as much as possible.
This such a typical response of people who live in a bubble, and get angry when nobody else in the real world agrees with their insane ideas.
Just because people think PHP is garbage doesn't mean they don't know what they're talking about. In fact, in my experience, the hatred many experience people in the industry have of PHP almost always comes directly from having been forced to use it.
In my case, I've worked on several large PHP projects (100k+ sloc, developed over 10+ years by many people) and it's by far the single worst language and set of tools I ever used.
Literally everything from the language, to the runtime, to the standard library, third party libraries, etc. is just complete and utter amateur hour, and is done so much better in almost any other language ecosystem out there.
I'm glad you're somehow able to make it work for you, but don't pretend it's good. It's really not.
There's trash projects in every language, and I'm not defending any of them. The terrible projects you have seen are written by terrible programmers, of which you have a lot in any popular language. But modern PHP, with Laravel, Symfony, Composer, and not least of all the features of PHP 8 are unequivocally excellent and as good as or in many ways better than what is standard in the rest of the industry, and most certainly not "amateur hour".
But I did end up using CVS for seven years at a commercial company and I hated it with a passion. When I say I hate CVS with a passion, I have to also say that if there are any SVN users in Subversion, users in the audience, you might want to leave because my hatred of CVS has meant that I see Subversion as being the most pointless project ever started, because the slogan for Subversion for a while was, CVS done right or something like that.
And if you start with that kind of slogan, there’s nowhere you can go. It’s like — there is no way to do CVS right. So that’s the negative kind of credit.
https://singjupost.com/linus-torvalds-on-git-at-google-tech-...