I’ve been hearing sincere complaints lately about object oriented programming, about the Craftsmanship Movement, about Agile development practices. I hear from folks who are excited about functional (denotative) programming, who write concise little functions with one character names. (Some have objections to TDD, or think pairing is costly, but those are on the edge of what I’m talking about). And I’ve been wanting to really listen.
And of course, I hear a lot from folks who love TDD, love Object Oriented structure, love pair programming and long method names. And those are the folks I hang with, for the most part. So I’m wanting to listen to all of it, and see what I hear.
Though I sometimes hear that Object Oriented is “just better” or that TDD is “always appropriate” — what I call Argument From Fist-on-Table — that idea doesn’t help me much. In listening, I’m looking for better at what? and appropriate to what end?
So for many months I’ve been wondering why I’ve been pretty content to love OO programming (though I can see the mathy beauty of FP*) and why I love the things that get called “clean code” (without loving the setting of it as a categorical imperative). Talking to @kaleidic this morning in the wee hours, I realized what it is that I love about them.
I love the whole shebang — “craftsmanship”, TDD, the Four Rules of Simple Design, long names, etc. — because I love collaboration. Not just because it’s juicy and fun, but because it supports the emergence of good systems, and things like flexibility, responsiveness, changability. I love having a shared code base, and object oriented “craftsmanship” is a strategy for getting that.
I also love evolution, and folks following the sparkly stuff, so when I see smart friends like @kaleidic and @conal and @tunixman railing against object oriented programming, for example, I’m excited about what they’ll come up with. But I realize that whatever techniques emerge, they won’t just have to be about faster or even more accurate code to make me love them. They’ll have to fit into the collaborative social structure that makes Agile so beautifully effective.
* Really itching to work on Conway’s Game of Life without state changes, in fact.
A question anyway
So I answered this question for myself, but I am still curious. What is important to you about your preferred style of coding? If you’re an Agile developer, why do you love long names and TDD and objects? If you’re a Functional / Denotative Programmer, what do you love most about your code? Can it be made collaborative in the way I’ve described?