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.

What does it mean to be a better Java? (Part 1)

In the old days, programming languages would come and go. In the modern age, languages remain for decades as platforms on top of which new ecosystems are born, never to be dethroned. Java is the venerable sage of the server-side world—but new languages still attempt to take it on.

Don't touch Throwable

Throwable is the supertype of all things that can be thrown. It often appears in codebases as an upper bound for error handling. Here's why you shouldn't do it.

The vulnerability is by design

We should all strive to write code that is harder—if not impossible—to exploit. Sometimes, however, the vulnerability comes from places we thought we could trust.