Stackoverflow is the first time I've seen this badges concept. It's oddly motivating, and that's pretty cool. Has anybody seen it applied to source control change sets?
I envision a data mining system that monitors a source repo and maybe a continuous integration system and flags significant deltas in various code centric metrics. The flags ultimately manifest as badges assigned to committers.
Here's a few badge ideas off the top of my head:
- The Hatchet Man - for largest reduction in overall LOC
- Detangler - for reducing cyclomatic complexity by N points (probably applied to class or method level)
- Obfuscator - for increasing cyclomatic complexity
- Judas Priest - for checking in code that violates the chosen FxCop rules (Breaking the law! Breaking the law! - get it?)
- Owner - for having the most LOC attributed to you (via blame)
- Risky Business Badge - for a check in that results in lower test coverage
- Fixer - for a check in resulting in a previously failing test passing
- Wrangler - for bringing previously untested code under test
It seems a great deal of my career has been spent on old hoary codebases in need of some heavy duty refactoring. Along with those codebases are the programmers stuck maintaining them, who more often than not don't understand the consequences of unnecessary complexity, or if they do, they don't know what to do about it. This is a way to help them educate themselves, and kind of fun too.