BenPS comments on Open Thread: March 2010, part 2 - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (334)
Right on. Another way to put it: if you have to spend extra effort on maintainability, you've probably screwed up somewhere.
My name for this kind of behavior is "fetish". For example, some people have a Law of Demeter fetish. Some people have a short function fetish. And so on, all kinds of little cargo cults around.
Allow me to illustrate with another example. One of my recent projects is mostly composed of small functions, but there's this one function that is three screens long. What does it do? It draws a pie chart with legend. The only pie chart in the whole application. There's absolutely no use refactoring it because it's all unique code that doesn't repeat and isn't used anywhere else in the app. Pick the colors, draw the slices, draw the legend, stop. All very clear and straightforward, very easy to read and modify. A fetishist would probably throw a fit and start factoring it into small chunks, giving them descriptive names, maybe making it a "class" with some bullshit "parameters" that actually only ever take one value, etc, etc.
Object-oriented design is overrated. ;)