I’ve had a longtime theory that TODO comments in code don’t get fixed any time soon. To get some numbers on this, I set out to analyze a set of GitHub repositories. You can read how I researched the lifetime of TODO comments in my previous post. In this post, I’ll look at the numbers. I’ll also talk about some aspects lacking in my research and how I could address them in a next round. An Overview As previously mentioned,

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

Here I am again with a follow up post in my series on fixing a real world legacy application. I’ve been continuing my work with NDepend and wanted to give an update on what it has helped me do. Just a small reminder: the application is a web application to make forecasts about the World or European championship football/soccer. You can read more about it in my first post. Mutable Statics I had a large class containing all the teams

In my series of fixing a real-world legacy application, I’ve already improved the code in some big blocks: updated Bootstrap introduced dependency injection removed unnecessary cruft added logging But fixing legacy applications often means making many smaller improvements. Many of these are often a matter of personal opinion. And when multiple developers do agree on an issue, they might not agree on a particular solution. The best way to avoid these nonconstructive discussions, is to have a tool to automate