Recent Posts

How much Pi do you really need?

Last Thursday was Pi day, at least in those parts of the world with a month-before-day date format. Google celebrated this event by computing a record-breaking 31.4 trillion digits of Pi. There's no practical applications for this whatsoever, but it did get me wondering: how much Pi is enough? Let's figure this out by using ... read full post

Why I don't have a very active GitHub profile

I was approached by a recruiter on LinkedIn the other day with yet another unsolicited job offer. I get these every week, and usually I just ignore them. This one stood out to me, however, due to the way the candidate profile was described. This guy was unironically looking for a "rockstar developer" who "lives and breathes code," maintains an "active GitHub profile," and spends a lot of time on reddit and hackernews. Yeah. I don't see ... read full post

Min-maxing Forza Horizon 4 for fun and profit

There's a lot of things to do in Forza Horizon 4, but eventually you will complete all events, smash everything there is to smash, and 3-star everything there is to 3-star. So what do you do then? Replay the LaRacer missions? Well, maybe not. Maybe you start thinking about ways of getting a lot of money and influence with as little effort as possible. I have a decent strategy that I'd thought I'd share. It's probably not 100% optimal, but it's really easy and ... read full post

SHENZHEN IRL: BRING OUT THE BARON!!

There's an early-game puzzle in SHENZHEN I/O called "BRING OUT THE BARON!!" that has you designing a simple personal scorekeeper for a drinking game. This assignment comes in through Joe, obviously. The scorekeeper is a fairly simple device. It has two input buttons called "point" and "foul", and a multi-digit ... read full post

Unlocking SQL Server Management Studio's hidden dark theme

If there's one minor annoyance I have with SQL Server Management Studio, it's how it looks. Specifically how bright it looks. This becomes obvious when using SSMS side-by-side with Visual Studio. Of course, Visual Studio has come with a dark theme since version 2012, which is how it should be for all IDEs. I mean, look at it: So dark. So soothing. Like a warm bath for your eyeballs. Then you alt-tab over ... read full post

Static variables, constructors, and JIT optimizations

We ran into an interesting problem at work the other day. A unit test was always passing locally, but failing on the build server. Here's a minimal reproduction of the code involved, so we can take a look at what went wrong. The (relevant bits of the) class that was being tested looked something like this: public class Foo { private static readonly ConcurrentDictionary<int, Foo> _map = new ConcurrentDictionary<int, ... read full post

TIS-100, final part

It's time to bite the bullet and grind our way through the final puzzles of TIS-100. Segment 60099: signal window filter This is the only puzzle in the game where the histograms tell me I have a genuinely poor performing solution (in terms of cycles). I have taken the straightforward approach here, which in this case is apparently naive. I have no interest in improving it, though, as this final batch of puzzles is already pushing the boundary of what I consider ... read full post

TIS-100, part 4

It's time for some ASCII art with the TIS-100! Segment 50370: image test pattern 1 Here we are introduced to the fine graphics capabilities of the TIS-100. This first puzzle is basically a tutorial on how to work the graphics output. The top node keeps track of the Y position, while the bottom node loops over the X axis and outputs the color value for white 30 times. I initially used to simply loop 30 ... read full post

TIS-100, part 3

More fake assembly programming with TIS-100! Segment 40196: signal pattern detector Not the most optimal solution here (if the histograms are to be believed), but one that is easy to understand, with a clear separation of concerns between the nodes. The first node keeps track of how many sequential zeros it has seen, resetting the count if a non-zero value is found. It passes this value to the second node, which then checks if this value is at least 3. If so, it outputs ... read full post

TIS-100, part 2

Let's continue our TIS-100 adventure, and see if we can make it out of tutorial land today. Segment 30647: sequence generator This is the first puzzle that hints at how painful it is to compare two numbers with the TIS-100, which is something we will unfortunately be doing a lot in the future. As for right now, we can get away with this clunky solution. The node reading A acts as a cache for that ... read full post