Skip to content

Instantly share code, notes, and snippets.

@dhh
Created May 9, 2012 08:57
Show Gist options
  • Save dhh/2643144 to your computer and use it in GitHub Desktop.
Save dhh/2643144 to your computer and use it in GitHub Desktop.
Coding stats from the new Basecamp
bcx david$ rake stats
+----------------------+-------+-------+---------+---------+-----+-------+
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers | 3704 | 2942 | 72 | 479 | 6 | 4 |
| Helpers | 1901 | 1529 | 13 | 261 | 20 | 3 |
| Models | 5310 | 4116 | 50 | 653 | 13 | 4 |
| Libraries | 2167 | 1593 | 51 | 200 | 3 | 5 |
| Integration tests | 297 | 217 | 6 | 1 | 0 | 215 |
| Functional tests | 3897 | 3065 | 61 | 11 | 0 | 276 |
| Unit tests | 9252 | 7273 | 127 | 39 | 0 | 184 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total | 26528 | 20735 | 380 | 1644 | 4 | 10 |
+----------------------+-------+-------+---------+---------+-----+-------+
Code LOC: 10180 Test LOC: 10555 Code to Test Ratio: 1:1.0
@haberbyte
Copy link

I really want to learn how they organize those 50 models. It would be awesome to just have a peek at the file/folder structure of bcx.

In a project of mine "rake stats" gives me just about 35 models and opening the models folder kind of frustrates me.
I'm trying to share code between them with concerns, but that doesn't cut down on the file count in the models folder.

Maybe just put models that share relationships in sub-folders and add those to the Rails autoload path?

@dhh:

May sound like a silly question, but what is the average file count per folder in the new basecamp?
I would also love to see a post on SvN or some suggestions on how you go about structuring a bigger app like that.

@mrhead
Copy link

mrhead commented Mar 28, 2014

@dhh can you post actual output from rake stats?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment