Starwood Footprint

September 19th, 2008

受到Andy的鼓励,也来贴footprint

Revision: 4203
+----------------------+-------+-------+---------+---------+-----+-------+
| Name                 | Lines |   LOC | Classes | Methods | M/C | LOC/M |
+----------------------+-------+-------+---------+---------+-----+-------+
| Controllers          |  1922 |  1600 |      35 |     232 |   6 |     4 |
| Helpers              |  1451 |  1210 |       8 |     206 |  25 |     3 |
| Models               |  4337 |  3555 |      63 |     567 |   9 |     4 |
| Libraries            |  2786 |  2317 |      37 |     233 |   6 |     7 |
| Model specs          |  6689 |  5536 |       1 |       3 |   3 |  1843 |
| Controller specs     |  5216 |  4355 |       0 |       7 |   0 |   620 |
| Helper specs         |   939 |   765 |       0 |       1 |   0 |   763 |
| Library specs        |  2744 |  2262 |       1 |       7 |   7 |   321 |
+----------------------+-------+-------+---------+---------+-----+-------+
| Total                | 26084 | 21600 |     145 |    1256 |   8 |    15 |
+----------------------+-------+-------+---------+---------+-----+-------+
  Code LOC: 8682     Test LOC: 12918     Code to Test Ratio: 1:1.5

正如Andy说的,4月到9月,trunk上共计约2400次commit。按照平均4个pair来算,每个pair每天提交6次。

除去统计失准的rspec部分,功能代码共计8682行,1238个方法,平均每个方法7行。测试代码是功能代码的1.5倍。

考虑到 Ruby on Rails 作为特别擅长开发web应用的框架所具备的强大表现力,以及对重复代码的低容忍,再加上stats所统计的只是Ruby代码(不包括HTML、JavaScript等代码),我毫不怀疑这个系统的复杂度能够等量于很多十万行代码级别的系统。

而重要的是,这个团队里的每个developer了解系统的每个角落──至少是能够在相当短的时间内通过阅读功能代码和测试来了解。每天6次的提交频率就是明证。

所以,作为总结,是一个值得骄傲的项目。

blog comments powered by Disqus