Skip to main content

This blog post was published under the 2015-2024 Conservative Administration

https://mojdigital.blog.gov.uk/2015/10/16/moj-digitals-third-birthday-3-years-and-24-million-lines-of-code/

MOJ Digital's third birthday: 3 years and 24 million lines of code

Posted by: , Posted on: - Categories: Development

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.

MOJ Digital birthday cake
MOJ Digital birthday cake

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.

MOJ Digital repositories on GitHub
MOJ Digital repositories on GitHub

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.

Sharing and comments

Share this page

2 comments

  1. Comment by Tina Wheeler posted on

    Excellent work, well done!!

    Reply
  2. Comment by Attia posted on

    Well done MOJ. Keep up the good work.

    Reply

Leave a comment

We only ask for your email address so we know you're a real person

By submitting a comment you understand it may be published on this public website. Please read our privacy notice to see how the GOV.UK blogging platform handles your information.