Tuesday, July 22, 2014

Straight Ahead Programming - When to do it

When to straight ahead program:
1. The task is very simple and you have a very clear vision of the final product.
2. The task is more complex, but you've done it before.
   You are re-writing it for practice, and in hopes of doing it better this time.

When to plan ahead:
1. The task is very complex and you are not sure what to do.

Sometimes it is impossible to work out everything on paper. The devil is in the details.
Sometimes... Writing straight-ahead the first time could be considered "planning" for the
2nd time you write the code. It really depends on how much time you have on your hands and
how important it is to get things perfect.

I tend to only plan when I am looking at the bigger picture of how everything fits together.

For example... While writing this I am contemplating a very important re-factor of my code.
Not sure exactly what needs to change. But I think I need a GlobalAppStateRegistry.as that will
keep track of the global state of the game from the time it opens.

Maybe I need to approach the problem with a better attitude...

Whatever refactored solution I come up with today will be much better than the current system in place.
Iteration approaches perfection, but never reaches it. And that is okay.

No comments:

Post a Comment