So, ever wonder just how big your code base is? For some value of “how big” being how many lines, how many statements, how many characters, how many words, how many classes? How about “all of the above”? Why yes, here you go:
describing Xcode Statistician, part of the code and tools goodies collection to be found here.
And as a little exercise, let’s see what it gives us for the biggest project we’ve done recently:
First reaction being “What? 2,097,113 characters? Is that ALL? Seemed like a lot more at the time…” comprising 23,766 statements on 58,357 non-whitespace lines in 174 classes. Neat to know, certainly, even if using any of these as a direct evaluation metric is rather silly mind you. But we do like the idea from the source post of taking the word count and relating it to non-code writing. Using the Nebula Award standards:
< 7.5K words: short story
7.5K – 17.5K words: novelette
17.5K – 40K words: novella
40+K words: novel
Now, we can add some refinements to that from real world observation.
70K words: Smallest generally publishable adult novel, Western and romance lines stick at about this length.
80K – 110K words: Usual publishable range, particularly for new writers. (Although the first Harry Potter was not quite 77K, and that worked out all right.)
110+K words: Epic. Common in the fantasy space up to about 150K, otherwise only for Big Name Writers™ pretty much.
390+K words: Robert Jordan.
(If anyone knows a bigger novel than The Shadow Rising let us know, but we’re pretty darn sure it’s the biggest we’ve ever read.)
So Qmaster is about the equivalent of:
- Two and a half Harlequin Romances
- Two average-ish thriller/mystery novels
- Not quite half of The Fires of Heaven
Yeah, that sounds pretty much right. And rather more intuitively graspable than spewing a raw LOC number, indeed. I wonder if the author would open source this project? It would be rather amusing indeed to populate it with the word counts of popular novels so that you could express your output compared to the author of your choice, wethinks.