Architecture Kata "LOC Stat"

Develop an application to monitor the development of the Lines of Code (LOC) in a directory tree.

When called [1] the application counts the LOC in a directory tree and saves the result together with previous results for the directory tree.

Call example:

c:\> locstat.exe d:\myproject
Files: 10
LOC: 1620
Lines: 1798

All the results collected so far are then processed into a line graph showing the development of the totalized LOC or file lengths, e.g.

Architecture Kata LOC Stat - Clean Code Developer Akademie

This graphic is stored in the cloud and a link to it is sent to a list of email addresses and tweeted with the hashtag #locstat.

The email distribution list and the sender account for the tweets can be configured for each monitored directory tree.

First edit the [Application Kata "LOC Count"] and use its application.

Variation #1

It should be possible to define a condition for each email address as to when notification of newly generated statistics should be sent. Example:

entwicklungsleiter@acme.com, LOC+10%

This means that the development manager only wants to be informed if the last measured LOC value 10% is higher than the last but one.

Each email address can be listed multiple times with different conditions.

The conditions should be able to refer to LOC, Lines (number of lines in file) and Delta (Lines - LOC).

Positive or negative absolute or percentage numbers are permitted as conditions (e.g. +10, -10%).

Variation #2

Old graphics and old results have an expiry date. locstat thus carries out a garbage collection with every call.

Resources

Endnotes

[1] The call can take place in an automated build script, for example.

en_USEnglish