Skip to content

2025

MongoDB documents are strange

MongoDB stores all its information in its own binary format called BSON. Lately, I've been writing my own implementation of BSON, and so I've been studying its specification. Here are a few things I learned about BSON documents.

Back to basics: When sets break

Sets are one of the most basic data structures of modern programming. Unlike arrays, sets require the data to confirm to a few invariants. Let's review what they are, and what happens when we break them.