A note to self and whoever needs to hear it. 

 
 
 
 
 

 
 
 
 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 
 


 Set aside your pride and approach each situation with humility and an open mind. Focus on the task…
If you’re building a service that will eventually run multiple instances, this article is for you. I think you should run at least two instances from day one. 1 Doing so helps you uncover hidden bugs early—like port conflicts, stale caches, and locking issues—so you can avoid expensive rewrites later. 
 





 
 
 








…
Ever been handed a legacy system whose dependencies haven’t been touched in a decade—and then been asked to upgrade it? Even senior developers can freeze when the codebase is unfamiliar, tests are missing, and production might break. 
 I’ve been involved in several such upgrades, some smooth and some painful. Here are lessons learned that can help you make the process manageable. Think…
Software survives by being easy to replace. 
 This may sound counterintuitive, but if there’s one thing we know, it’s that things change. Technology evolves. Requirements shift. Sooner or later your system, or parts of it, will be replaced. Often sooner than you think. 
 Ignore replaceability and the system will become harder to maintain. The dependency on one library will…
Would you consider these behaviors professional? 
 
 The carpenter who leaves tools and sawdust on the floor after installing a window. 
 The electrician who leaves live wires exposed after installing a new lamp. 
 The cook who leaves dirty utensils and raw food on counters after finishing a dish. 
 The doctor who skips documentation once the patient has been cared for. 
…

 
 
 
 
 

 
 
 
 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 
 


 A good architect builds the system that the client needs, not the one they want to build. 
 You cannot judge an architecture as good or bad…
AI-generated code often looks impressive at first, but then it drifts: it ignores conventions, duplicates logic, breaks architectural constraints, and assumes things that aren’t true. 
 To control this code drift you need to make AI take small, well-defined steps. 
 Prefer small, well-defined steps # Small steps help AI stay aligned with the current codebase. With small steps, the model…
AI promises to speed up software development by taking away the grunt work, making us all 10x programmers. You 
 
 describe the high-level picture and AI agents fill in the details. You become the conductor of a personal AI agent orchestra. 
 But what happens if you stop reading the code? 
 





 
 
 








…
The goal of software architecture isn’t to specify all the details, but to describe a solution space in which teams are free to move. 1 It is similar to how a nautical chart provides sailors with the information needed to navigate safely toward their destination, showing the safe channel and hazardous areas to avoid. 
 





 
 
…

 General relativity is Einstein’s theory that describes gravity not as a force but as the curvature of spacetime caused by mass and energy. 
 

 
 
 
 
 

 
 
 
 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 Illusion of…
I’m working on a new ad for OpenAI’s new AI browser. What do you think? 
 
 Atlas, the revolutionary new AI browser from OpenAI, is so autonomous it lets you experience phishing attacks without even taking the bait. 
 
 Really, who thought it was a good idea to make a browser that can act on your behalf with an LLM as the agent? One that mixes instructions and data into…
I recently read a pitch for AI-supported, spec-driven development. 
 
 We need a paradigm shift: the Specification-Driven SDLC, where high-quality, version-controlled specifications become the new source code. In this world, senior talent isn’t replaced; they are elevated to the role of “Conductors,” orchestrating an AI workforce to translate their architectural intent…
This is my now page where I give semi-regular updates on what is going on in my life. 
 
 
 I’m back on track with weekly blog updates which feels nice! I actually have more than a month’s worth of posts queued up. Thinking about actually publishing more often, but I also don’t want to set up unrealistic expectations on poor future Henrik. 
 
 
 I’ve…

 
 
 
 
 

 
 
 
 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 
 


Have you ever solved a problem, only to face it again six months later—familiar, but with no memory of the solution? 
 Then you may want to write…
Do you enjoy long, rambling texts that take forever to get to the point? Yeah, me neither.
So if you want your writing to be clear, here are some ideas. 
 





 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 
 
 Simple words let your…
I’m a recovering perfectionist. If I’d listen to my lizard brain, I would avoid doing something altogether rather than trying and risk failure. Here are my thoughts on how to better deal with failure. 
 





 
 
 








 
 
 
 
 
 
 
 
 
 
 

 A lineart version of…
A team needs some spare capacity to deliver at full potential. 
 It may sound counterintuitive, but a team working at 100% capacity is brittle and inefficient. Some spare capacity, or slack, is necessary to hit peak throughput. Slack lets the team adapt when reality inevitably throws a wrench in the works. 
 To better understand for why some slack is necessary, let’s turn to traffic…
Software projects often suffer from silos—frontend and backend teams working in isolation, discovering mismatches only late. A walking skeleton prevents this by connecting all parts of the system from day one. 
 A walking skeleton # The term “walking skeleton” was defined by Alistair Cockburn in the late 1990s and popularized within the Agile movement . The Pragmatic Programmer…
Does your team work on many things but finish few? Multitasking feels productive, but it usually makes everything slower. 
 More than two decades ago, Joel Spolsky wrote a great article on why human task-switching is a bad idea . It is well worth a read, but the main take-away is: 
 
 You should never let people work on more than one thing at once. 
 
 He also points out that…
I believe a team works better with a “sense of purpose” than a “sense of urgency”. 
 





 
 
 








 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


 
 
 When you have a purpose, you naturally do what needs to be done to achieve…
How can you write technical documentation that is clear, informative, and even fun? 1 
 Who are you writing for? # I find it helpful to think about what you want to achieve by writing the documentation. Who is it for? Are you writing for a beginner or an expert, an external user or your team mates? What do you want them to understand? What do you expect the readers to know in advance? Then…
When handed a problem to solve, do you allow yourself to explore different solutions? Or do you just implement whatever first pops into your head? 1 
 I once spent a lot of time writing a system to import data in batches. Unfortunately, I didn’t spend much time on error handling and just did what felt intuitive. That caused me to design the error handling to fail fast, and abort whenever…
Let’s say you’ve just finished a major software project that took a year to complete. How long would it take you to write the exact same system again? 
 Probably no more than a third. 
 Why? Because you’ve already figured out what to build—now it’s just a matter of how . 1 You have done the time-consuming design work, and only have the implementation work left. 2…
Argh! The developers are so difficult. They always ask so many questions. Why can’t they just do what I asked them? 
 I bet a lot of managers, domain experts, and other project stakeholders have said something along those lines. 
 Why indeed? Because the job of a software developer is to explain a seemingly clear (but really quite vague) task to a machine which is extremely picky…
You have an idea for a blog post. You know it’s been done before. Hundreds of times. But you still want to write it. 
 That’s fine. 
 A recent article by Michael Lynch suggests that bloggers shouldn’t write beginner Python tutorials, because they can’t compete with the top results on Google or Hacker News. He says: 
 
 The answer is that you don’t write a beginner’s Python…
Last week, I found myself stuck in a “code hole”. To paraphrase James Kerr : 
 
 You know you’re in a code hole when you have 100+ type errors to fix, tests are not passing, you are “refactoring” something distantly related to what you set out to do, and the diff from main is so big the PR is unreviewable. 
 
 For more than one hour, I had been “almost there”, but just…
Everything you do, no matter how perfect it may be, will sooner or later cease being perfect and eventually be worthless. Because perfection is time-bound, hunting it is unsustainable. As soon as you find it, it moves. 
 What is perfect in one context may be too much in another one, and too little in a third. Even if you achieve temporary perfection, it may not be relevant to anyone else.…
I believe that all systems eventually collapse under their own weight. 
 As time goes by, any system that is actively used and developed tends to become larger, more complex, and more inter-dependent. At some point, continued development has slowed down to a crawl. The system becomes a zombie and eventually dies. 1 
 Even if we are perfect designers and developers, we just cannot get rid…
Hi, my name is Henrik and I am a perfectionist. 
 As a perfectionist, I am scared of making imperfect things. Publishing new posts on this blog is frightening. What if something I write turns out to be wrong? What if people think I’m stupid? My reptile brain expects everyone to laugh at me. I will be cast out of the tribe and die lonely and hungry. 
 The irony is that the far more…
Reading Lars-Christian Simonsen’s blog , I stumbled upon the following comment by Rachel J. Kwon regarding static site generators like Hugo . 1 
 
 I still struggle to wrap my head around the concept that the whole site gets rebuilt and republished even if I just change one word on one page. 
 
 As a programmer, I’m pretty used to how systems like this work. So doing…
These are my answers to the blog questions challenge , inspired by Glyn and Lars-Christian . 
 Why did you start blogging in the first place? # I started this blog as an outlet for my thoughts. I often feel that my head is full of random thoughts, so having somewhere to put them provides mental relief. The blog also helps me refine my thoughts . In order to put them into words, I am forced to…

 To write is human, to edit is divine. 
 
 These are the words of horror fiction writer Stephen King. 
 It is a widely-accepted fact in writing that what your first draft is not very good. Instead, the magic is in the editing. In the repeated improvements made to the text. Here is how author Wiliam Zinsser expresses it. 
 
 Rewriting is the essence of writing well:…

 If you’re giving feedback, be descriptive, not prescriptive. Your job is not to fix the book. Just relay what the book makes you feel. If you’re bored by something, say that. The author and the editor will fix the book. 
 
 This is a piece of advice on how to give feedback in a writing group. The advice comes from a course by fantasy writer Brandon Sanderson, as captured…
For a long time, I’ve had a preference for expressions that result in a value over statements that cause a side effect. It goes hand in hand with using immutable data structures and using collection pipelines and all the other good stuff in functional foundations . 
 Pattern matching fits quite naturally into that picture, and it is not uncommon that I refactor code with regular…
Kotlin is a very nice language to write backend code that is expressive and concise, yet clear and readable. If you are writing backend code, and especially if you’re using Java, I believe you should take a good look at Kotlin. 
 I recently came across a post called My Thoughts on Kotlin: Perspectives after 4 years by Tyler Russel. It made me happy to see someone else who recognizes that…
I’ve been reading the book On Writing Well by William Zinsser. It contains the following explanation of what “good writing” is. 
 
 The secret of good writing is to strip every sentence to its cleanest components. Every word that serves no function, every long word that could be a short word, every adverb that carries the same meaning that’s already in the verb, every…
This post will go through my favorite technical questions to choose from when interviewing software developers for a “backend-ish” role. 1 They are not a checklist of things that the candidate must know (nobody knows everything), but a way for me to get a sense of their understanding in different areas. 
 For each question below, I explain why I ask it and provide examples of what…

 Lutefisk, a dish made from dried fish cured in lye, is often served on Christmas in Sweden. What type of fish is the dish traditionally made of? 
 
 This was a question in a Christmas quiz that my wife attended. The answer, according to most Swedes, would be “ling” (“långa” in Swedish). However, the quiz master said that the correct answer was…
Developers are very good at finding solutions to problems. Most of us start to formulate a solution in our mind before we have even heard the full problem description. 
 When faced with a non-trivial problem, I try to follow these steps. 
 
 Goal : Fully understand the problem and state what you are hoping to achieve. 
 Solutions : Come up with at least three different possible…
One year ago, I decided to start blogging again. 1 
 Why? # I had recently started to learn TypeScript and was experimenting with generative AI , so I had lots of thoughts spinning in my head. Starting the blog worked as a kind of vent, allowing me to release mental steam. 
 The blog became a way for me to refine my thoughts . Writing has a nice way of forcing you to clarify your ideas,…
I wonder how many people participants in the popular coding competition Advent of Code have Copilot turned on. I personally use Copilot during daily programming and find it helps me as a very smart autocomplete. But I turned it off during Advent of Code. Why? 
 First of all, the the rules ask you to. Primarily, that request is for competitive programmers who aim for the official leaderboard.…
Over the the last months, I’ve been learning Go through a hobby project called Laebel . 1 
I recently reached a point where it was more or less finished. So what should I do? 
 I decided to rewrite it in Rust ! 2 
 Full of enthusiasm # I’ve been fascinated by Rust since I first heard about the language. I like strong typing , so the idea of making the compiler also verify…
This year, I’m participating in Advent of Code for the first time. If you don’t know it, it is a series of programming puzzles you can use to challenge yourself and/or compete with others. 
 As I finished the first day’s puzzles, I was struck by the power of collection pipelines . By collection pipelines I mean combining higher-order collection functions such as map and…
I want to talk to interesting people (like you). 
 I want to engage in good conversations on topics that interest me. 
 I want to read about and discuss software development and subjects such as software design , functional programming , testing , abstractions , and refactoring . Related to that, I also want to talk about meta-subjects such as principles, learning, and simplicity . 
 I…
Here’s a recent insight I had about unit testing. 
 Each unit test should verify only what it needs. 
 More specifically, each test should only verify the parts of the result that is relevant to the scope of that particular test. 
 Shocking? It seems so simple that I’m embarrassed that it felt like an insight—so obvious that it is practically a tautology. But let me share…
I’m a big notebook fan. I can walk into a stationery store and feel an urge to buy a nice notebook or a good pen. I’ve always liked books in general, and writing. One of my yet-unfulfilled dreams is to build a writer’s cabin where I can think and write without distractions. 
 I recently read The notebook , a post published by my friend and fellow blogger Glyn Normington. He…
Replacing real dependencies with test doubles 1 is a helpful tool when building unit tests. It allows us to isolate the unit under test from the surrounding parts, and ensure the behavior of that unit. 
 However, some components make it hard to write true unit tests. Usual suspects include databases, remote services, frameworks, and user interfaces. If you include them, you essentially turn…
I’ve been developing software for a pretty long time. Though I’m not a gray beard yet, neither figuratively nor literally, I’ve gained enough experience to see some patterns emerge. One of them has to do with what tools one uses to solve a problem. 
 
 The beginner developer uses basic tools to solve a problem because it’s all they know. They lack both the skill to…
Sometimes when you make a change, it ends up changing you. 
 The first example I remember clearly is learning Test-Driven Development. It was somewhere in the middle of the 2000s when I decided to go all-in on TDD. I tried to do everything test-driven. I spent a lot of time writing tests, some good and many bad. Over time, I learned how to write good tests, what kind of code was easy to test,…
I like to treat every support issue as bug. As an indication that there is something in my product, documentation, or process that is broken. Otherwise there wouldn’t have been a support issue in the first place. 
 I want to strive for the ideal product. A product that always works correctly. A product that is not possible to misunderstand or use incorrectly. A product that is completely…