The kind of blog post that's mostly just an excuse to post one quote that lives in my head...
From The Reflective Practitioner, the architecture example thing. The studio master, Quist, says this at one point:
You should begin with a discipline, even if it is arbitrary, because the site is so screwy—you can always break it open later.
Also there's there's stuff about "back-talk" in the book. Like:
He shapes the situation, in accordance with his initial appreciation of it, the situation "talks back," and he responds to the situation’s back-talk.
Anyway I think of that "even if it's arbitrary" bit now and then. The recognition of that seems important to me. And I think it's sometimes missing in other conversations.
I think a lot of rules we come up with in programming are like fine for getting getting started, for getting into a situation and doing some stuff, for provoking feedback or "back-talk" or something from the thing.
Here's one. This formulation of it is from Implementation Patterns by Kent Beck:
A final principle is to put logic or data that changes at the same rate together and separate logic or data that changes at different rates. These rates of change are a form of temporal symmetry.
I use that sometimes. I might have an object with a bunch of instance variables and I might to some tidying by grouping the variables into smaller objects. Particularly like a group of stuff that is initialized on creation of the object and won't change later vs. stuff that changes over time. In my experience it can results in some improvements, and it might also suggest some non-improvements.
As a "starting rule" I like it. It makes me move some stuff around. Other and more important stuff tends to come up while I'm working with it. As an "ending rule" I don't think it's great. If I find some messy object, apply that rule, and then I'm done with it, then I dunno. Seems less likely to be worthwhile, or at least likely to be less worthwhile.
(A lot of "code smell" stuff is kind of like that I think. Can be good for "this might be something to look into." But not supposed to be rules that must be adhered to or like valuable in and of themselves.)