perspective

When digging through code, working on some feature, I hit something that has to change. It is using mutable state, or violating an abstraction core to the system. I want to change it! But I must step back, remember my purpose. Keep in perspective what the code does, and what it must do. Ask, “is this a real problem or is it a conflict with what I prefer at the moment?”

In real life, we are tormented by conflicts between what exists in the world and what we want to be true. We want one deep, committed relationship but we have several friends. We want our children to go to sleep but their light is on and they are laughing. Ask, “is this a real problem or is it a conflict with what I prefer at the moment?”

Pick your battles, in code and in life. Is that violation of abstraction going to derail the development of the system? Can we live with a “TODO: refactor” above the mutable state? Can we find joy in our children and our friends? Realize that we don’t have a problem – just a difference. We can’t make all the code perfect, and we don’t control the people around us. Influence yes, control no. Ask the children to please go to sleep, and get back to that feature I wanted to implement.