Naming Things Well is Much Harder Than Just Adding One More Comment

When I was taking programming classes in college, comments were all the rage. Most of the solutions I handed in had one function (or very few), with comments above the class, above each function, within each function. Everywhere. Instructors wanted lots of comments. In retrospect, I’m not sure why. Maybe so that if the code was off, they could still give partial credit, like asking students in a math class to “show their work”? Since then, there’s been a corner of the developer world that prefers well-named functions to comments. In fact, they’d argue that well-named functions »

A (somewhat brief) intro to Code Katas, TDD and Red-Green-Refactor

Every few months, a nearby user group does a code kata du jour. Everyone pairs up, and uses common practices like TDD and red-green-refactor. A couple weeks ago, I was partnered with someone who hadn’t done this before, so I had the opportunity to talk him through it. Assuming you’re in the same boat (maybe you’re going to a user group where you’ll be doing a kata for the first time), you might be wondering what to expect when you get there. Let’s define some terms first So what exactly is unit testing, TDD, red-green-whatever, »