You underestimate the stupidity of people like myself.IQ wrote:In this case I tend to agree with bob and I don't quite buy the "easier to read and reason about the code" part. In this case this would be a completely modular piece of code with minimal impact on other parts. With a well placed comment it should not confuse anybody, not even amateurs.
It's not mainly about confusion, but about noise. Even if the code for managing a PV array is easy to understand, it still takes up space in my editor window or my source code printouts. With a well placed comment, it takes up even more space. Reducing the amount of large scale program logic I can see without scrolling increases the mental effort of understanding the code.
As I said, it's a tradeoff. I agree that there is benefits and a cost, but to me, the cost marginally outweighs the benefits in this case. I've very rarely found the PV useful for debugging except in the very early phases of development (when I did) use a PV array), and as a user, the last few moves of the PV are rubbish anyway, regardless of how it is built. The initial portion of the PV, which is the interesting part, will almost always be identical.Especially as the benefits for debugging totally outweigh the cost. This in itself is a huge "simplification", just of another kind. And it also enhances readability of the programs output - another form of readability and enhanced functionality for analysis.