Threads for d-marc

    1. 10

      It is trendy to throw hate on PHP but to be honest I really like it. Yes, I can see it’s flaws, it is impossible not to see them but just like that “WAT” talk is a disservice to JS, so is the “a fractal of bad design” for PHP, it makes people focus on the bad stuff, apparently it is cool to hate on stuff.

      One of my favorite things about PHP is not exactly the language but how easy it is to deploy stuff. The idea of copying some files and then being done with it is very easy to grasp for new developers and very comfortable. Compare that with modern best practices of other runtimes where you need to keep stuff like pm2 running, then add something else to monitor the monitor, all in name of a scalability that you might actually not need.

      PHP is approachable and easy, you don’t need to learn a ton of tooling to start doing useful stuff that you can actually ship. I with more languages will copy that.

      1. 7

        I’ve been a PHP developer for the last eight years or so and I send every green PHP developer to Fractal of Bad Design. I think its super important for people to know the weaknesses in the languages they use. I also show them PHP The Right Way which is a valuable resource for how a lot of modern PHP applications are built these days.

        1. 1

          @dsh, I think that is a great approach. My criticism is when people just pick a “fractal of bad design” and then are never exposed to the good things.

          1. 1

            I agree, I’m not a fan of being one sided. Fractal is easily the best criticism of PHP on the internet but I wouldn’t take it as gospel to language en masse - especially if I’ve never programmed in PHP.

      2. 3

        just like that “WAT” talk is a disservice to JS

        Can you elaborate on that a bit? I’ve seen a few unpleasant bugs relating to JS’s … peculiar … type coercion behaviour.

        1. 3

          @duncan_bayne, well, that is only my personal opinion, so please take it as it is and not as a proclamation of truth. Also, this is not a direct commentary on you, please, don’t take this personally. This is a generalized commentary on my experiences dealing with other people.

          Most type coercion problems in JS and other weird behaviors are widely recognized as either real problems or misunderstandings on the part of the developer who doesn’t understand the spec being implemented in the language (for example: missteps when dealing with floats because people don’t understand the spec). Both cases are acknowledged but they can’t be fixed because JS must maintain backwards compatibility with itself lest the web breaks.

          The JS of today was not what was envisioned for the language in its humble beginnings. The fact that it can course correct but cannot erase its tortuous path is a feature. People focusing on the WAT problems foster mobs of “JS is horrible” when it isn’t. It is just not allowed to forget its mistakes like other languages are.

          If people released a new ECMAScript version that broke backwards compatibility and did away with all the WAT problems that are real mistakes, then the web would break and people would be saying “we should have never bet in a language as unstable as JS to develop the web.”. We all want the Web to work, we want to be able to at the same time browse an unmodified website from 1999 and a crazy WASM + Workers direct port of a console Rust app to the web from 2020. There is a price to pay when maintaining such retrocompatibility, Windows knows that too.

          So, my own problem with WAT is that it is often brought up by people who sees the little funny top of the iceberg and throws hate at it, completely ignoring the massive submersed chunk of reasons why something is the way it is, and why that is a feature not a bug.

          1. 1

            No offense taken :)

            I spent around five years doing a mix of JavaScript and Ruby programming, so I definitely get where you’re coming from. Agreed also that there’s no easy way of fixing the problem without hosing backwards compatibility. (Although I never used it myself, I hear that Google had a stab at the problem with Dart).

      3. 2

        Whether or not it is ‘trendy’ to criticize this aside, PHP and JS are taught (often exclusively) to young developers and then serve as platforms for spaghetti-coded monsters. Perhaps PHP can be done well, but I’ve always seen it abused in practice. We might rightly blame bad management, capitalism, or whatever else but the association of PHP and a certain kind of ‘monkey-coding’ is seared into my mind—as are 4GLs like Progress and the film ‘Office Space’.

        1. 2

          Perhaps PHP can be done well, but I’ve always seen it abused in practice.

          I think you could replace “PHP” in this sentence with “software” and have nearly as true a statement.

          I never set out to become a PHP programmer, but I’ve spent a majority of my working life either writing the stuff directly or dealing with its care & feeding in production environments. For years after I first started grappling with a legacy monstrosity in PHP, I felt that the language itself was one of the major sources of my problems. At some point that shifted: For all of PHP’s nontrivial defects, it was hard not to notice that my real problems were generally located elsewhere. In data models, the travails of human communication, the dysfunctions of business, and a thoroughly corrupt & predatory technical industry / culture, for example.

          Later, when I stepped away from PHP entirely for a while and started to survey the landscape, I had a secondary realization: A lot of my assumptions about its overall technical inferiority were on shaky ground. It’s not that PHP isn’t variously terrible. It’s that languages and environments widely held up as a superior contrast are also in fact pretty terrible.

          I haven’t started anything from scratch in PHP for ages, and maybe I wouldn’t these days, but then again… It might be fine. I probably wouldn’t hate the experience of writing it and I’d probably be confident in it still working 5 or 10 years down the line without too hideous a set of contortions in the meanwhile. Which is more than I can say for an alarmingly high percentage of the application code being churned out at present.

      4. 1

        Completely agree that the criticisms of PHP aren’t generally justifiable. Most people think PHP hasn’t evolved since v5.4. The language is fantastic and the OOP is excellent. However, I ended up switching to NodeJS for the ease of using JavaScript both client-side and server-side.

      5. 1

        PHP is approachable and easy, you don’t need to learn a ton of tooling to start doing useful stuff that you can actually ship. I with more languages will copy that.

        FWIW this is why I think “developer experience” is of supreme importance to languages and frameworks. It trumps almost everything, in terms of importance. I’ve been thinking about this recently, a lot, as I mull over a Lisp based dev stack for mobile.

        You can have the best language in the world, and if your dev experience is like pulling teeth, a language like PHP (no offense ;) ) will beat you every time.

    2. 2

      I guess everyone’s an evangelist for whatever stack they use. I see the same behavior with native mobile developers as well. Personally, I just like to use Javascript for as many things as possible, since it’s a universal language almost.

    3. 4

      I completely agree with this. What’s the point of making a custom website for an ecommerce of basic company website anymore for most people? There’s so many nice templates on services like Shopify and Squarespace. Better to just recommend those services for simple sites.

      1. 4

        Absolutely, in most cases. Personally I’m building my own ecommerce site because it’s fun and I can do it exactly my way without restrictions. It’s not economical sure, but I feel like I’m getting a lot out of it. Would I do that for a client? I’d have to be insane (I work with Shopify daily, it’s great).

        1. 2

          Exactly my thoughts! I’d code it myself if it were for my own stores, but seems like a waste of effort for (most) customers.

    4. 2

      I started using a 16” MBP at my new job, and it’s … fine. Like, my personal machine is a 2015 15” MBP, all maxed out, and, while this thing is faster, and I have to say that I’m pretty ok with the Thunderbolt/USB-C only move; the keyboard is meh and the Touch Bar is totally pointless. I’ve never had problems with the OMG HUEG trackpad, but that’s probably because I use an external keyboard and mouse/trackpad whenever possible with laptops.

      1. 1

        the keyboard is meh and the Touch Bar is totally pointless

        I hear those things said really commonly as an opinion, but I actually real like both. I love the satisfying clicking sound the keyboard makes and I like the touch bar for simple tasks. On Zoom meetings, it’s really nice to be able to mute, hide camera, view settings, etc. right on the touch bar. I guess to each his own.

        1. 1

          For me, I rarely use the laptop without an external keyboard, so the Touch Bar is just not ever something I’m going to reach for.