1. 14
  1. 24

    In the “Why PHP?” Section:

    The answer is simple: because it was there. I’m self-taught, and I don’t have much in the way of formal training. Except maybe for the occasional online course I’ve taken, I have no piece of paper with a stamp on it from a prestigious university that says I can tell computers what to do.

    This is the crux of it, and there’s a lot of implicit things going on in these sentences. First off, there is a clear jab at people who do have degrees and formal training. “Prestigious” is used pejoratively and sarcastically here. This wasn’t the author’s path, so they resent people who did take that path. Of course when you are self taught, you skew towards any tool that can get you up and running the easiest and quickest. Note how I said “up and running” - it’s not the tool that is best in the long run, it’s the tool that gets you a picture on the screen the quickest. By the way, there’s value in that too, but I wouldn’t base all of the dimensions of my evaluation just on something “being there.” Availability is valuable, but it’s not the only valuable quality.

    This is a viewpoint that’s very common in the industry, I personally meet a lot of people who share this mindset. I don’t think it’s entirely wrong, but I think it’s a very limited way of thinking, and the people who hold it tend to be self-righteous like this. I understand that PHP might have been your path, and it might have worked for you. But a tone like this reeks of criticizing and minimizing other people’s path. I get that they feel defensive because people are attacking PHP, but I don’t think that’s causing this philosophy, I think this is many people’s true philosophy under the hood, this was just an excuse to write about it.

    Where does this philosophy come from though - can anyone name any popular programming language that was designed for “CS graduates?” Python? Java? Javascript? These are the most pragmatic and un-academic languages on Earth. The pragmatists and proudly un-educated have won, why are they claiming to be the ones that are being persecuted?

    Btw, if it’s important to anyone, I don’t have a CS degree, I studied Electrical Engineering. I definitely took CS electives, but I also consider myself mostly self-taught in terms of actual programming and CS. But I don’t knock the academic side of CS, on the contrary I think it’s responsible for every single good idea that makes its way into “practical” programming languages.

    1. 12

      I don’t necessarily have a problem with people using something that gets content on a screen quickly. But I don’t accept the excuse that self-taught means you can’t or shouldn’t grow beyond that. I’m self taught. I don’t even have a college degree and yet I learned Haskell. I can write Rust code. I started out in PHP but I outgrew it eventually. Anyone who can become an expert in PHP can do the same.

      It’s fine to get payed to write PHP. There is code out there that needs maintaining in PHP. But PHP earned it’s reputation as a deeply unsafe language to develop in and even with the improvements the language has made much of that unsafe core still remains.

      1. 5

        While the author of the article is being contemptuous to those with more educated backgrounds, I think you’re doing a bit of the converse here. Programming is as wide as humanity itself; if there’s a way for a computer (for some definition of computer) to accept input and provide output, I can guarantee you that someone will have probably programmed it. There doesn’t need to be a single, good path to programming. Whether your path involves writing PHP, unsafe C, or Haskell, it doesn’t really matter.

        1. 3

          It’s difficult in a comment forum to give an appropriately nuanced take on stuff like this. I didn’t intend to come off as contemptuous. If you get hired to help maintain a PHP codebase then the responsible appropriate thing to do is to work on PHP code. There is no shame or condemnation for it.

          Sometimes though I think people get stuck or pigeonholed as “PHP developer” or “Python developer” and never learn other tools or approaches. I want to encourage those people that they can be more than just $LANG developer. There are better tools than PHP out there that you can use when you get the opportunity. Learning to protect yourself from the flaws of a given language is a valuable skillset. There is no shortage of work for people who became experts in avoiding the pitfalls.

          But ,when you have the opportunity, it is hugely valuable to be able to choose a language with less pitfalls. Where the defensive programming is less about defending against the language itself and more about defending against the environment your software has to run in. Being able to choose those languages is also a valuable skillset that no one should feel is out of their reach.

          1. 1

            But ,when you have the opportunity, it is hugely valuable to be able to choose a language with less pitfalls. Where the defensive programming is less about defending against the language itself and more about defending against the environment your software has to run in. Being able to choose those languages is also a valuable skillset that no one should feel is out of their reach.

            Great explanation of this idea.

            1. 1

              It’s difficult in a comment forum to give an appropriately nuanced take on stuff like this. I didn’t intend to come off as contemptuous. If you get hired to help maintain a PHP codebase then the responsible appropriate thing to do is to work on PHP code. There is no shame or condemnation for it.

              I figured which is why I tried to keep my reply soft. I agree with everything you just said.

        2. 11

          Also, a CS degree doesn’t teach you programming anyway. It’s not meant to. It teaches you CS (or at least tries to). You probably self teach some programming along the way but it’s harly a focus of coursework.

          1. 5

            I don’t think that’s universally true. The first two years of required classes for a CS degree at the universities around me (US) were heavily focused on programming (Java… C++…), and failing any of those would have meant no CS degree.

          2. 8

            But a tone like this reeks of criticizing and minimizing other people’s path.

            I don’t entirely agree with your interpretation, but I will note for sake of irony that this is more or less how un-credentialed (in the sense of not having a degree in CS or other “relevant” field) developers feel for pretty much their entire careers. There’s a huge and powerful trend in tech hiring of prioritizing people who have a degree from one of the handful of trendy top universities, and a feedback loop wherein people who work at major companies help develop and teach “how to pass our interview” courses at those universities. The result is that if you are not someone who has a CS (or other “relevant”) degree you are constantly the odd one out and near-constantly being reminded of it.

            I still feel this coming up on 20 years in to the industry and with a résumé that largely lets me avoid a lot of the BS in interviewing/hiring.

            1. 4

              I still feel this coming up on 20 years in to the industry and with a résumé that largely lets me avoid a lot of the BS in interviewing/hiring.

              (I’m hoping this comment isn’t too off-topic.) I certainly agree. I myself come from one of those trendy elite CS universities (though it’s been a good while at this point) and am well credentialed, but I’ve started to use large numbers of junior engineers out of good schools to usually be a light negative signal when applying for a company. The culture of hiring in software is such that companies often overselect for credentials while ignoring effectiveness, at least in my opinion.

              1. 2

                There’s a huge and powerful trend in tech hiring of prioritizing people who have a degree from one of the handful of trendy top universities

                This depends entirely on your experience. I’ve never seen this trend, I’ve seen quite the opposite - a large chunk of people I work with don’t come from a CS or engineering background. Nor do I see anyone being hired over someone else because of where they went to school.

                1. 3

                  The fact that you’ve never seen FAANGs go on-campus at certain universities (but not others) to recruit, help develop “how to pass the interview” curriculum to be taught at certain universities (but not others), etc., doesn’t mean that it doesn’t happen or that it doesn’t have an effect both on their resulting workforce/company culture and on everyone who emulates their hiring (which is unfortunately a large chunk of the industry).

                  1. 1

                    Let me repeat what I said:

                    This depends entirely on your experience.

              2. 7

                can anyone name any popular programming language that was designed for “CS graduates?”

                My glib answer: yes. Go. From Rob Pike, the creator: “The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt.”

                More seriously, I think this “self-taught persecution” attitude is related to imposter syndrome and the increasing credentialism in society. A former coworker of mine tended towards a self-defense attitude and I chalk that up to his not having a CS degree as a developer (he did, however, have formal training as a jazz musician).

                It’s also not as if PHP is alone in this hate—C is probably hated just as much, if not more, than PHP.

                1. 3

                  Yet if you know C well, you’re probably seen as much better “programmer” then if you knew PHP well. But yeah, perceptions.

                  1. 3

                    Rent seeking isn’t hate. C dominates everything. So if you invent a new programming language, there’s only two paths to being successful. You can either (1) appeal to the new generation of young people to learn your language instead of C. That’s how PHP and Node did it. Or (2) you can run PR campaigns vilifying C until you’ve convinced enough VPs to convert their departments. That’s how Java did it.

                  2. 4

                    I agree with everything you said here. I even share your perception that many people seem to be insecure and/or defensive about not having a CS background or not really understanding some of the popular concepts we read about in blog posts, etc. Like you said: The “pragmatists” won- what are they worrying about?

                    In some ways, computer programming is very much like engineering– engineering jobs/tasks/people fall on a wide spectrum of “how academic” from “glorified assembly line work” all the way to “indistinguishable from pure science research.” And attitudes similarly span that spectrum. That’s not a bad thing–just an observation.

                    What’s extra frustrating to me is that it’s now turned a corner where if you do criticize a language like PHP, you’re seen as an irrational troll who just thinks you’re smarter than everyone else. It’s become anti-cool to shit on PHP, even though it’s still literally the least capable backend language being used today besides maybe Python (no async, no threads, no generics in its tacked-on type system, object equality is not customizable and will crash your program if you have a ref cycle, etc).

                    1. 3

                      As a developer that has experience building web backends in PHP but also some experience with Go, Python, Ruby (w/ Rails) and Rust, I wonder what language you deem capable as a backend language that still provides the same level of abstraction as, say, Laravel or Symfony. Rails obviously comes to mind, but what else is there (if Python w/ Django is out of the question)?

                      1. 3

                        Keep in mind that I’m not trying to evangelize “the one true backend language” or anything like that. My main point was just to gripe that there are still (what I consider to be) legitimate criticisms of PHP as a (backend) programming language, but whenever I point them out as reasons that I might suggest someone avoid starting a project in PHP, I’m met with more skepticism and defensiveness than I think is justified.

                        The secondary point is that I truly believe that PHP is strictly inferior to other backend programming languages. What I mean by that is that we all work differently and have different preferences: some people will like dynamically typed languages, some will like statically typed; some like OOP, some like FP. That’s all great. Scala is a very different language than Go, which is a very different language than Clojure. But if you look at “modern” PHP projects and “best practices” advice, it’s almost literally the same thing as the “best practices” for Java 7 in 2010, except that PHP doesn’t have good data structures in its standard library, has no threading or async, no generics, etc. And if you compare modern PHP with a recent version of Java… oh, boy! Java now has ADTs, Records, Streams, and a few other really nice additions that make writing code a little less painful.

                        So, it’s not just that I think PHP is a bad language, it’s that it’s, IMO, a less capable subset of another language. If it were actually different, then I might just shrug it off as a preference thing. I mean, PHP even stole the class semantics right from Java (single inheritance, interfaces, static methods, abstract classes, final keyword, etc).

                        I know people love Laravel, but my contention isn’t that Laravel isn’t good (I don’t honestly have much experience with Laravel, but I have worked with Symfony). But Laravel is not PHP. I’m talking about the language. If there’s something written in PHP that’s so valuable to your project that you choose to work with it, that’s great. But in my opinion, the sane attitude should be one of “Well, I guess it’ll be worth it to deal with PHP so that we can use XYZ.” and not “PHP is a good language and @ragnese is just an anti-PHP troll. What backend language could possibly want async IO or easy fire-and-forget tasks, anyway?”

                        1. 3

                          I don’t like rails either for slightly different reasons. I would rather develop in Go if I’m creating a backend web service than Python, Ruby, or PHP. I don’t find that I usually need much more abstraction than say gorilla most of the time. And Go doesn’t suddenly surprise me with strange behavior as often.

                          1. 2

                            The person they’re asking definitely doesn’t use Go though, because of:

                            no generics in its tacked-on type system

                          2. 3

                            Phoenix in Elixir is pretty good — very batteries-included, high-velocity, and extremely good with async/concurrency/parallelism. I don’t know if “object equality is not customizable” applies, it’s immutable with value-based equality at all points, so…

                            The tacked-on type system is pretty awful (Dialyzer is well worse than, say TypeScript, mypy, or Sorbet) but I don’t think it’s strictly worse, considering what you get from the framework/library.

                            1. 2

                              Based on their complaints (“no async, no threads, no generics in its tacked-on type system, object equality is not customizable and will crash your program if you have a ref cycle, etc”), and assuming they’re not using a really esoteric language, I’m willing to bet they use Scala, Java, C#, or Rust. I’m definitely curious about this too.

                              Whether or not those have a web framework that competes with Laravel, I’m not sure. That’s also not the measure of success though, for example if people are working with a lot of services a monolithic web framework isn’t as important or even desired. That’s one other thing to consider here - I think it’s accurate to say that PHP is synonymous with building monolithic web apps, and not everyone builds monolithic web apps.

                        2. 14

                          PHP isn’t dead. That much is obvious if you look around the industry a little bit. I’ve personally never said PHP was dead.

                          However PHP lost my trust years ago. I’ll never write another line of PHP nor will I willingly work on maintaining an existing PHP codebase. Fool me once shame on me. Fool me twice… Well you know how that quote ends.

                          1. 7

                            I would love to hear more about how you lost trust in a language that has grown considerably in the last couple of years (decade?) to be a more “mature” language with a pretty in-depth feature set. I’ve built a career working in PHP (and other languages too, but mostly PHP), so statements like this always pique my interest.

                            1. 7

                              This is probably in part because it lost my trust several decades ago. There are so many great languages that I can be employed to write that don’t have any of that historical baggage to deal with. Java, Go, Rust, C#. Why go back to a language that due to backwards compatibility will always have footguns waiting in the codebase for me. Layering on safer ways to do things can improve a language over time but unless you also remove the highly unsafe bits as you go the language will always fundamentally be working against you.

                              I have the luxury of not having to choose PHP ever. I’m grateful for it.

                              1. 3

                                That’s understandable. I began my career with PHP in the early 2000s, migrated towards C/C++, C#, node and eventually Go before coming back to PHP.

                                The PHP of today is very much not the language it was ten years ago*, doubly true for 20 years ago. While it’s still my daily driver I do enjoy working in Golang, TypeScript and both React and Vue on the front end.

                                1. 1

                                  Its very true to look at some legacy PHP codebases and wince in terror at all the bad stuff. I agree as well, that they need to seriously look at removing some legacy from the codebase - but you have to admit its kind of impressive how well they have managed to keep a lot of backward compatibility. I always recommend every PHP developer, especially new ones, read A Fractal of Bad Design to understand how PHP got the reputation it has. But then to also read PHP The Right Way so they can contribute to our larger application codebase efficiently.

                                  Like everyone else has said though - the langauge and ecosystem has evolved quite a bit and when you look at it as say, middleware between a client (browser) and other services (databases, queues, what ever), you see it fits nicely as a solution for certain problems. If I’m thinking about building a website, or webapp, or simple RESTful service, I will always grab PHP first but I would never say some one not using is wrong. I don’t care what brand of hammer you use, as long as we’re hitting nails.

                                2. 2

                                  Seconded. I’ve been working with PHP (but not exclusively PHP) for over a decade and have never experienced anything that would cause me to put down such a statement. Very much interested to hear what happened.

                                3. 8

                                  I don’t do web programming in general, but I won’t even work for a company that uses PHP. I take that as a sign the company does not make good decisions. Cheers.

                                4. 10

                                  PHP isn’t dead if you mean “nobody’s hiring for it.” But there are some other ways to be dead or dying:

                                  • No new interesting techniques or libraries are coming out of the community.
                                  • Most jobs are legacy projects, not greenfield development.
                                  • Developers don’t find learning it exciting or rewarding.

                                  I think all of these are at least partially true for PHP.

                                  1. 3

                                    It really depends on where you look, all of your points could be argued as partially true for any language.

                                    For example, I am a somewhat immersed lurker in the PHP community so I see interesting projects crop up daily; the last two jobs I worked both had large 250k LoC greenfield projects in PHP and I have inherited a very large legacy PHP project in my current job that we are working on refactoring into node + modern PHP.