-
Template Method Design Pattern And Alternatives

I cannot deny that the Template Method Design Pattern is one of my favourites, mainly because it’s so simple and helps us get rid of duplicated code, but it also has some downsides. In this article, I’ll give you a concrete real-life example of this design pattern in action, and what some alternatives are. Solving…
-
Know Your Users

When designing and writing software, it is important to understand who our customers are and their needs. If we fail at this, we risk providing a bad experience, which is not great for anyone. But in other cases, we could negatively impact the lives of our users. Imagine, for example, that when your bank releases…
-
Fixing Flaky Tests Matters

When automated tests seem to pass or fail randomly, we say that they are unstable, non-deterministic, or flaky. Beyond the annoyance this can be, fixing them is in fact critical to the success of any software product, as I will explain later. Flaky tests present themselves in different ways. For example, a couple of weeks…
-
Achieving Goals

In this article, I will discuss how, based on my own experience, we can set and achieve long term goals. This topic was actually my daughter’s idea to celebrate that this is my 53rd weekly consecutive article, which marks the completion of a goal that seemed too ambitious when I first set it: write one…
-
Refactoring Safely With Tests

I’ve recently been working on adding a new feature that, for many reasons, requires a great deal of refactoring to our existing codebase. I’ve done code refactoring for most of my career, and I’ll do it many more times until the day I retire. When I started, though, things were a bit different from what…
-
Staying Useful In The AI Era

Last weekend, I was talking with a friend about the usage of Generative AI by some of her university students. She was concerned about the impact of these tools on their writing skills, as they are missing key years of practice that will help them develop this skill. Although I can understand her, I can…
-
The Risk Of Assuming

Life sometimes teaches us lessons that we can apply in the workplace. During my last years of university, I learnt that assuming can have serious consequences. This is the story. As part of my master’s thesis, I needed to take detailed measurements of the environment to make 3D computer models. For this, I used a…
-
The Singleton Design Pattern

The Singleton Design Pattern as we know it today was made popular by the book Design Patterns, written by the famous Gang of Four and published in 1994. This pattern shows us how to create a Singleton class. A Singleton ensures there is exactly one object of that class. We cannot directly create new instances,…
-
Operator Precedence Anxiety

Early in my career, I used to add useless brackets to my logical expressions “just in case”, meaning that I wasn’t really sure about the precedence of operators, and it was easier to just add some parentheses than be bothered to learn what operator was evaluated first. After a while I learnt to do better…
-
Good comments

Although the desire for good code is as old as code itself, it was Robert C. Martin’s Clean Code book from 2008 that made this name popular. His book compiles many good practices and recommendations that have been conceived and put to the test for many years, and it is considered by many, me included,…
