60,273 Lines And Counting
Apparently, Feeder 1.3.3 has 1,843 more lines of code than RapidWeaver – 60,273 in total. That doesn’t include any third-party frameworks or my own Reinvented.framework, which is generic between my applications (mostly handles software registration and some other stuff, maybe not all used). That framework contains 3,043 lines of code.
Who’d have thunk? OK, maybe nobody but me!
In reality, that sort of difference is negligible. Actually, in reality it’s a completely meaningless figure and subject to many variables, but it is good, clean, pointless fun to find out about this stuff.
For example, such a count could depend on how you do your brackets. I do them on one line unless it’s a method definition, a condition that spans two lines or I simply don’t feel like it:
if ([name length]) { return name; } else { return [[[self localFilename] lastPathComponent] stringByDeletingPathExtension]; }
But many people do them like this:
if ([name length]) { return name; } else { return [[[self localFilename] lastPathComponent] stringByDeletingPathExtension]; }
So that could add a few thousand lines to my count. 😉
Perhaps more telling is this: Feeder 1.0 was 24,679 lines. How it’s grown!
May 29th, 2006 at 5:10 am
I once told an interviewer that an app I wrote was 100,000 lines of code. He was duly impressed, even after my disclaimer that not only do I put brackets on their own line, I use brackets around one-line blocks. Also I have lots of comments.
Later when i got home I decided to double-check my number, and it turned out it was only about 20,000 lines. Oops! I could have sworn I’d run wc and it was like 100,000. I corrected myself the next time I saw the guy.
Just now, out of curiosity, I counted some punctuation characters in that code, to get a rough idea of numbers of Objective-C messages, blocks of code, and statements:
“[” — 4789
“{” — 2177
“;” — 4803
I think this gives me a better (rough) idea of the complexity of my code.
May 30th, 2006 at 6:55 pm
Well, let’s see:
“[” – 20268
“{” – 8367
“;” – 23947
Interesting!