Wednesday, August 13, 2025 in Blog
A Small Story… Imagine you have to rewrite cluster autoscaling. There’s a function makeNodeSchedulable that rarely returns a CriticalAddonsOnlyError when that node has a CriticalAddonsOnly taint. The old code looks like this: makeSchedulableLoop: for …
Wednesday, July 02, 2025 in Blog
… continued from the previous post. While researching the usage of zero-sized types in Go I wrote zerolint1 and the accompanying cmplint2 and examined over 500 popular Go projects. I want to look into some examples why I think those linters …
Saturday, May 31, 2025 in Blog
Imagine writing a translation function that transforms internal errors into public API errors. In the first iteration, you return nil when no translation takes place. You make a simple change — returning the original error instead of nil — and …
Tuesday, April 16, 2024 in Blog
More Real-world Usage Datadog has excellent software engineers. Nevertheless, it’s easy to find code with race conditions. Let’s examine a simplified version of waitForConfigsFromAD: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 …
Monday, April 15, 2024 in Blog
Errors Observed in Real-world Usage In “Problems With Concurrency” I mentioned that I see concurrency issues a lot. Let’s look at something I recently found in production: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 …
Wednesday, April 10, 2024 in Blog
… continued from the previous post. Structured Concurrency Preview I’ve written about structured concurrency, and Java has a preview API1 StructuredTaskScope2: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import …
Tuesday, April 09, 2024 in Blog
Reading my articles about Go concurrency a friend asked me whether one could something similar in Java. Project Loom Since the release JDK 21 Java has virtual threads1: Thread.startVirtualThread(() -> { System.out.println("Hello, world"); …
Thursday, March 28, 2024 in Blog
… continued from the previous post. Shuffling through Stack Overflow questions I realized that there is one point I tried to make clear, but didn’t emphasize enough: Write Synchronous Code First Many programs work perfectly fine without …
Wednesday, March 27, 2024 in Blog
… continued from the previous post. Two Popular Choices Perhaps the most popular exisiting library is golang.org/x/sync/errgroup by Bryan C. Mills: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 package main import ( …
Tuesday, March 26, 2024 in Blog
… continued from the previous post. Refactor Our Original Approach What we have done to the previously can also be done to the approach using an error channel: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 …