26/10/2009

Organizing the style, boring...

Hello everyone,

Today felt the urge to just re-read the whole code I've written so far and... I have to say I'm impressed with the amount of work I've pulled out and I still have to do, it's really huge. Some parts of codes to me seemed obscure and not really clear, even though I was the one that wrote them... and that is understandable since I had not touched them for a couple of months, especially the ones around the TileEngine (which, as I said, I took from Nick and slightly modified).

That is the main reason why I realized I do have to keep my code clean and well commented, to save troubles later on, when I have to come back to what I've already written and change/polish/optimize it, it really bothers me when something is unclear and entangled, spaghetti code is a bad thing and generally leads to bug and glitches, which I'd rather not have in the final product.

Exploiting the awesome feature of Visual Studio 2008, I've just started adding comments and a small documentation on my code, for every line of code, member, method, class, whatever... It is a very boring task but, in the end, it is very rewarding because the end-product seems really professional and it is easier to be modified and re-used for later projects as well... and who knows, I may also leak it around the intertubes for people to use it on their own projects... as long as it appears good, working and clean enough.

So far I'm not even at a quarter of the way done, so I'll keep on going and commenting everything I have to, while sipping a nice cup of fruity tea and watching my awesome Opeth DVD on the Xbox360 in the background. It's very mellow and relaxing, the perfect mood to get a nice job done.

Everything will probably be done tonight or tomorrow night at most, then I'm back to coding... That battle engine won't get completed on its own (yet... hehe)!

Cheers! ~Morgy

No comments:

Post a Comment