How much do you code? I only code 2 days a week on average ;-/
100% of the code counted is in PHP, which I think may be more compact than some other languages.
I wanted to find out how much I code, so I created a script which checks out all the code I've started
and created by myself (stuff no one else helped with). Then I looked at the commit logs for each project
and recorded which days I actually made a commit (e.g. coded). Here are my stats. It's too little per
day, huh?
Still, I'm only coding about 2 days a week where I work, the rest of the time, I spend goofing off. My
boss tells me to keep up the good work, and the scrum master says I keep up with the rest of the team,
so I'm assuming it's a silent conspiracy where we all slack.
Days with 1 or more commit logs: Aug 1st, 2nd, 6th, 7th, 14th, 24th, 25th, 27th, and the 31st (I only
coded 10 days out of the last 30).
It turns out, I only coded 7,639 lines of code this month in 10 days of coding. Discounting comments
(I document a LOT of the code in order to train the junior devs), that's just 4,496 lines, or 450 lines
a day.
I figure that in a year, at 2 days of productivity a week, that'd be 50,400 lines of active code a year.
If I could bump it up to 4 days a week, that'd be over 100,000 lines of code, which I suppose is normal,
right?
Start: 2012-08-01
End: 2012-09-01
Here are the complete stats:
2012-08-01 2012-09-01 [+7639 lines]
Directories: 92 108 [+17.4%]
Files: 242 310 [+28.1%]
Lines of Code (LOC): 19393 27032 [+39.4%]
Cyclomatic Complexity / Lines of Code: 0.15 0.11 [-26.8%]
Comment Lines of Code (CLOC): 4355 7498 [+72.2%]
Non-Comment Lines of Code (NCLOC): 15038 19534 [+29.9%]
Namespaces: 1 0 [-100%]
Interfaces: 18 25 [+38.9%]
Classes: 209 227 [+8.6%]
Abstract: 9 (4.31%) 9 (3.96%) [-]
Concrete: 200 (95.69%) 218 (96.04%) [+9.0%]
Average Class Length (NCLOC): 46 58 [+26.1%]
Methods: 782 769 [-1.7%]
Scope:
Non-Static: 726 (92.84%) 712 (92.59%) [-1.9%]
Static: 56 (7.16%) 57 (7.41%) [+1.8%]
Visibility:
Public: 560 (71.61%) 519 (67.49%) [-7.3%]
Non-Public: 222 (28.39%) 250 (32.51%) [+12.6%]
Average Method Length (NCLOC): 12 16 [+33.3%]
Cyclomatic Complexity / Number of Methods: 2.13 2.88 [+35.2%]
Anonymous Functions: 1 1 [-]
Functions: 81 119 [+46.9%]
Constants: 201 237 [+17.9%]
Global constants: 50 58 [+16.0%]
Class constants: 121 136 [+12.4%]