views:

72

answers:

3

Hi,

Our development shop is conducting a seminar in a local college to encourage clean code (the standards are from the eponymous book) and best practices. Now we need references for the time and effort saved. Has anybody read studies about it?

Thanks,

Jon

A: 

It's always difficult to estimate the time and effort saved (because, well, you haven't invested that time and these efforts) but I would always say that "best practices are 'best' for a reason: they save you time and efforts".

And yes, it's a very empirical definition.

Vladimir
I'm looking for a comparison between the time and stress of two teams.One team refactored their code.The other team did not refactor their code.
Jon
If you don't have evidence of what saves you time and effort, then you don't have best practices by your definition. If you read that something is considered a best practice, and think it must save time and effort, you aren't being empirical; instead, you're relying on authority. If you want to be empirical about something, you need hard evidence, which is what the original questioner is asking for.
David Thornley
A: 

Hi my opinion: Dont refactor working code when not needed. My best practice is to refactor code wich i have to change for an update or to fix a bug.

ArneRie
Your opinion is not a study. You didn't even try to pass off an anecdote as data!
Novelocrat
+2  A: 

A quick search turned up:

Questions about software engineering practices are, in general, very difficult to study objectively, because how often do you run the same project from the same requirements with the same tech tools and two teams of precisely identical knowledge and talent, but with different processes? Still, studies do get run, usually comparing large projects in similar fields, and using measures like defect rates and various code metrics as proxies for fuzzier things like "productivity".

There's more out there, but those should get you started.

Edit: I'd like to expand on a good point ArneRie made in another answer: Refactoring working code that you don't plan to change costs effort rather than saving it. A large part of the value of refactoring is that it lowers the cost of change (by encouraging modularity & single responsibilities, eliminating logic duplication, &c). It follows, though, that you lose this value if you have no intent to change the code. Refactoring efforts should be focused on code being modified.

bradheintz