views:

257

answers:

3

I'm giving a presentation on refactoring Python. I'd like to put in a couple of slides giving statistics to show that refactoring is a good thing. I've been searching the ACM digital library, but it's a bit like looking for a needle in a haystack. Does anyone know of any statistics on the subject of refactoring in regards to productivity or quality that would be good in a presentation?

+1  A: 

Here's a blog post from Martin Folwer that has several stat's on TDD (Test Driven Development). While not refactoring only, refactoring is a constant for TDD'ers and refactoring is nearly impossible without at least unit testing (not necessarily TDD style).

klabranche
+1  A: 

Effective refactoring is strongly linked to test-driven development, since the common consensus is that unit tests are necessary to demonstrate the refactoring is safe. This is advocated by Martin Fowler, for example. In that light, there is another SO question which lists papers quantifying the effectiveness of test-driven development which should be useful to you.

ire_and_curses
Technically, you don't need TDD, you need to have unit tests (or just tests) to be able to safely refactor.
Mathias
A: 

I actually emailed Martin Fowler about this, and here's the response I got back:

It's somewhere between difficult and impossible to get any hard data with software development techniques as we cannot measure output http://martinfowler.com/bliki/CannotMeasureProductivity.html

Jason Baker