"Engineering" blog posts we've written about.

Why Go and Rust?

Engineering 

I was about 80% finished with this post and I was going down the road of listing out all the great things both Go and Rust offer for us to build and maintain software for our clients and product, but then I threw it all out. I realized that posts like that are a dime a dozen and there are so many resources out there comparing, contrasting, and listing features of both languages, but none of that really explains WHY we, the humans Erik, John, and I, like using Go and Rust. So instead I thought it would be better to personalize this a bit and grab some quotes from each of us about why we like each of them, unedited, unfiltered, and raw!

Safer Binary Decoding in Go

Engineering 

Go is a popular language choice for building web services. Typically, when building those web services, we end up encoding/decoding JSON as the data format. The encoding/json package provides a safe way to turn JSON payloads into Go structs, and vice versa.

However, if we need to handle raw []byte that follow a binary encoding format that is not self-describing, we need to do a bit more work and implement the encoding.BinaryMarshaler and encoding.BinaryUnmarshaler directly. Since we're dealing with []byte, we need to respect slice bounds to avoid triggering a panic() and crashing our service.

Let's look at the two ways we can decode data into Go structs and compare how one way will be safer than the other while yielding the same result. As an added bonus, we'll end up with easier to understand code.