Wednesday, February 18, 2009

"Do I Care" and "It Depends"

Between my time talking to Agile Joe when my bank hired him and Jimmy Bogard in the last Virtual meeting, I now have two new guiding principles to most development tasks.

Do I Care?

  • Should you unit test this code? Do I care about that code? Do I care if I change things later and this is not tested?
  • Should I write this Documentation? Do I care about the docs and what they say? Do I care if I can't remember what I did?
  • Should I delete this code? Do I care about it anymore? Does it do anything for me now?
  • Should I follow SOLID principles here? Is the work needed worth it for the payoff?
All of these questions may or may not be yes or no to "Do I Care?". So how do you know if you care or not..this dovetails nicely with "It Depends".

Like it or not one of our primary jobs is too manage tradeoffs. In one case we hamstring ourselves with too much work for little benefit in another we do not do nearly enough "housekeeping work" to make our code manageable.

Full on SOLID on an application you're building for a day and then going to throw away? I'd hope you say "No I Don't Care About SOLID where it causes me more work", an app that will take 2 months to build...if you don't care, make sure it's only the first couple of days and not when it's too late.

Bob Martin focuses on the "last responsible moment" i really always liked that and all but I feel like "Do I Care" maybe appeals in a more plain spoken way. I only follow "good patterns and design" when I start caring, otherwise I fall into the trap of forgetting why i do these things in the first place.

No comments: