by Leon Rosenshein

Better Code

Ran into a really interesting video the other day by Woody Zuill (of Mob Programming) and Llewellyn Falco. Lots of good things to learn there. I’ll leave it to you to watch for yourself. It’s the meta point that I find really interesting.

The meta point is that you don’t need to understand code to refactor it, and that by refactoring you gain understanding. Then, with understanding, it’s easier, and overall faster, to do the thing you want to do.

I comes down to what Martin Fowler said many years ago:

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

We’ve all been there. We run into code, often code we wrote ourselves, that for any number of good reasons, like lack of understanding, shifting requirements, or tight deadlines, that isn’t as understandable in retrospect as we thought it was when it was written. That’s when you’ve got a choice.

You can beat the code into submission or you can use all of the tools at your disposal to make the code understandable and then make the change. It might make things take a little longer, but probably not. It will make it easier to move forward next time. Because that’s what we’re really trying to do. Reach the finish line sooner, not go as fast as possible right now.

As we head into the holiday weekend, I’m thankful for all of you who put in that little bit of extra effort in the past or will do it in the future to help us get to the finish line (and make my life easier) that much sooner.

Happy Turkey Day and see you all in 2.5 weeks.