Architecture Kata “LOC Stat”
Develop a program to observe how the lines of code (LOC) in a directory tree change over time.
When run (e.g. during an automatic build) the total number of LOC is counted and stored together with previous results for the directory tree.
c:\> locstat.exe d:\myproject
This diagram will be saved in the cloud and a link to it will be sent to a list of email addresses and published via Twitter using the hashtag #locstat. The Twitter account and sender email address can be dedicated to the analyzed directory tree.
Each email address can have a condition associated with it when it should be notified, e.g.
The recipient then should only be informed if the current number of LOC exceeds the previous one by at least 10%.
Each email address can be listed several times each with another condition.
Placeholders in conditions may be: LOC (lines of code without comments or whitespace), Lines (raw number of lines), Delta (Lines – LOC).
Conditions are positive or negative absolute integer numbers or percentages, e.g. +10, -100, +10%, -50%.
Old charts and old measurements have an expiration date. The program will do a garbage collection upon each run.
“I am the founder of Majer Consulting and Majer Training and an experienced software developer, trainer and consultant. I have been on the road in the SAP world since 1998, supporting numerous projects, and have developed a passion for software engineering, software testing and agile development methods such as TDD. When I am not servicing customers or holding seminars, I am speaking at conferences or writing my next book.”