(Archived) Programming — Table Of Contents

Digital Grove
Upstream & Downstream
In my UI series, I wrote about my preference for an “immediate mode” interface for building UI. This preference came from years of attempting to build UI from scratch in various ways. When I’d use a retained mode interface, it would always feel like I was pushing sand around…
Read more
Digital Grove
Multi-Threading & Mutation
On day one, to even begin programming anything, programmers must understand how to write text files, and use an interpreter, or compiler, or assembler, to turn them into executing programs. Soon after, they must roughly understand what memory is, and how to use addresses and pointers (even if they’re working in various high level languages in which thos…
Read more
Digital Grove
The Easiest Way To Handle Errors Is To Not Have Them
Programmers are taught early to spend a great deal of time considering “errors”, and how to “handle” them. But one of the most important programming lessons I’ve learned over the past several years is to dismiss the idea that errors are special. At the bottom, the computer is a computer. It’s a data transformation machine. An error case is simply a…
Read more
Digital Grove
Enter The Arena: Simplifying Memory Management (Talk)
This is a video of a talk I did in August 2023, aiming to teach the concepts described in Untangling Lifetimes: The Arena Allocator, in a different format, with greater and more concrete detail. The small sample program—along with many other projects and examples, all built using arenas as the core memory management primitive—is included in…
Listen now
Digital Grove
Factorio, Mutation, & Lossiness
I heard about Factorio not long after its 2016 release. Within the span of a few months, several friends of mine developed a new addiction—it wasn’t to any kind of physical substance, but it might as well have been. As such, I avoided playing it at first; I wanted to give it a try when I knew I had a few weeks of time off, and such periods become exceed…
Read more
Digital Grove
The Function Is A Lie
I recently mentioned, in conversation, a technique I regularly use for user interface animation, which I’ve written about before. It’s not applicable for all animation curves in all scenarios, but it tightly fits design goals for a user interface, it’s simple, it’s low-cost to implement, and it produces robust animation behavior which gracefully adapts to mid-animation changes. Importantly, this technique introduces no new…
Read more
Digital Grove
The Codepath Combinatoric Explosion
I defined a codepath as “a sequential list of instructions which terminates”. One interesting detail of that definition is that it entirely ignores control flow—there is no way to form loops or conditionals in a codepath (given that definition), because an executor must necessarily execute instructions…
Read more
Digital Grove
Main Loops, Refresh Rates, and Determinism
One of the first lessons in game, simulation, and application programming is on the “main loop”: for(B32 should_quit = 0; should_quit == 0;) { GatherInputs(); // get data encoding input from user Update(); // simulate, using new inputs Draw(); // draw state of simulation on screen …
Read more
Digital Grove
A Taxonomy Of Computation Shapes
Many learn to program because they’re fascinated by—and talented at solving—the tricky logic puzzles involved. But those puzzles weren’t my top priority when I started programming. I can appreciate a good puzzle, but I got into programming because, originally, I wanted to build my own video games. I still loved…
Read more
Digital Grove
Emergence and Composition
There are only two hard things in Computer Science: cache invalidation and naming things. —Phil Karlton Naming is often called one of the most difficult problems in programming. Surely, at least once during a programming conference of your choice, and almost always by someone who has done a lot of programming…
Read more
Digital Grove
In Defense Of Linked Lists
Learning the basics of data structures is a rite of passage for new programmers. On their first day doing so, chances are they’ll encounter the idea of a “node”, and the idea of links between nodes. Both of these ideas can be used to organize data in innumerable ways…
Read more
Digital Grove
You Get What You Measure
I’ve noticed an unfortunate development habit of mine. I’m not the only one, so chances are if you’ve avoided this habit yourself, you’ve at least seen it elsewhere. This habit is over-secrecy in a project’s development. “Nobody can see it until it’s…
Read more
Digital Grove
Untangling Lifetimes: The Arena Allocator
In every instance when I’ve said that I prefer to write my software in C, the response is—normally—raised eyebrows. Several dominant memes in the programming world make my position unpopular, and thus uncommon to find. I regularly hear, “why would you write new code in an unsafe systems language?”, “performance isn’t everything!”, and perhaps the most c…
Read more
Digital Grove
Table-Driven Code Generation
Anyone who has written C has been in the situation—you write an enum, and sooner or later, you’d like to associate values of that enum with strings. You might want to log a value to plaintext in a human-readable form, or you might want to display the value in a user interface…
Read more