Are large slices more expensive than smaller ones?

Programmers have a tendency to be superstitious. Particularly, when a programmer hears that copies are expensive, they start to see them everywhere, especially when they learn that, in Go, every assignment is a copy. Consider this code; x is three orders of magnitude larger than...

Kubernetes Jobs: shut down sidecar when main container finishes

Kubernetes Pod lifecycle does not cover everything just yet. I’m working on an app that listens to Buildkite job.scheduled webhook and creates a Kubernetes Job to execute it. The idea is to have a “scale-to-zero” approach, with the max number of nodes being def...

Don't try to sanitize input. Escape output.

Why you shouldn't try to sanitize user input; instead, escape output correctly.

Docker Images : Part II - Details Specific To Different Languages

Series Index Reducing Image Size Details Specific To Different Languages Going Farther To Reduce Image Size Introduction In the first part, we introduced multi-stage builds, static and dynamic linking, and briefly mentioned Alpine. In this second part, we are going to dive into s...

Freelancer by Choice

The Zen of Go

This article was derived from my GopherCon Israel 2020 presentation. It’s also quite long. If you’d prefer a shorter version, head over to the-zen-of-go.netlify.com. A recording of the presentation is available on YouTube. How should I write good code? Something that...

Easy private Helm repositories

Can we have a private Helm repository using GCS as backend? Yes we can! The easier way to create a public helm repository is to just upload your artifacts to a bucket somewhere. I usually use a script like the following to do that: #!/bin/sh set -e helm init --client-only mkdi...

SEO for Software Engineers

The basics of Search Engine Optimization, written for software developers.

Modules Part 04: Mirrors, Checksums and Athens

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction One of the longer standing questions I had when first learning about modules was how the module mirror, checksum database a...

Go for Cloud

Go has been continuously growing in the past decade, especially among the infrastructure teams and in the cloud ecosystem. In this article, we will go through some of the unique strengths of Go in this field. We will also cover some gotchas that may not be obvious to the users at...