Very good articles. | Ciaran Strutt

The Inversion Principle

Inversion involves considering the inverse or negative outcome to define reasons for failure. This forces you to avoid actions that lead to negative results and uncover new possibilities. How to increase product adoption? Ask what prevents adoption.

Expiring vs Permanent Skills

Drawing was once an essential military skill but has become obsolete due to technology. Many skills are either expiring or permanent. Expiring skills get more attention in the short term but permanent skills compound over time and can be invaluable. Permanent skills include not being a jerk, adapting your views, getting along with others, getting to the point, respecting luck, staying out of the way, and accepting hassles. Distinguishing temporary trends from real issues is also a permanent skill.

Extreme questions

Brainstorming via crazy questions. Imagining increasing prices by 10 times, having no customers, not being allowed to provide tech support, maximizing fun, completely copying a competitor, all of our users forgot their passwords at the same time.

Chesterton’s Fence

I first encountered this idea during a code review when I posted a comment that I don’t know why a certain piece of code is there but the fact that it is makes me apprehensive to remove or modify it.

A senior engineer commented that that is a good instinct to have and it is actually called “Chesterton’s Fence”.

Building fast

People achieving ambitious goals in a fast timeframe.

Small teams

Small teams that have delivered great products. For example WhatsApp had 55 employees when they were acquired by Facebook.

Golang is evil on shitty networks

The Go lang runtime disables Nagle’s algorithm by setting TCP_NODELAY. Nagle’s algorithm is a way to efficiently send a lot of small packets by buffering them up and then sending them when X threshold is reached. This caused git-lfs to upload very slowly over the author’s unreliable WiFi network due to high packet loss and retransmissions.

Hashing

These articles have great visualizations. Hash functions are functions that take an input and produce a number within a certain range. A good hash function minimizes collisions by evenly distributing outputs. Hash maps use hash functions to efficiently store and retrieve data by hashing keys to determine which “bucket” to store values in.

Load Balancing

These articles have great visualizations. Load balancing distributes incoming requests to multiple servers to increase availability and scalability. The simplest form is round robin load balancing, which sends requests in turn to each server. However, round robin fails when servers have different capabilities or requests have varying costs. Weighted round robin assigns weights to servers based on their capabilities but requires manual tuning. Least connections load balancing sends requests to the server with the fewest outstanding requests, performing well with variance.

Memory Allocation

These articles have great visualizations. Memory allocation is an essential part of any program. Programs use functions like malloc() and free() to request and return memory from the heap. The simplest memory allocator just keeps track of where the last allocation ended and starts the next one after that, but this leads to memory leaks. More advanced allocators keep track of allocated and free memory to allow freeing memory.

How does database sharding work?

Hash data into buckets, the buckets distributed across different servers. You now need a routing layer to resolve database queries to the right bucket. Use Vitess for MySQL and Citus for Postgres. Alternatively use some fancy serverless implementation and stop worrying about it.

Linux Networking Shallow Dive: WireGuard, Routing, TCP/IP and NAT

If you have struggled to understand NAT, this article will likely fix that.

Put an io_uring on it - Exploiting the Linux Kernel

I initially read this article for the exploit but the explanation of io_uring is really good.

Six ways to shoot yourself in the foot with healthchecks

Short and sweet practical advice that can be applied as what NOT to do with health checks.

Optimizing web servers for high throughput and low latency

A good example of getting more performance out of your service without pushing any code changes. I would consider this absolute minimum of running a service. At least fully tune the hardware you are running on before blaming code.

Things I want as SRE/DevOps from Devs

You could use the questions in here for identifying gaps in your service. “For example Does graceful shutdowns wait for inflight requests to finish?” is a great question. I am use to operating DNS services so for standard UDP queries you are not going to have inflight requests. You may kill someones zone transfer though if you restart in the middle of that operation.

Things they didn’t teach you about Software Engineering

A more realistic view of software engineering. As pointed out this is the opinion of the author. I agree with documentation writing not being respected or seen as engineering work.

Easy to follow visual design rules

I’d add this article along with 100 bytes of css and you would have a decent base for a clean website.

Clocks and Causality - Ordering Events in Distributed Systems

Covers the use of Lamport clocks in a distributed systems. This is heavy reading but if you can understand clocks and event ordering in distributed systems you will find other aspects of distributed systems easier.

Navigating the unpredictability of everything

Predicting the future is difficult, even for experts. Analysts at Goldman Sachs and drug sales forecasters often get predictions very wrong. Companies like Slack and WhatsApp succeeded not because they predicted the future correctly, but because they had a strategy and followed customer behavior. A good strategy creates optionality and leverages existing strengths. To navigate an unpredictable world, keep things simple, form coalitions, or do something completely novel. Most importantly, bet on things that are unlikely to change, rather than trying to predict how things will change.

A Dozen Things I’ve Learned from Charlie Munger about Moats

Great advice about business moats from Charlie Munger.

a 1.5GB string

The author discovered that a Java service they supported was inefficiently using memory, wasting up to 1.5GB in some cases. The issue was caused by unlimited back stacks that saved the state of each screen a user visited, resulting in long JSON strings with many escaped characters. As a quick fix, they truncated the previous screen strings if they exceeded 100MB, while as a long-term solution they rewrote the previous stack to impose size limits.

Effective Spaced Repetition

If I could actually apply this to learning and the Feynman technique I’d probably stop forgetting/mixing up quotient and coefficient.

Taxonomy of procrastination

Procrastination is mostly fear and anxiety based.

8 Hard Truths I learned when I got laid off from my SWE job

Great insights on an aspect of work people rarely talk about.