So when I started programming in 2001, it was du jour in the communities I participated in to be highly critical of other languages. Other languages sucked, the people using them were losers or stupid, if they would just use a real language, such as the one we used, everything would just be better.

Right?

This sort of culturally-encoded language was really prevalent around condemning PHP and Java. Developers in these languages were actively referred to as less competent than developers in the other, more blessed languages.

And at the time, as a new developer, I internalised this pretty heavily. The language I was in was blessed, obviously, not because I was using it but because it was better designed than a language like PHP, less wordy and annoying than Java, more flexible than many other options.

It didn’t matter that it was (and remains) difficult to read, it was that we were better for using it.

I repeated this pattern for a really long time, and as I learned new languages and patterns I’d repeat the same behaviour in those new environments. I was almost certainly not that fun to be around, a microcosm of the broader unpleasantness in tech.

At least, until I got called on it.

  • onlinepersona@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 days ago

    Other self-taught narratives, such as starting with Wordpress-based design backgrounds and moving from more simple themes to more complex themes where PHP knowledge is required, to plugin development is a completely valid narrative, but a path that is predominately for women.

    Where the heck did that come from? What does any of this have to do with women? Are most Java and PHP developers women?

    The argument the author is trying to make is hinged upon this argument that comes out of nowhere. The rest of the article makes some good points but has more of these deviations that just break the flow and make me say “what does that have to do with anything?”.

    My problem with PHP is the language and the ecosystem. I’m genuinely impressed that people are able to build useful things with it, but the language is, at least to me, far from easy. Starting with array not being an array but a hashmap/dictionary, to complete clusterfuck that many projects are in terms of setting up and tooling. Only C and C++ projects can beat that (or so I have experienced). There is just an assumption that whoever’s picking up a PHP project knows LAMP and its components, has root access, and won’t be using a debugger.

    The PHP debugger has been one of the most frustrating debuggers I’ve ever had the displeasure of trying to setup. You have to know how to configure php itself, which extensions to install, how to configure those, and how to setup whatever editor or IDE you have to interact with the debugger. Most PHP projects I’m come across haven’t set it up and I can understand why.

    Also, to use PHP sensibly, you have to learn about zend or whatever the name of that big framework is. But that can break in the most mysterious ways and for PHP beginners it can be a nightmare to understand what went wrong. Add in that its favorite pattern is dependency injection and the language isn’t typed and understanding code is downright awful.

    One of my bigger gripes is that many projects do not use containers whatsoever. It’s either LAMP on your machine or good luck getting that thing to run. If you’re new to PHP, well fuck you, you should’ve known PHP before trying to contribute to the project - that’s what it feels like. There are often C/C++ like guides for setting up. first “sudo apt-get install some stuff here”, oh wait, you don’t use debian? Fuck off chump.

    I have sworn off touching PHP projects ever again. The experience has left me scarred.

    Anti Commercial-AI license

    • Hexarei@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      15 hours ago

      As someone who has written a lot of PHP professionally over the last ~13 years (and a fair bit of other languages - JS, Rust, C++, Python … I try to reach for whatever solution fits the problem) I feel your frustration with some things but wanted to point out that some of those things that have changed heavily in just the last 4-5 years. Apologies in advance for the wall of text, lol:


      The PHP debugger has been one of the most frustrating debuggers I’ve ever had the displeasure of trying to setup…

      That’s still pretty valid. XDebug is still utter garbage to work with in my opinion. I wish it were better. That said, I haven’t tried actually using it in several years so it could be better and I just don’t know about it.

      Also, to use PHP sensibly, you have to learn about zend

      Zend hasn’t really been industry-relevant in some 12-13 years, and yeah … it was super rough. I basically hated every line of Zend code I ever wrote.

      That said… the same kind of thing is true for a lot of languages. To use Python sensibly (for web, anyway…) you have to learn Flask or Django. To use Rust sensibly you have to learn Actix, Warp, Axum, or Tide. To use JS sensibly, you have to learn React or Vue or Svelte or Alpine or any of the thousand frameworks that come out for it daily.

      For PHP the big ones are Laravel, Symfony (Laravel uses a fair bit of it under the hood), CodeIgniter, and CakePHP.

      or whatever the name of that big framework is.

      The most popular framework over the last decade or so is Laravel, and it’s also my favorite. So I’m assuming that’s the one you mean. And… yeah, even modern PHP wouldn’t really be worth writing without it in my opinion. It focuses hugely on developer experience, greasing the wheels in huge ways and eliminating loads of boilerplate both in-app and in its tooling. It is SO SO SO SO SO MUCH BETTER than the others in my personal opinion. Genuinely transformative to the PHP experience, tries to make things as frustration-free as it can.

      There are of course many rather valid criticisms of it - Mostly around how being “batteries included” means it’s rather opinionated. Using Laravel means you either do things the Laravel way or you struggle… but with how much it simplifies, it winds up being worth learning to do things the Laravel way in my experience.

      But that can break in the most mysterious ways and for PHP beginners it can be a nightmare to understand what went wrong.

      For raw PHP in general … yeah. again, I agree. Yet again though, that’s also true for lots of other languages (explain a segfault to a C++ beginner), and thankfully Laravel includes a very detailed and helpful stack trace and debugging page - Any thrown exception will result in a page like this with an interactive stack trace:

      I think Symfony, CodeIgniter, and CakePHP all include something similar these days.

      Add in that its favorite pattern is dependency injection

      Patterns are a preference thing, I realize it’s not for everyone. I don’t generally use dependency injection

      and the language isn’t typed

      Modern PHP is actually typed! It doesn’t require that you use types, but you can absolutely specify types for variables, class attributes, function parameters, return values… And an exception will be thrown if something tries to use an incorrect type. It is still dynamically typed, so it’s done at runtime. Which kinda bites sometimes. However, there are static analysis tools like PHPStan that do a great job of helping avoid typing-related issues.

      It’s not a perfect typing system but since sometime around PHP ~7.2 it became fairly nice to typehint basically everywhere and it’s only continued to mature and get better over time - It’s missing some things of course (I want generics!), but it’s way better than the nightmare that was PHP 5 and older.

      One of my bigger gripes is that many projects do not use containers whatsoever…

      Yeah this is another thing that is a “vanilla PHP issue” that Laravel solves quite will imho - Through a very batteries-included package called sail. For most Laravel projects, it’s a one-time 10-minute setup/configuration process for the developer, which should become a single command for other devs. And even then all it does is setup a bunch of sane defaults for running docker compose up, along with a bunch of shortcuts for running commands within the containers. Just today, I lent a coworker a hand with a project they had already set up to run via sail, and it was

      git clone [project]
      cd [project]
      sail up
      

      and I had a working setup as soon as the containers were ready.


      Sorry, I didn’t initially set out to write this as a love letter to Laravel, but I noticed your frustration appeared to be (largely) related to older versions of PHP and thought I’d mention that things have changed loads in the past few years. And then basically any time I’m doing something in PHP I use Laravel because I like it; And I work in PHP a lot because I work for a mostly-PHP shop. That said, even when I’m working in other languages, I often find myself wishing I had features from Laravel. Stuff like collections, Eloquent, storage disks, pipelines… It’s a long list.

      • onlinepersona@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        Thank you for typing all that out. PHP seems to have come a long way (or at least thanks to Laravel). Probably the reason I still encounter projects without Laravel are because there are many old and established PHP projects out there from before whenever it became popular. Probably switching to a new framework is too much work for them (quite understandable), but they have unfortunately majorly tainted my PHP experience.

        I’m glad you’re enjoying PHP and have given me another perspective on the subject.

        Anti Commercial-AI license

  • Grandwolf319@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    2 days ago

    This is really odd cause one of the first things I learned as a dev is that there is no one superior tool, otherwise everyone would use that instead of the right one for the job.

    • Badland9085@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      You come from a healthy background is what I’m hearing. And that’s good, and I don’t mean that in a derogatory way. What you have there is absolutely the right mindset to have. These tools are made by humans, who have their own set of problems they want to solve with their tools. It may not be the best tool, but it can work pretty damn well.

      However, it’s also not uncommon to see communities rage and fight over the superiority of their tools, if not just to shun those that they think are inferior. It’s a blatantly childish or tribalistic behaviour, depending on how you look at humanity. And you’ll see this outside of programming too; in the office, in town, on the streets. People engage in this behaviour so that they can show that “I am on your side”, for the side where they think is the right or superior side, based on factors like a perception of group size, a perception of power, a perception of closeness. It appeals to a common human desire to belong to a strong group. It appeals to the human desire to feel safe. And when you start looking at it that way, that’s not too different from how animals behave. It’s important to note that not all humans have the same amount of desire for this sort of tribe, or would give into that desire to engage in such behaviours, but it’s not surprising to see.

      In any case, this article is essentially a callout to the sort of toxic behaviour done for the sake of feeling superior, that exists within the programming community, to a point where some may even say is a major subculture.

  • Womble@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    4
    ·
    edit-2
    2 days ago

    So should we be entirely uncritical of whichever language people choose to use because it might be percieved as offputting to someone? Would someone writing in brainfuck or whitespace or FORTRAN66 for an actual project (i.e. not just for their own interest) not be subject to critisim for that choice?

    Discussion of how languages have bad features and what they could do better is how progress gets made and languages improve over time. I personally find it annoying the level of recent dumping on python that seems to be popular, but they often have a point. Those points are useful in figuring out either how to make those languages better or how the next language to be created should be. Labeling that as problematic and “actively participating in the exclusion of women from STEM” seems to me to be a huge reach.

    • BradleyUffner@lemmy.world
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      2
      ·
      edit-2
      2 days ago

      Criticizing a language is fine, but many people take the fact that someone else uses a language they don’t like personally and call them idiots and fools for it.

      That’s the attitude this blog post is arguing against

      Other languages sucked, the people using them were losers or stupid, if they would just use a real language, such as the one we used, everything would just be better.

      • Womble@lemmy.world
        link
        fedilink
        English
        arrow-up
        10
        ·
        edit-2
        2 days ago

        If they had stuck to that I wouldnt have an issue with it, but they broaden it out to

        I’m tired of calling people out again and again for dumping on PHP.

        I’m tired of people dumping on Windows, that most popular operating system, because it’s not what we choose to use

        I dont see critising PHP or Windows as a problem, both have serious faults. The argument put forth here conflates two things: That critising a language is bad (fine IMO), critising people for liking a language is bad (not fine). We should welcome the former while insisting the later isnt acceptable.

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    2 days ago

    What’s right is right no matter who says it. I don’t need to use Python to say I hate that Python has load-bearing whitespace. That’s part of why I don’t use Python. And if some Python diehard says Javascript both sucks and blows, I’ll probably agree with them, because I use that shit and it’s awful.

    Every programming language is awful.

    Programming is awful.

    It’s the intersection of pure untouchable mathematics and hard grinding engineering, as expressed through plain text. You have to be broken in a specific way to wrap your head around this nonsense. That’s why we’re all the same kind of snark-filled dork. It’s why Basic and visual scripting never catch on as intended - they’re beautifully simple, but normal people Do Not Get It, and anyone who does get it would be equally at-home with a 6502 cheat-sheet and WozMon.

  • McMonster@programming.dev
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    2 days ago

    The same also applies to other things, like tools.

    I’m working in Java ecosystem and there’s a noticeable trend to look down on people who don’t use IntelliJ Idea. I’ve recently joined a new project and I was strongly encouraged to use it. Therefore I’m currently 3 weeks into my 4th attempt over past 10 years to switch to this tool and it simply doesn’t work for me. I’ve been using Eclipse since around 2007, know it very well and it gets the job done. I will not claim that it is better than Idea. I just don’t think switching would give me enough return on investment. Especially now, as I’m still learning the new project.

    Another reason not to switch is to avoid becoming dependant on an expensive tool. My current team is using Ultimate edition and I’ve noticed that they are really depending on the extra features.

  • Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 days ago

    There are a lot of programming languages. Also, features can often be hacked onto or off of a language. It’s therefore important to be able to quickly reject a language based on undesirable features. It’s also important to recall the big picture: to maintain a large amount of instructions or transformations which have been proven correct. Anything which gets in the way of that big picture should be quickly rejected.

  • aaron@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    9
    ·
    2 days ago

    I hate random programmer blogs. Always the most inane shit.