Sign in

Software Engineer from Italy
Photo by Guillaume Bolduc on Unsplash

What is a container? Actually, it is not a real thing.

In this post, I will try to explain what containers are and how they work, decomposing them and understanding their components, without going too deep in some concepts which require a way long explanation than the one I could give in a single post.

Currently, there are many technologies for containers (e.g. Docker, containerd, runC and so on), but this post is not going to talk about them and therefore, will be (almost) technology agnostic. …


Photo by Marek Okon on Unsplash

One of the reasons why I love Go is that Go compiler creates static binaries by default unless you use cgo to call C code, in which case it will create a dynamically linked library.

It makes it easy to ship Go programs, create very lightweight Docker images and exploit cross-compiling and plugins.

Starting from Go 1.16, it also gives you the opportunity to ship your own “batteries” using the package embed.

Package embed provides access to files embedded in the running Go program.

Importing the library embed you can use the //go:embed directive to initialize a variable of type…


Photo by Luan Gjokaj on Unsplash

Diving in multiprocessor programming is never easy, I know. Unfortunately for you, you should understand much about computer architecture to do it effectively.

This post will go deep into computer architecture, trying to explain one of the most insidious problems that we may encounter when we do multiprocessor programming: false sharing.

False Sharing: an example in Go

Let’s implement a simple counter interface.

Quite easy, isn’t it?

Let’s create two structures that implement the Increment method.

NotPaddedCounter has 3 uint64 and its implementation of the Increment the method just increments them using atomic.AddUint64 .

PaddedCounter is very similar, but it has these [8]uint64


Photo by Ed Robertson on Unsplash

The path to becoming a skilled Software Engineer is full of books, readings, and discussions about technologies and methodologies.

I spend a lot of time reading books, articles, exploring projects GitHub and, when I go out running, I listen to technical podcasts.

In this post, I will write down a list of technical books, articles and podcasts that I find interesting. I hope that someone will find it interesting as for me.

Not all the books I’ve read are listed here, only the ones I would like to suggest.

Technical Books I’ve read

Designing Data-Intensive Applications


This post was originally written in March 2020.

Photo by Alex Knight on Unsplash

In the previous post, we introduced the basic aspects of Ansible. Now we’ll talk about some advanced features.

Loops

Another way to describe the tools of the Ansible family can be Infrastructure as code. This is the process of managing and provisioning computer data-centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools.

The word code brings an important aspect with it: loops.

In Ansible Playbooks you can use loops to reuse some tasks. An example can be the following:

This task adds several users and in order…


This post was originally written in March 2020.

Photo by Dominik Scythe on Unsplash

Introduction

When I started working as a developer and I started to feel frustrating when I had to repeat something twice or more.

Being a developer does not mean you only have to write code. Hopefully, your code should be executed in different environments and often it is up to you managing part of those environments.

Nowadays automation brings a lot of improvements to the life-quality of developers. You can, therefore, exploit tools that help you repeating boring stuff, keeping you well focused on your work.

Ansible is one of my favourite tools…


This post was originally written in January 2020.

In the previous post, we discussed how to implement linear data structures with Go.

Now we will explore two more complex data structures: tree and graph.

Those structures are not Linear and can represent unstructured information. Both graphs and trees are the foundation of the graph theory and both can be used, essentially, to describe a kind of relation.

In the domain of mathematics and computer science, graph theory is the study of graphs that concerns the relationship between edges and vertices. …


A step-by-step guide through linear data structures with Go

This post was originally written in January 2020.

Data structures are everywhere. Every developer should know how they work under the hood, starting from the most common ones.

A data structure priorly describes how the data is organised, accessed, associated and processed.

Using data structures you can keep your data in memory and efficiently access them.

You should pick the data structure that is the most suitable for your purposes to minimize space in memory and access time.

Some algorithms are designed to run upon certain data structures.

The critical part…


Photo by Austris Augusts on Unsplash

The Binary Search Algorithm is a search algorithm that works for sorted collections (e.g. sorted arrays). It takes a collection as input, the length of that collection and an element to find, and gives as output the index of the element in the collection (if it exists).

This algorithm is as efficient as easy to learn due to its simplicity.

This algorithm does only O(log n) comparisons.

On the other hand, it only works for sorted collections, making it restricted to some specific cases.

This post aims to show some basic differences between these three programming languages. The algorithm itself…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store