Quick Numbers: Atomic and Mutex

Sometimes I'm the poster child for premature optimization. Normally, I write something and if it is fast enough I don't look at the benchmarks. I've written a lot of Go, so I generally have performant code that gets the job done without benchmarking. Most of what I write has a specific audience, so I can simply base it on if it holds up with the clients. But certain work, such [Read More]

My Dev Lessons From 2020

Interns/New grads are not a resource, they are a cost center What layer you build a capability into is crazy important Ubiquity wins, because HTTP/HTML/X509/REST/JSON are just awful technology REST is a mess, just stop and use GRPC and export to REST if you must Kubernetes is to Borg what Frankstein is to the Dali Lama Benchmarks matter Don't refactor a bad code base, rewrite [Read More]

Flatbuffers in Go Fall Flat

Flatbuffers are a Google message format in the same vein as Protocol Buffers or JSON. They were designed for game programmers in C++ who want to avoid heap allocations at all costs. It isn't a new tech, but I started seeing articles recently saying people should use them. I was truly skeptical about this as all the example code for Go looked painful. I recently had a very niche use [Read More]

Proto vs encoding/json - No Contest

The standard library's JSON encoder is slow. And JSON is not efficient. BSON is where JSON should have been, at least eliminating base64 encoding to transfer bytes. The non-standard library JSON encoders either require code generation (which you might as well use proto as it encodes better) or can't support the full feature set. I was being lazy recently and I decided to use JSON for encoding an internal frame [Read More]

Socket to me: A Set Of Unix Socket Packages for Go

Introduction Unix Domain Sockets are an Interprocess Communication(IPC) mechanism that is available on Linux/OSX/BSD/Windows systems. Go has support for unix sockets via the net.Dial() and net.Listen() calls. However this lacks higher level wrappers that provide: Authentication/Security Chunking Message streaming RPCs As such I am releasing a set of packages to provide these on Linux/OSX systems. TLDR Packages to do IPC via unix [Read More]