Making a Configurable Go App

Gopher configuring a machine

When we observed changes in the file system some posts ago – creating, modifying, and deleting files and directories – we hard-coded the location where we wanted to observe those changes. If we wanted to observe a different location we would need to change the code and recompile it. The world is simply not that static, so we better provide some flexibility to users. We can do it through flags, configuration files, and environment variables.

Continue reading...

Dealing With Pressure Outside of the Workplace

Air Compressor Gopher

I have one of those things people call “car” that requires me to check its tires’ pressure once a month. I’m not really disciplined to check them every month, but at some point I feel guilty after noticing the car bending to the left. It is 1 year old and I might have checked it three times so far, but this time I decided to understand what I was doing. For my surprise, it was not straightforward in 2021.

Continue reading...

Reacting to File Changes Using the Observer Design Pattern in Go

Gopher Observer

Science has shown that shy people are clever because they spend more time listening and observing and less time speaking and showing off. They absorb more information and spend countless hours reasoning them. They do it quietly and are rarely recognized by their intellects. What science has not shown is that the Observer Design Pattern is also a humble part of a crafted designed software but rarely recognized as well.

Continue reading...