Owen Gage

Writing and teaching about software engineering.



How VS Code works: text storage

I'm looking to make my own note taking application, as many software developers try to do. Going for a web-based text editor, I wanted to investigate how this gets done. This article mostly digs into VS Code, and will be expanded in future articles.


Getting the ^D

What does Ctrl-D do when typed into a terminal? The typical and unsatisfying answer is it sends end-of-file (EOF) to the terminal. But what is EOF exactly? What does this trigger? Where in the immense stack of code involved is the behaviour found?

Terminals and Shells 3: Bits and pieces

Continuing the terminal and shells series, this covers lots of small things, such as making path changes permanent, creating aliases, control characters like Ctrl-C, pipes, standard input and outputs, and job control.

Terminals and Shells 2: Processes and their environments

Continuing the terminal and shells series, this covers processes and their environment variables, how to make your own commands and how to control inheritance of environment to sub-processes.

Terminals and Shells 1: Fundamentals

This is part of a series about terminal and shell usage. I focus mostly on Linux based shells. This is stuff that may be difficult to find in any normal training material. If you're a new developer or programmer you will hopefully find it useful. I try to explain more of the implementation side if it helps understanding.


Advent of Code 2022 in Rust

Major things learned from doing the Advent of Code 2022 in Rust is that I'm bad at backtracking, and that I have the reading comprehension of a 3 year old.

Mapping into the serde data model

The official Serde documentation talks about mapping into the data model and gives a demonstration using OsString. I want to walk through an example of doing this, showing the code to achieve it as we go. This assumes you already know the basics of implementing a Serde data format.

A look at serde-json

My `fastnbt` crate that deserializes NBT from *Minecraft: Java Edition*, has some issues. The main ones to me are not working with the Read trait, ...

The spike at the heart of floats

IEEE 754 floating point numbers are in practically every programming language out there. Most people have come across or have been bitten by this: 0.1 + 0.2 != 0.3


Good tests don't change

A common complaint about unit tests is the overhead that it takes to write and maintain them. I think the core reason for this is that people write tests that they keep needing to rewrite.

How to think of unwrap

The unwrap method can be confusing to newcomers to Rust. This talks about some best practice regarding its usage.

Async, Non-blocking, static or dynamic, strong or weakly typed

I have my own definitions of these words. I think they make sense. I imagine there's a large selection of personal definitions out there.

Exploring serde's data model with a toy deserializer

Previously I did a shallow dive into understanding serde by expanding the Deserialize macro. This time I'll go deeper and map how each type in serde's data model is treated.

Understanding Rust's serde using macro expansion

While I was writing fastnbt, I struggled to find an in depth explanation of how to write a deserializer with serde. I want to explore how serde works using cargo-expand.



Anvil is a in-browser Minecraft map renderer powered by Rust and WASM. You can render a map of your Minecraft world in the browser with no upload required. It also contains renders of several big YouTuber's worlds, such as EthosLab and Hermitcraft.

It is powered by my fastnbt crate for parsing the Minecraft NBT data format.