MOJ Digital is 3 years old this week and has already put millions of lines of code into the public domain.
We believe in sharing our work whenever we can, and that includes our code. Making this open source means we can give something back as well as building on the work of others.
After 3 years we now have 23,712,024 lines of code on GitHub, a code sharing service.
Each line of code represents a small step towards making the justice system better, in services like make a lasting power of attorney or book a prison visit.
Crunching the numbers
It was pretty easy to work out the figure on the lines of code using GitHub's statistics APIs.
For each repository, we can call the code frequency and participation endpoints, which give week-by-week breakdowns of additions, deletions, and commits to that repository. Once we have that, it's just a matter of adding it all up.
In the spirit of making things open (because it makes them better), I’ve published the code I wrote to do this.
Repositories
A repository, or 'repo', contains all of the files and documents for a project. It also contains the revision history for each file.
We have 566 repos, which contain code, documentation, and tests (and test data). These are all of our prototypes, live services, tools and websites. There are even a few things built by others which we've tweaked (or 'forked').
The repos also include all our configuration, but this is private and encrypted.
Commits
A commit, or 'revision', is an individual change to a file (or set of files).
In the last year, we made 24,435 commits.
With around 40 developers, that's a little over 2.5 commits per developer per working day last year.
It would be nice to see that number increase slightly, as it suggests our commits are a little larger than they should be, but it's still pretty good!
Lines of code
Since we started, we have:
- added 58,416,839 lines of code
- deleted 34,704,815 lines
This means we currently have 23,712,024 lines of code on GitHub.
Nearly 24 million seems like a lot, but this is everything we've built, plus a few things we've adapted.
To the next 3 years
We've done a lot in the 3 years since MOJ Digital started, but there's still lots more to do in digitising the justice system.
Here's to the next 3 years, and the next 24 million lines!
Don't miss out on future blog posts: sign up for email alerts.
2 comments
Comment by Tina Wheeler posted on
Excellent work, well done!!
Comment by Attia posted on
Well done MOJ. Keep up the good work.