#go

Global variables aren't the problem...: ... global mutable state is the problem. Well, global variables are typically global state, so they are still a problem. However, the distinction is still important, since some design changes taken to remove global variables can actually make a program's design worse.

Benchmarking with Go: The authors of the Go language have invested to ensure that benchmarking and profiling are well-supported by the language's tooling. This puts Go ahead of many other language, but the tools provided fall short of being sufficient. The standard tools don't handle measurement uncertainty, and so cannot (on their own) correctly answer basic performance questions.

Sleep with Context: Go's standard library includes a useful function, time.Sleep, which pauses the current goroutine for at least the specified duration. This is all well and good, and commonly found in the standard libraries of many languages, but unfortunately the function is less useful in a post-context world.

Idiomatic panics in Go: Unpopular opinion: Idiomatic Go panics. Not instead of proper error handling, but there remain times when panicking is the best option for correct code. Unfortunately, the use of panic is frowned upon so strongly that even correct uses are likely to get criticized in review. This post hopefully explains when panics are acceptable and idiomatic in Go.