My public writing. You can reach me at @eitland@mstdn.io

States of the mind – the same thing can be stressful or relaxing based on the situation

Filed under #observations and #softwaredevelopment

Drew DeVault writes :

Been working through some spaghetti code tonight. Has been helpful to remember not to despair over how tangled the code is. Just treat it like you'd untangle a bundle of wires, slowly and deliberately solve small problems until the big problem is better. My code is in much better shape two hours later 😃

I once found a small fishing longline, approx 180m I'd guess. I guess it was probably last used by my late grandfather or some of my uncles before they moved out. It obviously hadn't been used in a few years and it was really tangled. Think of a really tangled wire, then add about 100 wires (snoods) to that, each with a hook on the end.

Untangling such a thing can be really frustrating. Or it can be relaxing. It all depends on the state of mind you are in when you do it which – in many cases – depends on the reasons you have for doing it.

I find the same holds true for code. I can enjoy untangling code when I have time for it and when there is a good reason for it.