Getting the abstractions of tooling correct, with Peter Müller
Time Stamped Show Notes
1:24 – Peter is passionate about the foundations that build the web, and is focused on tooling, and getting abstractions of tooling correct.
4:26 – Peter can’t live without Autoprefixer. He says it’s his go-to tool that everyone should use.
4:34 – Peter believes Autoprefixer is the pinnacle of tooling APIs. Autoprefixer does its job by you configuring what you want, and not how to do it. Autoprefixer inspires Peter when developing his own tools.
5:00 – Unexpected.js is also a core tool in Peter’s toolbest. It’s a fairly unknown assertion framework. Unexpected.js changes how you think about tests.
5:24 – Extending Unexpected is extremely simple compared to Chai and other assertion libraries. Error output is superior, and extending it is easy. The gains you get from Unexpected are immense.
5:43 – Unexpected can give suggestions when you make typos. Peter finds that the error output is second to none, and the available plugins are amazing.
6:05 – Peter finds it amazing that Unexpected can assert on a very high level. It’s able to move all the way up to integration tests with automated mocking, in a very terse and expressive way.
7:43 – Peter finds that tooling for bundling and local optimisation has hit a local optimum; the current abstractions are limiting. Assetgraph is interesting to work on because it adds a new abstraction that no one else seems to be working on.
8:16 – Assetgraph treats everything as a dependency graph, whereas most other tools only apply a dependency graph to node modules, or things that are comparable to node modules. Webpack, Browserify, and RollUp are capable of importing HTML, images, and CSS, but this is where the abstraction breaks down because this means custom overrides need to be written for require or import statements. At this point you are fully dependent on that tool in order for your code to be interoperable.
11:16 – Assetgraph isn’t new – it’s unfortunately just unknown. Assetgraph has been around since Node .2 or .4. Back then it was only usable within Peter’s team, but it’s since become it more compatible for adoption in other projects.
11:38 – Svelte, the new ‘disappearing framework’ is also exciting. Svelte allows you to write a UI as you would with React or Ember, except that the compiler eliminates overhead which means the packages are extremely small.
12:24 – Peter scans twitter to see what people have to say, mostly following people that he’s seen at good conferences or met in person, and dives into projects or news they have announced.
13:09 – He tries to keep up to date with things related to Assetgraph. For example, any updates to a web specification needs to be modeled and support needs to be implemented.
14:19 – Testing has changed the way Peter thinks about and writes code.
14:38 – Functional programming has also had an impact on Peter. He hasn’t done any real work to learn functional programming but has picked up a couple of paradigms. These paradigms have had a massive effect on how Peter perceives writing good reusable functions, and how to avoid side-effects. He isn’t producing faster, he’s producing more stable. He finds he doesn’t need to go back and update things, but if he does it’s easier as the code isn’t as complex.
16:11 – Best advice about programming
Write everything twice or more until you understand what abstraction you really need. Thereafter abstract it.
16:40 – Habits for writing better code
Being detail-oriented and communicating better helps Peter write better code.
16:58 – Book
17:18 – Inspiring devs
Andreas Lind’s work is inspiring. Andreas creates tons of core functionality tools like express middlewares and internationalisation tools, which are not always appreciated enough.
18:05 – How to learn code from scratch
Find a mentor who is passionate and knowledgeable and knows what not to focus on. Peter doesn’t believe in schools’ abilities to keep up and teach web development.
18:32 – You can look for mentors on Github or by meeting ‘thought leaders’ at conferences.
19:02 – How to work smart
Treat every task as a queue instead of a stack. Once in a while go through the queue and reorder by priority. Do the things that you plan to do, instead of just working on the newest one.
Tools, Tips, and Books Mentioned