Konrad Reiche

@konradreiche.com

Writing ⌯Go at Reddit konradreiche.com

Evidence so far suggests that it’s easier to discover previously unknown proofs in math and make new scientific discoveries than it is to make UI tests in Xcode pass reliably

I haven't found a good answer to this yet. When exposing a seed for a PCG RNG, is it better to accept both the state seed and stream value or accept one seed and derive the other? I'm using it for a finite Zipf generator.

Co-worker asked what programming languages I learned in high school. I said Borland Delphi and they asked if I went to high school in the 90s. A fair but devastating burn.

Most nil checks I see in Go aren't defensive programming. They're a sign that the code lost track of what can and cannot be nil. A nil check is good when it enforces a real boundary. It's suspicious when it silently handles a state your program claims is impossible konradreiche.com/blog/excessi...

Excessive nil pointer checks in Go

Let’s talk about nil pointer checks in Go. You want to prevent panics in production, but that doesn’t start with a deferred recover. It starts with defensive programming. Check your inputs, check your...

konradreiche.com

Google Maps the moment you start directions: "There's a 20 minute delay, but you're still on the fastest route." Nothing you can do about it. Just thought you should know.

I got to meet Steve Yegge in Montreal. Super nice guy and we had a short but interesting conversation. TL;DR We need to recognize developers are writing code even when a tool is performing the work. Engineering means the developer steers the model, not the other way around.

I just published a proposal for a new RSS profile type for Go. It aims to solve the issue that the heap profile typically shows < 50% of process RSS, which is very confusing. It should also help to quickly identify when memory usage is dominated by cgo. github.com/golang/go/is...

proposal: runtime/pprof: add a rss profile type · Issue #79179 · golang/go

This is a proposal to introduce a new "rss" profile type to runtime/pprof to provide Go users with a holistic breakdown of their program's memory usage. Problem Statement As part of incident respon...

github.com

We need to talk about excessive nil pointer checks in Go. Writing code that's safe and prevents panics is excellent, but when we reach the point where no pointer can be trusted, we've dug ourselves into a hole.

Quality-of-life improvement: adding a test helper package that lets you construct context variants in one line, without anonymous functions in table-driven tests: ctxtest.New(t, ctxtest.WithCanceled(true)) The kind of package you create after wishing it existed for the fifth time.

I find it increasingly judgmental to state that something is an anti-pattern without additional context. It moves the conversation to: you're obviously doing it wrong. I think we can do a lot better.

Before concluding that the fix for issues seen with agentic programming is design by contract, or focusing on writing clear specs that can be thrown over the wall, it is worth revisiting the history of the waterfall model.