Slide 49
Slide 49 text
Monday, April 8, 13
Because honestly, our code is a mess. /Your/ code is a mess. All code is prone to rot, decay, and entropy. A quick fix here, a cut-and-pasted line there.. it adds
up, invisibly, until your code is just a mudball you’re so used to seeing day in and day out, that you’re numb to the crap..
or maybe you /want/ to write good code, but don’t really follow all the little leaps someone makes in a blog post about refactoring, at least, not enough to really grok
it.
..or maybe you’re a lone developer who doesn’t have someone with more experience to pair with, to learn from.
Metrics can help. They can act as a rumble strip along the highway - a jolt to wake us up, a small, non-fatal reminder that you’re straying.
Ruby is blessed with a rich ecosystem of code metrics tools, and the tools I’ve talked about here are far from the only ones available. Get Code Climate working.
Toss Cane,or the new 3.0 release of metric_fu into your CI build. There’s no magic in to code metrics, and the tools are easy to get started with, so it's worth trying
them out and getting a feel for how they match up (or don't) with your sense of code quality. Use what works for you, and leave the rest behind. Discover
something about your code. Start some conversations about craftsmanship, examine your habits, improve your game.
..because in the end, that’s the point. there's a lot our code can tell us about the work that we are doing, if we decide we want to listen. What’s your code saying to
you?