Technical Principles and other Adventures in Nodeland - Issue #49
Hi Everyone, this edition is bittersweet. It’s packed with all the usual OSS releases and news that you got to enjoy, however the current world situation keeps me awake at night. I #StandWithUkraine.
Last week I was hosted in PodRocket, the podcast of LogRocket! We talked about Fastify, Pino and community building!
Technical Principles
Early this week a colleague asked me what principles I followed when designing architectures. Here is my list:
1. Conway’s Law is paramount.
In order to design a piece of software we need to “design” the team that is going to produce it.
2. Developer Experience is key to productivity
Developers must spend as much time in the “flow” state to maximize the joy their profession sparks. A developer in flow state can resolve any problem in front of them. Meetings and constant interruptions break them out of the “flow”, impacting their job satisfaction and productivity. Given that coordination overhead (= meetings) increases quadratically with the number of people in a team, developers works best when in teams of 4-6 people.
Optimising developer productivity is a fundamental activity of every team. Every tool and framework could impact developer productivity. Choose wisely.
3. DORA metrics, not burndown charts
Scrum and other Agile methodologies predicates the use of story points and time to assess how much work will fit in a sprint. Then, the team is benchmarked with these estimates. This incentives writing low quality software as bug fixes will be more story point to churn later on.
Continuous Deployment is the way. The best way to measure CD are DORA metrics:
- deployment frequency (DF)
- lead time for changes (LT)
- mean time to recovery (MTTR)
- change failure rate (CFR)
Node.js
I’m so excited about Node.js v17.6.0 as it’s the first one to ship HTTPs import of modules behind a flag. We are still early days of this new method of module installation.
Fastify
The Fastify community worked on a couple of module updates: fastify-cookie and fastify-swagger, to fix a few minor bugs.
We will be soon starting to migrate all fastify-* modules that are maintained by the Fastify team to the @fastify namespace. The goal is to make them immediately recnognizable. You can read about the progress at:
Mercurius
Mercurius shipped an important update that updates graphql-jit so that v9 works with typescript. Thanks to Simen Bekkis it got resolved quickly. Read up on the following issues:
The other fix mercurius v9.3.3 shipped is a fix for the gateway to support GraphQL fragments in certain queries:
Last but not least we had a new release of mercurius cache:
Pino
We fixed a bad bug (in fact, a typo) that could lead to crashes or data corruption in case of multi-byte utf characters. I’d like to thank the issue reporter that created an easy way to reproduce the problem, thanks https://github.com/petru-planable!
News
Could package-lock.json be an attack vector? Indeed it can. Read up at:
I’m so impressed that yelp is using techniques that James Snell, Anna Henningsen and myself, theorized and built while they were at NearForm in the last few years. I’m glad we built something of valuez
Good libraries
I used and maintained several generations of HTML5 slides. I find that using git to store slides provides a better solution for technical topics, more importantly if there is a live demo. My colleague Jonas demoed slidevv… and we have been using it since!
I’m a user of Docker and I always recommended my clients to buy a subscription for Docker Hub to store their images for deployment. Recently Docker changed their licensing of Docker Desktop, making it a paid product. While I support their decision to become profitable, I had to evaluate that the price associated with Docker Desktop was worth it. Late January I had to make a decision if I should buy a license. A colleague pointed me to colima, a barebone Linux vm for Mac OS X that can be used to containers. Check it out and remember to support his maintainer!