Wednesday, May 10, 2006

Lines of code

I wanted to know if I have been productive, so I looked at the lines of code I've been writing for the monitoring system. Here it is:
339 Metrics.rb
62 ScMetrics.rb
42 sc_poller.rb
194 webmetrics.rb
637 total

The web site (using Camping) is still less than 200 lines. sc_poller.rb gets metrics from machines. Metrics.rb is a little large, but contains the code generation code and generous comments in case I get hit by a bus and someone needs to read Ruby for the first time. ScMetrics.rb is where I use the code generation and contains the graph definitions; it's the file that tells me how productive I am, since if I want to add a new kind of graph I should only have to add a new definition to this file. 62 lines isn't bad for 10 graph definitions.

0 Comments:

Post a Comment

<< Home