A good way around the confusion of optimizing is to use variable names and function names as well as liberal comments.
nMaxDurationforBakingLemonMaranguePie=20
IsMyPieReadyToPullFromTheOven(myPie,nMaxDurationforBakingLemonMaranguePie)
I have also noticed that when I've had time to optimize a project or my libraries that a "change" usually only requires I look at one procedure rather than several places in the project.
>>
>>It is interesting. It might be a good practice to optimize even for small tasks. It's an acquired methodology. It would be difficult to turn it on just for big projects if our practices did not have a foundation in the little tasks.
>
>The general problem I have with optimizing while writing code is that, in many cases, optimizing makes the code harder to read, debug, etc. If there is some practice that doesn't effect those two but makes things more optimal performance-wise, I'm all for it.
>
>Like in this case, I'm not going to suddenly give up using objects. I may be a bit more selective when I use them, though (ask myself, is this going to get called 5 billion times? Maybe I should make this a function instead).
Imagination is more important than knowledge