Written by Adrian Holovaty on February 10, 2017

Yesterday I attended a talk at a tech meetup here in Amsterdam by Peter-Paul Koch — during which I tweeted a photo of one of his slides:

Preach on, @ppk. Brilliant talk tonight about what went wrong in modern frontend web development. Too many tools, too little thinking. pic.twitter.com/1jxaP97hsq — Adrian Holovaty (@adrianholovaty) February 9, 2017

This tweet has gotten quite a lot of attention — mostly negative — and I’d like to give some much-needed context.

PPK’s talk was about the problems he sees in with modern front-end web development. Problems for developers, problems for users, and problems for the web in general. It was more than an hour long and covered many topics, weaving in his rich knowledge of web-development history. Some opinions he articulated:

Web developers have become overly focused on emulating native mobile apps, when in fact they should focus on the strengths of the web. Sort of by definition, a website will never be as performant as a native app, given native apps speak directly to an OS while websites always have the browser as middleman — barring some significant technical shifts. So it’s an unattainable goal.

Modern front-end libraries and frameworks have become overly complicated, with so many abstractions and so much tooling that it’s very difficult for developers, especially beginners, to hold it all in their heads. He cited the brilliant How it feels to learn JavaScript in 2016 by Jose Aguinaga.

Relatedly, browser vendors should have a year-long moratorium on adding new features. (See also his blog post on this.)

Modern front-end libraries and frameworks encourage a style of development that punishes people on underpowered/mobile devices and slow connections. In many cases, he argued, there’s no reason to pull in hundreds of kilobytes of JavaScript, or naively traverse the entire DOM for the sake of developer convenience (he gave the example of Angular here), when doing it at a lower level of abstraction would perform better and might also result in less code that’s easier to reason about.

Developers who come to front-end work from back-end work often underestimate how difficult it is to be a front-end developer. Web browsers — with competing standards, implementation differences and browser bugs — are the “most hostile development environment in the world.” The key to being a front-end developer is to embrace that. In fact, certain Computer Science Best Practices, such as the DRY principle, don’t necessarily apply in front-end work (e.g., when practicing progressive enhancement, you develop the same thing twice).

A key distinction of front-end web programming is that users download your code when visiting a web page, which means users get “punished” if your code is bloated. This is different from back-end web programming, where it doesn’t matter nearly as much which tools you use as long as the network request is served quickly enough.

I’m working from memory, so I hope I did PPK’s opinions justice here. It was a fantastic, thought-provoking talk. (UPDATE: You can read the slides yourself here, and watch the video here.)

Which brings me to my tweet. One of PPK’s slides said: “If you can’t do without tools you’re not a web developer.” In context of the presentation, this was already a controversial statement. Out of context, it’s absolutely incindiary (and, frankly, a bit nonsensical).

I regret tweeting this photo. It was clearly out of context, and I should have either used a different slide or waited until the video was posted. I hope the context here helps explain it.

Many people saw that slide, interpreted it at face value, and tweeted sarcastic responses such as “If you can’t put in a nail without a hammer, you’re not a carpenter.” They took it way too literally, suggesting PPK was telling us to cease using all tools, code in assembly, or otherwise be luddites. Obviously this is nonsense.

Other people took issue with drawing lines in the sand, saying it’s counterproductive (and can scare away beginners) to make exclusionary statements like this. I agree. Saying “You’re not a real X unless Y” is the wrong way to make the point. The arbitrary distinction of “Real Programmers” (versus, uh, not-Real Programmers?) is a disease of our profession.

In fact, regarding beginners, one of PPK’s most salient points was that the modern front-end development landscape is so complex that it’s impenetrable to newcomers. If I were starting web development today, I’d be terrified by the complexity — and probably give up. The aforementioned Jose Aguinaga post illustrates this brilliantly.

My interpretation of PPK’s slide, having seen the entire presentation, was simply this: web developers should have knowledge of what’s happening behind the scenes, so that they can use their tools more effectively. This, I agree with. If you blindly use a 20K library that traverses the entire DOM on every page load, in a situation where five lines of vanilla JavaScript would have done the same thing, you’re adding unnecessary strain on your users and possibly unnecessary strain on your development team. (That assumes “unnecessary strain” is a bad thing for your particular project/work.)

I’ve always thought the same about Django, by the way. Take, for example, the Django ORM. I think developers ought to have an understanding of SQL — the advantages, the limitations, the dos and don’ts — before they jump into using an ORM. That doesn’t mean everybody needs to write their own ORM, or always use raw SQL (two strawman arguments people have been making repeatedly in response to this tweet) — it just means they should have a basic understanding of what’s happening. Not enough to be a DBA, just enough to not make poor decisions.