I think you'll have to find your balance between ease of reading and saving resources, and stick to it while writing your whole project. Sometimes, saving 8 bytes of ram, or getting away with 2 less lines of code is not worth the effort if it will make my code less readable, so I'll go for the simpler way. For example, I might have done that on a Commodore where ram is precious:

Code:
//Switch two variables
a+=b;
b=a-b;
a-=b;



But with a Pentium Duo with 4 gigs of ram, i'd use a third variable, thank you very much...

Code:
//Switch two variables
c=a;
a=b;
b=c;



Sometimes, it may be hard to resist using all these new sophisticated algorithms you've learned, making your code as tight as possible, but sometimes you'll also have to consider other people reviewing your code, or even yourself in 5 years. In big companies, your code will go through at least 1 or 2 more pair of eyes that their job is to 'clean up' your code and nothing angers them more than trying to decipher recursion functions when a single loop would have sufficed. Imo, I don't blame them..

Ps: I'm not referring to anyone in particular, just tossing my two cents..


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!