February 13th, 2021

(no subject)

From a job advert for frontend developers:

- You’re stellar with React, and you regularly use hooks, portals, and context. Part of why you’re so solid with those is because “Vanilla JavaScript” is a happy place for you; you deeply understand how those work, and you’re just fine working with or without frameworks.

- You understand and practice clean code principles, such as SOLID, DRY, and YAGNI, and how to apply them to the problems at hand.

Now, SOLID is a very concrete set of principles relevant for object-oriented programming. I do not think I have ever consciously written anything according to the SOLID principles. I have written UI components; but whether a component has a "single responsibility", I have no idea. Besides, they often weren't classes. The open/closed principle, even after uncle Bob's explanations, is still a mystery to me. I have almost never written subclasses; so I had no need for Liskov substitution principle. Don't know if structural typing in typescript, which we do all the time because this is the nature of the language, counts as an example of Liskov substitution... And I have never properly understood what the point of dependency injection is. Angular famously does it; they even invented their bespoke module system to enable this; I've no idea why. Compared to non-Angular codebases, it doesn't look especially compelling.

In any case, if SOLID at least has some theoretical foundation worth talking about, DRY and especially YAGNI are almost unquantifiable gut feelings.

And given that, before namedropping SOLID, they mention React, which is emphatically non-object-oriented, one has to wonder how much bullshit is in this text.

- On top of being a great front-end engineer yourself, you are proud to mentor others to level up the entire team.

Oh, come on, proud? Not "capable", not "willing", not "happy" even – but "proud"? How pompously American is that!

(no subject)

A guy is talking to mostly junior frontend developers about how to build their portfolio.

What shocked me the most was the importance he assigned to having the dark mode. Following the trends, he says.

It adds to the general impression of a hodgepodge of ideas on the slide.

(no subject)

There's this strange thing going on: React-based tools, such as Next.js and Gatsby, are begrudgingly acknowledging that React is a pretty hefty library, and are introducing options to remove it (along with the rest of javascript?) at build time or before sending the page to the browser.

Which kinda transforms React from a client-side or universal component library into just a server-side templating library.

This is understandable, given that it removes around 30-40 kB or React and all other bytes of imported libraries; but what weirds me out is why, if this is the case and if this is important for your project, use React at all. If you don't need it on the client, why have it on the server? Is it that much superior than, say, nunjucks?

I appreciate that it's probably easier (probably; perhaps nunjucks has an answer to that) to deal with assets such as css or images by hijacking javascript imports in something like React components, and offloading all the processing and linking work to something like webpack; but if you actually want to use some javascript on your page, aren't you now in a rather insane territory when you have one client-side javascript framework on the server, and a completely different, lighter-weight, javascript solution on the client? Wasn't "isomorphism", i.e. ability to run the same code both on the client and on the server, one of the selling points of React, Vue, Svelte et al?

(no subject)

So much good stuff happening on reddit (or Twitter, or whatever is the source):

By the way, the original bit of comedy contained a warning that recording of that hearing was prohibited and would be penalised with a fine of up to $500 or a jail term up to 180 days. Yet someone recorded the hearing regardless. Has anyone been penalised, I wonder.

(no subject)

would anyone
(especially anyone with at least some web dev experience)
use square brackets
— with spaces!!! —
in class names?

A space is an attribute separator. So each element with these square-bracketed classes acquires a class called "[" and a class called "]". Why would anyone do something so blasphemous?

(github link)