Date Posted: 9th Jul 2010 at 8:18 PM
As I've been working on the Custom Launcher project, I've found that there are times when I make a rather subtle mistake in how I approach the design of some part of the program.
This mistake has to do with when I have to work with a file structure from the game.
Basically, in a nutshell, when I see a file structure on the disk I start writing code to store *all* of the fields in the file. For some things, this is the appropriate action, for others it leads to much over-complication and leads me down blind-alleys.
So, the correct thing to do in these cases is this;
Design the code structures to store only
what is actually used. Any index offsets, CRC values, magic numbers, etc. should be left out
of the main code and only regenerated or tested during import/export operations.
I'm only bringing this up because I've lost almost 2 days of work running down a blind alley and decided to share the learning experience.