Many of Kubernetes’ 2k+ TODO Comments seem to be Forgotten

Photo by Yancy Min on Unsplash

Totals (for 9bf52c2)

  • 2,380 TODOs across 1,230 files from 363 distinct authors
  • 460 TODOs with an assignee e.g. // TODO (patrickdevivo) Fix the ...
  • 489 TODOs were added in 2019 so far
  • 860 days (or 2.3 years) is the average age of a TODO
  • The oldest TODO is from Jun 6, 2014 (from “First commit”)
  • The most recent TODO is from Dec 9, 2019
  • This file has the most TODOs at 33
  • deads2k has added the most (current) TODOs (git blame) at 147
  • This commit added the most TODOs (that are still in the source) at 64


Files with the Most TODOs
Top TODO Count by Author
Commits Adding the Most TODOs
TODO Count by Year Added

Conclusions and Questions

These results are from a fairly off-the-cuff look at what TODO comments in the Kubernetes source code look like. We get a sense of the top TODO creators, which tracks more or less with the top contributors to the project.

  • What’s the rate at which TODOs are closed over time?
  • What’s the average lifetime of a TODO comment?
  • How do popular codebases compare to one another?

Does it Matter?

TODO comments typically cover the type of work that might be too small for a ticket, but important enough to note and describe in a code comment (though plenty of TODOs will reference issues/tickets). Since they are part of the code, they are often “closer” to the work that needs to get done. They are easy to add, but, it seems, just as easy to lose (there are 1.8k+ TODOs added prior to 2019 still in the Kubernetes’ source).



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store