Should You Return Empty or Nil Slices in Go?

Empty vs Nil Slices in Go

In Go, we are often returning zero values. Idiomatic Go encourages the use of guard clauses, and guard clauses necessitate the need to return early. When returning early with an error, by convention all other return values should be zero values. The confusion arises with data types like maps and slices… should they be nil, … Read more Should You Return Empty or Nil Slices in Go?

Slow Is Smooth, Smooth Is Fast – 25% of Our Time Refactoring

Slow Is Smooth, Smooth Is Fast - Refactoring

My team has been spending less of our “free” time working on bugs and features from the backlog, and more time refactoring our codebases and test suites. As a result, and perhaps somewhat counterintuitively, we’ve noticed a significant increase in our throughput of features and bug fixes. As it turns out, its easy to find … Read more Slow Is Smooth, Smooth Is Fast – 25% of Our Time Refactoring

Optimize For Simplicity First

KISS keep it simple stupid

We can’t optimize for everything in software engineering, so we need to start with something, and that something should be simplicity. For example, to over-optimize for speed in JavaScript, we might write our for-loops backwards to the detriment of readability. On other occasions, we may over-optimize architectural abstraction to the detriment of speed. I assert … Read more Optimize For Simplicity First