While looking at some code in the Linux Kernel this morning I spotted a few FIXME comments and that got me wondering just how many there are in the source code. After a quick grep I found nearly 4200 in v4.4.0-rc8 and that got me thinking about other similar comment tags such as TODO that are in the source and how this has been changing over time.
So the trends are certainly upwards, but then again, so is the size of the kernel source:
Note: Data gathered using sloccount on the lines of C in the kernel source.
Using the sloccount data I then calculated the number of FIXME and TODOs per 1000 lines of code to see what the underlying trend is:
So FIXMEs are actually dropping in relative terms to the size of the kernel where as TODOs are increasing.
Of course, these statistics are bogus because it is dependent on kernel developers adding and removing FIXMEs and TODOs in a consistent manner, however, it is interesting to see how many comments exist and hence how much work has been tagged in comments as work to be done later. I wonder how this compares to other large open source projects.
QEMU (current head of tree); LOC: 981525, FIXME: 460, TODO: 1003
ReplyDelete(LOC from sloccount total SLOC, fixme/todo from ag | wc -l)
I'm not a git expert, so it may not be doable, but it sounds like it is: why not graphing instead how many of the fixme's and todo's get actually fixed and done in each release? I believe git should be able to help, having the commits. Maybe something based on greping the logs?
ReplyDeleteI will leave that as an exercise to the reader ;-)
DeletePycrastinate (https://github.com/isaacbernat/pycrastinate) greps through the source code (and git blame) to create such reports (on TODOs/FIXMEs and other regexps). It can easily group by metadata (path, author, etc.) filter by age range (checking git commit times), etc. and generate HTML or ascii reports. You may want to check it out.
DeletePycrastinate (https://github.com/isaacbernat/pycrastinate) greps through the source code (and git blame) to create such reports (on TODOs/FIXMEs and other regexps). It can easily group by metadata (path, author, etc.) filter by age range (checking git commit times), etc. and generate HTML or ascii reports. You may want to check it out.
DeleteA sample report: http://pastebin.com/BGmUkhxR
very nice, i am forked the source code from github and search what is says the developers in this comments xD
ReplyDeleteOne way to get a handle on them and organize them into issues would be to use imdone-atom and imdone-atom-github. I built both these packages expressly for this purpose.
ReplyDeleteWhat happened between 4.0-4.3 to receive so huge increase in TODOs?
ReplyDeleteI have no clue what I am talking about, but maybe it is Skylake and its graphics.
Delete