I have had a theory for some time that TODO comments in code remain there (almost) forever. They serve to appease the conscience of the developer, but they mostly are forgotten. But I wanted to prove this with numbers. The Plan I needed a large source of code that I could analyze. And the largest source out there is GitHub. So the idea is quite simple: find TODO comments in GitHub repositories use git blame to find out how long

If you’ve been following this blog for some time, you know I develop software mostly using test-driven development AKA TDD. But while this mostly means unit tests, it shouldn’t be limited to only unit tests. At one of my current clients, we use AWS Lambda functions written in TypeScript. These are (usually) relatively small blocks of code that can be invoked by a HTTP call. The function has a very limited scope of what it can be used for, i.e.

This is 50/50 a real post and a service announcement. The short version is that I’ve removed Google Analytics from this site (and redstar.be, my legacy project blog for non-technical people). I’m also using Brave and DuckDuckGo now. Read on for the long version. Google Chrome For some time, I have felt fairly (but not alarmingly) uneasy with the amount of data Google collects by me using Chrome. I’m somewhere in the middle of the whole privacy debate: between “don’t

This may not be new to you, but I recently discovered another cool feature of Git. Rebasing with the autosquash option allows me to keep a clean log with minimal effort. I’ve written about interactive rebasing before. This makes it even easier. Interactive Rebasing You want to do an interactive rebase when you have a series of commits that need be squashed together or when you want to change the order. Let’s say you have the following commits: But then

I recently saw a tweet on my Twitter-feed about failures and how we should also share our failures, not just our successes. Everyone experiences failure, but if we don’t share them, new developers will feel it’s not OK to make mistakes. So here are some of my mistakes and what I learned from them. This is the respective tweet: Be sure to read the rest of the thread. It’s a good and short read. Updating the Production Database Too Early

This post was written for the NCrunch blog. You can find the original here. Unit tests help developers write better code and provide a faster way of getting feedback compared to testing manually. But unit tests are also another piece of code that must be maintained and taken care of. Unit tests can become a mess just like production code can. Here are some tips on how to improve your tests and avoid such a situation. Keep Your Tests Small

This post was written for the NCrunch blog. You can find the original here. There are many ways of testing your application or library. The test pyramid provides a good starting point to the most common types of tests—unit tests, integration tests, end-to-end tests, and manual tests. But there are other types of tests, like contract tests, load tests, smoke tests, and what we’ll be looking at in this article—property-based tests. What’s the Idea? Property-based testing is where you test

I’ve written multiple posts about legacy code and automated tests. I believed both are closely connected in that one can help solve the other. I also enjoy working on legacy code, improving software development practices and improving code quality. But this blog has always been geared towards developers, and it seems managers don’t always follow. Which is why I’ve started a new blog, aimed at managers dealing with legacy code. Over time, I’ve come to like improving the situation around

As an independent consultant, I work for companies large and small. But I (lightly) engage in some open source work, from submitting bugs over creating pull requests to maintaining my own RedStar.Amounts library. The open source community has some best practices that are often missing in companies. Here are some that I recommend you try to introduce in your organization. There is a minor disclaimer though: this is not true for all open source work. But most well-maintained open source

This post was written for the NCrunch blog. You can find the original here. Test-driven development is a technique to drive the development of your project. TDD enables you to verify your code, it provides confidence for refactoring, and it enables a cleaner architecture. But what if you already have an existing codebase that wasn’t developed with TDD? How can you get started with TDD in such a (legacy) project? There are several approaches to this, so let’s dive in! The Situation