If you're going to be in the Chicago area on or about Saturday, September 20th, you can see me give my "Using Metrics to take a Hard Look at Your Code" talk at the Windy City Rails Conference. David Heinemeier Hansson, David Chelimsky, and Noel Rappin have been announced as speakers and I'll be joining them for a interesting day of Rails related goodness.
Here's the abstract:
It's an interesting fact of human nature that you can't do something every day and not secretly suspect that you're good at it. Which goes a long way toward explaining why everyone thinks they write fine code. To combat this self-delusion you can use metrics to take a hard look at your application. This talk will discuss the ways in which you can measure how good your Rails project really is. And how to fix the bad parts.
Using a daily metrics build (run every day by CruiseControl.rb) you can compile a 'hit-list' of the worst methods in your application. Then your team can spend some time every iteration trying to refactor these methods.
In my talk I will discuss 4 tools to identify problems:
* Code coverage with Rcov
* Cyclomatic complexity with Saikuro
* Flogging with Flog
* Using source control to figure which files change the most
All of which are pretty easy to use, especially if you use metric_fu -- a Rails plugin (blatant plug). Once you've figure out where the badness is, you must fight it. While showing examples, I'll be discussing:
* Why 90% (or even 100%) test coverage isn't a silver bullet against bugs.
* How Saikuro and Flog measure complexity and the advantages of each.
* When complexity is OK
* Why 'inject' sucks, except when it's pretty cool (see above point).
* Strategies for figuring out if your fancy metaprogramming is worth the extra complexity and what to do if it isn't.
* What is good enough coverage.
* Failing your build on poor metrics numbers.
* Why you should always remember Carlin's law:
"Have you ever noticed that anybody driving slower than you is an idiot,
and anyone going faster than you is a maniac?"
Subscribe to:
Post Comments (Atom)
About Me
Obtiva (current job)
ThoughtWorks (old job)
Object Mentor (apprentice)
Apprenticeship at Object Mentor Blog
ThoughtWorks (old job)
Object Mentor (apprentice)
Apprenticeship at Object Mentor Blog
Blog Archive
- August 2009 (21)
- July 2009 (22)
- June 2009 (19)
- May 2009 (12)
- April 2009 (12)
- March 2009 (4)
- January 2009 (1)
- December 2008 (1)
- November 2008 (12)
- October 2008 (2)
- September 2008 (10)
- August 2008 (5)
- June 2008 (3)
- May 2008 (3)
- April 2008 (2)
- March 2008 (3)
- February 2008 (2)
- January 2008 (5)
- November 2007 (1)
- October 2007 (1)
- September 2007 (1)
- August 2007 (6)
- July 2007 (3)
- June 2007 (4)
- May 2007 (5)
- April 2007 (4)
- March 2007 (10)
- February 2007 (13)
- January 2007 (7)
Categories-
- Code (61)
- Apprenticeship (57)
- Rails (48)
- commentary (48)
- Ruby (27)
- RSpec (20)
- Metrics (17)
- metric_fu (13)
- Flog (9)
- complexity (9)
- RailsConf2009 (8)
- RubyConf2008 (7)
- test_coverage (7)
- Bugs (6)
- Mocking (6)
- craftsman_swap (6)
- git (6)
- not_code (6)
- Agile2009 (5)
- Amazon (5)
- refactoring (5)
- testing (5)
- ActiveRecord (4)
- Linux (4)
- LoneStarRubyConf2008 (4)
- Saikuro (4)
- churn (4)
- design (4)
- Fixtures (3)
- JRuby (3)
- LoneStarRubyConf2009 (3)
- Math (3)
- RailsConf2007 (3)
- Rake (3)
- Rcov (3)
- Svn (3)
- XP (3)
- legacy_code (3)
- Flay (2)
- GLSEC (2)
- Mingle (2)
- Obtiva (2)
- SQuiD (2)
- TextMate (2)
- Windows (2)
- WindyCityRails (2)
- javascript (2)
- lean (2)
- DUST (1)
- EVDO (1)
- IO (1)
- MacRuby (1)
- OSX (1)
- Routes (1)
- RubyWorks (1)
- Tomcat (1)
- attachment_fu (1)
- cache-fu (1)
- citcon (1)
- craftsmanship (1)
- iPhone (1)
- mac (1)
- memcached (1)
- ord_sessions (1)
- pairing (1)
- restful_authentication (1)


0 comments:
Post a Comment