HalfPike: A framework to avoid problems with standard regexes in operational tooling

Introduction It is my contention that naked regular expression use (regexes) within SRE and DevOps software and tooling provides for: Hard to read code Difficult to reason when errors occur Bad matches that are assumed to be good data Causing outages or unintentional consequences in tooling It is not the contention that regexes are bad in nature, but that their ease of use combined with abilities to match large and [Read More]

Go Language Basics

Today I am announcing a Go Language Basics class. The class is provided as a free video and accompanying class materials in PDF format. The class is meant to bring new programmers up to speed with Go. It is heavy on exercises and because its video, it provides animated illustrations of slice internals, pointers, ... This class provides similar materials to what I taught at Google and Microsoft around the globe. [Read More]

Using No-Op Objects For Cleaner Code

Sooner or later every Go programmer will want to extract an object from another object such as Context or utilize an object that can be set to nil throughout the call stack. However, this can lead to ugly code that looks like: func someFunc(obj *MyObj) { if obj != nil { DoThis() } otherFunc(obj) } func otherFunc(obj *MyObj) { if obj != nil { DoThis() } ... } I this case, if our obj != nil, we want to [Read More]

Unbounded Queue: A tale of premature optimization

A simple start When you work in this industry for a while, if your introspective, you can discover what type of programmer you are. You might be a programmer obsessed with performance or trying to find clever tricks. I am neither of those. While I do like to find new techniques or simpler ways to do something, I generally prefer to steal from others who are much smarter than I. [Read More]