Of Code Coverage and the Internet

January 15, 2026
Tags: software engineering, code coverage, internet

Last week, a post on X reminded me of my encounters with software code coverage. For a number of years in my professional career, I was required to do something or the other for improving software code coverage.

Definition

Software code coverage is a metric which is defined as the percentage of source code lines executed by the test cases supplied with it. There is a school of thought that this metric should be as close to 100% as possible. In other words, if the software runs on all the test cases supplied with it, almost every single line of source code should get executed. I don’t need to explain this further, because there is ample literature on the internet about this. And I am no expert on it.

My experience with code coverage

My personal experience with code coverage is biased by trying to improve the metric on very large and very old software used for chip design. It is difficult to write meaningful tests which cause this kind of software to execute a particular line - but maybe I was not good at this activity. Some people are. What I recall is that at the times I succeeded in improving code coverage, I didn’t feel like I was fixing a problem with the software. Or even improving something in the software. Again - maybe I wasn’t sensitive enough.

The lost article

I remember looking for advice on the internet years ago, and finding a highly cited article written by a person who had created software code coverage measurement tools. I wanted to find that article and reply to the post on X. To my dismay - I could not find it. The first page on Google showed blog posts from the last few years. I switched to DuckDuckGo and it was only slightly better.

I had to search more and then found the link to the article - which pointed to an invalid website. The domain had expired and belonged to someone else now, and the article was gone. Then I turned to the Internet Archive where I finally found it!

Wisdom and the internet

I have uploaded the article to this website - it is called How to Misuse Code Coverage. I don’t want it to get lost again. It is a little bag of wisdom which every software engineer should read - whether he/she agrees with it or not.

That day I felt bad about the internet. Wasn’t it supposed to be a place where the world’s wisdom can be safely stored for everyone to use? We need to make sure that things which have stood the test of time can always be found on the internet. This is all the more important today because AI agents have been trained on the internet - and humans (including myself) are increasingly trusting the decisions of AI agents. We don’t want to go downhill as a species and repeat expensive mistakes that we had learned not to do.

Made using Hugo (source)