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 »