You expend extra energy now, to potentially save energy in the future.
in reply to Re^9: Finding repeat sequences.
in thread Finding repeat sequences.
Not really. It was vastly easier for me to code—and then improve—the regex-based approach than it was to even understand the index()-based one. In fact, in this instance, both solutions I submitted had worked perfectly first time. It doesn't get much lower-energy than that.
And, for me, that's the entire point of developing good coding practices and habits: once you have them, they require far less work initially, and (if you choose them carefully) they also lead to far less work in the long term.
No matter how you dress that equation in "experience", there is no way to make doing something now that you didn't need to do; in order to potentially save some immeasurable amount of effort that you might need to expend in the future; balance.
I'm sure you wouldn't write that unless you truly believed it. But, if you truly believe it, then there really isn't anything more to discuss. I cannot recall reading a statement about code development and maintenance that accords less well with virtually every experience I have had myself. Nor one with which I would more fundamentally disagree.
Doing something now that you didn't need to do; in order to potentially save an immeasurable amount of effort in the future...that, in my view, is the very essence of good software engineering.