# 2222 km how many bugs ?

## 2222 km :

2222 km is the distance I traveled while programming on my treadmill, between August 1 and December 31, 2013. 2222 km is more than 3.7 million steps at an average length of 60 cm and speed of 3 km/h. How many bugs is that? The following account attempts to answer this short, tricky question.

## Kloc:

Code is measured in “KLOC” – the technical abbreviation for “thousands (‘kilos’) of lines of code.” According to scholarly models, during the development phase a developer produces about ten bugs per thousand lines of code. It is widely accepted that most final versions of software have between 0.5 and 1 bug per KLOC. We won’t argue about the 1/2 bugs and others to the decimal point; it’s irrelevant. Let’s move on!

## Auto-quantification:

Rigorous and systematic measures have allowed me to establish that I was writing, with regularity, 10 lines of pure code, without any frills or commentary, per kilometre. It occurs to me, as an exception, that there are some spikes of 10 to 20 KLOC/hour when I use metaprogramming and generative processes. But these excessive practices, comparable to “programmatic” doping, are not recognized in pure metrology.

## From the preceding considerations, it follows:

That I have very likely deduced from 11 to 22 bugs while walking 2222 km, losing 16 kilograms (2 to the 4th power, you know!) in 122 sessions. This happened over a period of 159 days (the sum of three consecutive prime numbers: 47 + 53 + 59). I’ll leave it to you to extrapolate all sorts of other useful and fruitful information from this raw data, and during this window of opportunity, I’ll commit myself to the desire of trying to reach 4444 km and to have fewer bugs in 2014.

## Happy new year and may the science of numbers be with you!

#### Notes :

1. To arrive at the memorable number of 2222 km, I painfully had to adjust my last session, at the risk of my tendons.
2. PTo count lines of code, I used the wonderful tool “SLOCCount” from David Wheeler.
3. I weighed myself with the “Withings Smart Body Analyzer 50“scale.
4. The icons contained in the illustration were created by Olivier Guin are licensed under “creative commons” for “The noun project”.
5. This post was initially posted in french on my profesionnal blog.
6. We have decided (with Richard my translator) exceptionnaly to keep the metric units : 2222km = 1380 miles, 16kg = 35,27 lbs