Composition via embedding in Go

Unlock simpler design via a lesser known feature

I was introduced to type embedding (or embedding, in short) by Filippo Valsorda in one of his talks. Apparently this is a lesser known (and lesser used) feature of the Go language, although it’s been around since the beginning. I hope I can spread with this post how it works and how it can be pragmatically helpful to create more expressive and reusable code. What is embedding? Embedding is a powerful feature of the Go language that allows to compose types together, “bundling” new types that inherit the properties or behavior of the embedded types. [Read More]

Sustainable Performance

Craft software while looking after our planet

I mentioned sustainable performance in a previous post, telling that it “could be a blog post on its own”, and after noting interest on the matter from people I highly respect, I decided to write this post. What is sustainable performance? If you worked as a software engineer for some time, you must have faced at least once the question: “is my code running at its full potential?”. So many intricacies can arise from such a simple question, especially in a highly dynamic industry such as Information Technology. [Read More]

Improving 4pr.es Links

Revamping a toy project and making it a product

In the past few days I have been doing maintenance on a pet project of mine: a URL shortener. I initially built “4pres” in 2013 as a way of experimenting with the Go programming language. It is a URL shortener, it does one simple thing: it generates a random short URL (prefixed with the domain 4pr.es) for a longer one. Despite its “dumbness”, it served the greater purpose of exposing me to some software engineering problems I had never faced before. [Read More]

Micro-committing with Git

I have been using micro-committing for some time now, during which I have adapted the usage of this technique to my needs, bringing it to a level that makes me more productive than ever in software development. Combining micro-committing with Git, while doing TDD is now my favorite development experience: I like how this workflow helps to deliver changes with speed and confidence. This is not a one-size-fits-all approach, I’m sharing what works great for me; I hope some parts of what follows will help you and your team as well. [Read More]