Hammer and nails

There is a Linux distribution called Gentoo, named after a type of penguin (of course it’s named after a penguin), where installing an app doesn’t mean that you download a working app. Instead, when you say “install this app”, it downloads the source code for that app and then compiles it on your computer. This apparently gives you the freedom to make changes to exactly how that app is built, even as it requires you to have a full set of build tools and compilers and linkers just to get a calculator. I think it’s clear that the world at large has decided that this is not the way to do things, as evidenced by how almost no other OSes take this approach — you download a compiled binary of an app and run it, no compiling involved — but it’s nice that it exists, so that the few people who really want to take this approach can choose to do so.

This sort of thing gets a lot of sneering from people who think that all Linux OSes are like that, that people who run Linux think that it’s about compiling your own kernels and using the Terminal all the time. Why would you want to do that sort of thing, you neckbeard, is the underlying message, and I largely agree with it; to me (and most people) it seems complicated and harder work for the end user, and mostly a waste of time — the small amount of power I get from being able to tweak how a thing is built is vastly outweighed by the annoyance of having to build it if I want it. Now, a Gentoo user doesn’t actually have to know anything about compilation and build tools, of course; it’s all handled quietly and seamlessly by the install command, and the compilers and linkers and build tools are run for you without you needing to understand. But it’s still a bunch of things that my computer has to do that I’m just not interested in it doing, and I imagine you feel the same.

So I find it disappointing that this is how half the web industry have decided to make websites these days.

We don’t give people a website any more: something that already works, just HTML and CSS and JavaScript ready to show them what they want. Instead, we give them the bits from which a website is made and then have them compile it.

Instead of an HTML page, you get some templates and some JSON data and some build tools, and then that compiler runs in your browser and assembles a website out of the component parts. That’s what a “framework” does… it builds the website, in real time, from separate machine-readable pieces, on the user’s computer, every time they visit the website. Just like Gentoo does when you install an app. Sure, you could make the case that the browser is always assembling a website from parts — HTML, CSS, some JS — but this is another step beyond that; we ship a bunch of stuff in a made-up framework and a set of build tools, the build tools assemble HTML and CSS and JavaScript, and then the browser still has to do its bit to build that into a website. Things that should be a long way from the user are now being done much closer to them. And why? “We’re layering optimizations upon optimizations in order to get the SPA-like pattern to fit every use case, and I’m not sure that it is, well, worth it.” says Tom MacWright.

Old joke: someone walks into a cheap-looking hotel and asks for a room. You’ll have to make your own bed, says the receptionist. The visitor agrees, and is told: you’ll find a hammer and nails behind the door.

Almost all of us don’t want this for our native apps, and think it would be ridiculous; why have we decided that our users have to have it on their websites? Web developers: maybe stop insisting that your users compile your apps for you? Or admit that you’ll put them through an experience that you certainly don’t tolerate on your own desktops, where you expect to download an app, not to be forced to compile it every time you run it? You’re not neckbeards… you just demand that your users have to be. You’re neckbeard creators. You want to browse this website? Here’s a hammer and nails.

Unless you run Gentoo already, of course! In which case… compile away.

More in the discussion (powered by webmentions)

  • Bruce Lawson. At home. responded at twitter.com
  • Jonathan Beckett responded at twitter.com
  • Seán Doherty responded at twitter.com
  • Gamer Geek responded at twitter.com Stuart Langridge: Hammer and nails kryogenix.org/days/2020/05/0…
  • Bruce Lawson. At home. responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Luke Armstrong responded at twitter.com The thing is, React et al do support Server-side Rendering, just that people don't do it because it's hard and means they have to get into DevOps to g…
  • Luke Armstrong responded at twitter.com SPA with SSR is very fast. (See Gatsby)
  • Léonie responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Petros Amiridis responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Simon Everest responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • André Jaenisch responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Rob Connolly responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Rik Arends responded at twitter.com This is a bit of an oversimplification, since most browsers compile your 'site' with personalised datafeeds. Either have a server do this or your clie…
  • Ian Pouncey responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Niaccurshi responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Luke responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Stuart Langridge responded at twitter.com step 1: enable server-side rendering step 2: render the page to plain HTML on the server step 3: serve the plain HTML :-)
  • Luke Armstrong responded at twitter.com Look at the React docs to do that, then consider wtf you have to do if your team is deploying to a LAMP stack as the application used to be PHP but th…
  • Tina Holmboe responded at twitter.com Stratic HTML without SPA plus CSS for layout and JS for a touch of interaction is even faster.
  • Al XP Home Edition 🦑🌹 responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • mase - meat popsicle responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Ian Pouncey responded at twitter.com
  • mase - meat popsicle responded at twitter.com
  • Joshua Hoover responded at twitter.com
  • Kristian Glass responded at twitter.com
  • Joyce Park responded at twitter.com
  • devolute responded at twitter.com
  • Nicholas/Aquarion responded at twitter.com
  • heapwolf responded at twitter.com
  • Luke responded at twitter.com
  • Niaccurshi responded at twitter.com
  • Karan Ganesan responded at twitter.com
  • Mahemoff @ 🏡 responded at twitter.com
  • Rob Connolly responded at twitter.com
  • André Jaenisch responded at twitter.com
  • Romaric Pascal responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Petros Amiridis responded at twitter.com
  • Léonie responded at twitter.com
  • Sam Giles responded at twitter.com
  • Tim Chase responded at twitter.com
  • Marius Quabeck responded at twitter.com
  • Dale Reardon responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • вкαя∂εℓℓ responded at twitter.com
  • RvLeshrac responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • вкαя∂εℓℓ responded at twitter.com kryogenix.org/days/2020/05/0… is an interesting read. Similar to @sil's previous post about not having JavaScript it's bound to illicit strong reactio…
  • Craig Buckler responded at twitter.com
  • Andrew Hedges responded at twitter.com
  • ppk 🇪🇺 responded at twitter.com And here's @sil saying something similar: he feels we shouldn't require all users to compile our website, as we do when we just send them oodles of JS…
  • This Miss Molly responded at twitter.com no, thx!!!
  • Wolfram ⪡JS-- HTML++ CSS++⪢ Kriesing responded at twitter.com We don’t give people a website any more The headline is a quote from Hammer and Nails [1] by @sil where he states how we make every user's browser a…
  • Simon Willison responded at twitter.com
  • Baldur Bjarnason @baldur@toot.cafe responded at twitter.com “Hammer and Nails” This post frames the SPA problem in a way that makes a lot of sense. kryogenix.org/days/2020/05/0…
  • Carlos Molina responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Stuart Langridge responded at twitter.com
  • This Miss Molly responded at twitter.com
  • Carlos Molina responded at twitter.com
  • Ben Thorp responded at twitter.com Personally, I also struggle with anything that requires Node... My own site now runs Grav, and the last "work" I did was html with skeleton, JS (sadly…
  • Stuart Langridge responded at twitter.com I quite like node, myself, although I'm a JS type. I mostly use it for APIs, though; if I'm building something that stores data and presents a UI, I'l…
  • Derek Pennycuff responded at twitter.com
  • David Walker responded at twitter.com
  • Joshua Hoover responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Christian Hammond responded at twitter.com
  • Slippers Ex Machina responded at twitter.com
  • Dr. Roy Schestowitz (罗伊) responded at twitter.com "here is a Linux distribution called Gentoo, named after a type of penguin (of course it’s named after a penguin), where installing an app doesn’t mea…
  • sheilaellen responded at twitter.com
  • Olly Hodgson responded at twitter.com
  • Aaron Gustafson responded at Hammer And nails (www.aaron-gustafson.com) Love this analogy from Stuart: Front-end frameworks are essentially compilers that you require your users to run on their own machines to access your…
  • Baldur Bjarnason @baldur@toot.cafe responded at twitter.com “as days pass by — Hammer and nails” kryogenix.org/days/2020/05/0…
  • Bridget Stewart responded at twitter.com Do you download source and build tools and run the compiler every time you run an app on your desktop? No? Then why is it fine to make web
  • Bridget Stewart responded at twitter.com
  • Etienne Posthumus responded at twitter.com
  • Aaron Gustafson responded at twitter.com 🔖 Love this analogy from @sil: Front-end frameworks are essentially compilers that you require your users to run on their own machines to access your…
  • Bolaji Ayodeji responded at twitter.com 🔖 Love this analogy from @sil: Front-end frameworks are essentially compilers that you require your users to run on their own machines to ac
  • Kevwe Ochuko responded at twitter.com 🔖 Love this analogy from @sil: Front-end frameworks are essentially compilers that you require your users to run on their own machines to ac
  • 𝕊𝕚𝕣 𝕊𝕒𝕣𝕒𝕙 responded at twitter.com 🔖 Love this analogy from @sil: Front-end frameworks are essentially compilers that you require your users to run on their own machines to ac
  • Arlene Andrews responded at twitter.com 🔖 Love this analogy from @sil: Front-end frameworks are essentially compilers that you require your users to run on their own machines to ac
  • Adactio Links responded at twitter.com as days pass by — Hammer and nails kryogenix.org/days/2020/05/0…
  • Stuart Langridge responded at twitter.com
  • Arlene Andrews responded at twitter.com
  • 𝕊𝕚𝕣 𝕊𝕒𝕣𝕒𝕙 responded at twitter.com
  • jalbertbowdenii responded at twitter.com
  • Bolaji Ayodeji responded at twitter.com
  • Kyle Pflug responded at twitter.com
  • Tobias Schächtelin responded at twitter.com
  • Damien Buckley responded at twitter.com
  • Matt Derocher responded at twitter.com I still agree with this sentiment: “We don’t give people a website any more: something that already works, HTML and CSS and JS ready to show them what…
  • Maye Edwin responded at twitter.com
  • AMD_ responded at twitter.com
  • Michael Scharnagl responded at twitter.com Hammer and nails kryogenix.org/days/2020/05/0…
  • Chris Heilmann responded at twitter.com 👉🏻 “Hammer and nails” 🔗 kryogenix.org/days/2020/05/0… The always insightful @sil with a sensible comparison as web frameworks forcing your end users…
  • Kim 🇪🇺️ responded at twitter.com Always be riding for progressive enhancement and not dumping copious amounts of JS on a user just so they can read some text. kryogenix.org/days/2020/…