profile picture

Blog

Falsehoods programmers believe about undefined behavior

November 27, 2022 - 2421 words - 13 mins
Undefined behavior (UB) is a tricky concept in programming languages and compilers. Over the many years I've been an industry mentor for MIT's 6.172 Performance Engineering course, An excellent class that I highly recommend. It's very thorough and hands-on, at the expense of also requiring a lot of… read more

My HYTRADBOI'22 Jam

October 03, 2022 - 1121 words - 6 mins

I had a lot of fun spending nights-and-weekends time participating in the HYTRADBOI Jam, a global hack week aimed at building "exciting and weird" data-centric solutions to familiar problems. The name HYTRADBOI might sound familiar: the jam is associated with the same conference where I gave my "How to Query (Almost) Everything" talk talk in April this year.

I jammed on two projects: one solo and one with a friend. The projects ultimately were very successful and mostly-successful, respectively. read more

Debugging Safari: If at first you succeed, don't try again

September 19, 2022 - 1887 words - 10 mins

The saying usually goes: "If at first you don't succeed, try, try again." But in the Safari web browser under the right conditions, trying again after succeeding once can get you in trouble. This is my recent debugging adventure. read more

Toward fearless cargo update

August 25, 2022 - 1866 words - 10 mins

I recently built cargo-semver-checks, a linter that ensures crates adhere to semantic versioning. This is why and how I built it.

Fearless development is a key theme throughout Rust. "If it compiles, it works", fearless concurrency, etc.

But there's one aspect of Rust (and nearly all other languages) that isn't entirely fearless yet: cargo update, upgrading the versions of the project's dependencies.

read more

Compiler Adventures, part 3: Value Numbering

May 17, 2022 - 3096 words - 16 mins
A beginner-friendly introduction to compilers: follow along as we build a compiler from scratch, or fork the code on GitHub and add your own optimizations too! In this episode: value numbering helps track how values are used in the program. Last time on Compiler Adventures, we implemented constant p… read more

To ace exams, get better at the easy questions

April 01, 2022 - 1732 words - 9 mins
Happy April 1st! A group of folks and I decided to do something different this year: instead of publishing fake things, we’re publishing real posts on very different topics than our readers usually expect from our blogs. The tech content will be back soon! Check out the other April Cools posts here.… read more

Compiler Adventures, part 2: Constant Propagation

February 17, 2022 - 2392 words - 12 mins
A beginner-friendly introduction to compilers: follow along as we build a compiler from scratch, or fork the code on GitHub and add your own optimizations too! In this episode: propagating constant values to eliminate more instructions. Last time on Compiler Adventures, we wrote an optimization that… read more

Compiler Adventures, part 1: No-op Instructions

February 03, 2022 - 1955 words - 10 mins
A beginner-friendly introduction to compilers: follow along as we build a compiler from scratch, or fork the code on GitHub and add your own optimizations too! In this episode: eliminating no-op instructions. What part of computer science feels most like arcane magic? I'd say compilers. "The ma… read more

How Paxos and Two-Phase Commit Differ

January 26, 2021 - 1115 words - 6 mins
Distributed systems courses frequently introduce the Paxos and two-phase commit (2PC) protocols in quick succession. On one hand, this is a reasonable educational choice, as Paxos and 2PC are both examples of consensus algorithms used in the real world. On the other, it leads many students toward th… read more