Programming — Table Of Contents

Jan 27, 2023
Hidden 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
Hidden 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
Hidden 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
Hidden 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
Hidden 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
Hidden 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
Hidden 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
Hidden 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
Hidden 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