Cornerstone 4.2 is now available! Dark mode, full macOS 10.15 support, in-app license key management, and more. Release notes.

Cornerstone 2 in Numbers

Filed under: Cornerstone — Simon @ 4:53 am

There are positives and negatives to developing a client for an established system like Subversion.

One of the negatives is that some people assume it doesn’t take much to develop a Subversion client and once in a while we receive mail suggesting that Cornerstone is expensive at $59.

After all, how difficult can it be? It’s just a Subversion client, right?

Anyone who has ever done serious UI development knows differently. Designing and implementing graphical user interfaces is challenging at the best of times but particularly so when you take a complex system like Subversion and try to make it accessible to both new users and Subversion veterans alike.

We recently took some time to reflect on Cornerstone 2 development, including how far we’ve come since both Cornerstone 1.5 in October 2009 and the initial release of Cornerstone 1.0 in July 2008. Part of this period of introspection involved gathering some data on the Cornerstone development process.

We think these numbers tell an interesting story. On the one hand they illustrate how demanding user interface development can be. But they also demonstrate just how much effort we invest into making Cornerstone as good as it can possibly be.

Build System

Cornerstone 2 is a 64-bit Cocoa application developed with Xcode. It is comprised of numerous bundles and frameworks, targeting a number of different CPU architectures and operating system versions.

Xcode Projects 19
Frameworks 15
Loadable Bundles 17
Helper Applications 1
CPU Architectures 3 (PPC, x86, x86_64)
Operating System Versions 2 (Mac OS X 10.5 & 10.6)
Build Time (Release Build) ~10 minutes

The above build time does not include the various versions of Subversion included with Cornerstone.

Source Code

Cornerstone is primarily written in Objective-C. It also contains a couple of C++ classes and a handful of C functions.

Here is a breakdown of the amount of code in Cornerstone:

Files 2,116
Lines of Code 181,000
Lines of Comments 91,000

These figures were generated using cloc. Third-party libraries and frameworks were not included. Unit tests were also not included.

Subversion by Comparison

We thought it would be interesting to compare these figures against Subversion itself. Subversion is written almost exclusively in C. The figures (excluding unit tests and language bindings) are:

Files 462
Lines of Code 180,000
Lines of Comments 65,000

These figures were taken from Subversion 1.6.12 and include the svn, svnadmin and svnsync command-line tools as well as the mod_dav_svn Apache module (but not the dependencies such as APR, Neon, Serf and SQLite etc.). SWIG language bindings (e.g. for Python) are also not included.

We thought these numbers are particularly interesting as they show that Cornerstone 2 contains roughly the same amount of code as Subversion itself.

Structural Details

We did some further analysis to determine how Cornerstone is structured. We knew that Cornerstone is a fairly large project, but the sheer number of structural elements (classes, methods etc.) surprised us nonetheless.

Objective-C Classes & Categories 1,037
Class Methods 1,261
Instance Methods 12,180
Average Methods per Class 12.9
Average Lines per Method 13.5

More than 1,000 classes with over 13,000 methods! That’s a lot of code!

Version Control Statistics

Here are some figures on the number of revisions committed to our development repository over various periods of the project.

Revisions Committed up to 1.0 3,358
Revisions Committed 1.0 – 1.1 1,406
Revisions Committed 1.1 – 1.5 2,265
Revisions Committed 1.5 – 2.0 2,189
Total Revisions Committed 9,218

Those 9,218 revisions were committed between February 2007 and October 2010. That makes an average of 48.5 revisions per week, or almost 10 revisions per weekday.

Summary

Cornerstone is a fairly large project. Not huge (we’ve worked on much bigger), but pretty substantial nonetheless.

We wanted to provide some numbers to quantify this and hope these figures provide some insight into the scale of development effort that goes into Cornerstone.