The other day my supervisor asked me an interesting question. He wanted to know how much time we spent developing a new feature. The feature was massive and we started working on it late last year and is just now about to come out of beta. There were a bunch of issues trying to figure this out: nobody was dedicated full time to it, it’s been worked on in fits and starts during that time, and we don’t currently track our time at this level of detail. It became an interesting thought process.
Most of the time we worked on the feature in a big block of time so our thought was to use the commit times for the various logs to estimate when we started and stopped working on it each day. We knew that the majority of the code existed in three places application/views/scripts/feature/, application/controllers/FeatureController.php, and application/models/Feature. We ran the following three commands to generate a list of commits that touched those three places.
This gave us output that looked like the following.
The downside to this process of running the
git command three times is that some of the commits touched all three places so there was some duplication of each commit. To fix this we had to run it through the
uniq command to find just the unique values.
See how a3ad753 is no longer listed.
The next step was for us to import the data into Google Sheets so we could determine the time ranges. We could have used a database for this but we thought Sheets would be faster because we had to massage the data a little because it’s missing a lot of information.
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.