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.
Comments
Posted by Felix Niklas on February 10, 2017, at 10:55 p.m.:
Didn't expect that you'd get so much negative feedback for that tweet. I enjoyed it! Thanks for the write up!
Posted by Oleh Kuchuk on February 11, 2017, at 1:52 a.m.:
It's all about managing complexity. Totally agree with your and ppt opinion. That guys are just looking for a way to joke, instead of focusing on real problems.
Posted by Pedro on February 11, 2017, at 8:35 p.m.:
Exactly. I have been doing backend (Python, Django, databases, servers, Linux, caches, etc) and lot of front end (vanilla JS, jQuery, micro-frameworks, CSS3, Sass, Stylus, HTML5) for 7-8 years and have been thinking about those points in recent years. Totally agree with the main ideas:
1- Front end development is getting too complicated, too much sophisticated and with too many abstractions/layers. That's prone to errors.
2- You should have a "basic knowledge" of what's going on behind your abstractions.
3- Don't follow trends. Think like an engineer and choose the right tools.
Posted by Leticia on February 12, 2017, at 12:17 p.m.:
Back in the day when you could write your CSS by hand your stored procedures by hand, your HTML by hand and have the thing render in milliseconds, bypassing whatever crap was generated by whichever language or framework you were supposed to be helped by, it was fun. Even if I had to write workarounds for IE, always IE.
When the Javascript frameworks came into the picture, changing (breaking up) every other week, taking the control from the developer and adding a lot of weight for not a lot of functionality, then it stopped being fun.
Posted by Dave on February 13, 2017, at 1:10 p.m.:
At least a little of the uproar is due to ppk doing some version of this same talk last June, and everyone went similarly bananas then: https://twitter.com/freshmango/status/743380493614333952
So at least a little of the uproar this time is exasperation. Let's be honest, the slide is baity. I for one was hoping ppk might have toned it down a little because I just hate seeing the community like this. As you were there, you know PPK's point is well-meant. However repeated use of this slide causes me to despair. At best it's intentionally baity, at worst it's intentionally divisive. The community in general seems to assume the latter every time. Deliberately causing argument (as opposed to discussion) is not a pleasant thing.
Comments have been turned off for this page.