July 25, 2007

Back from Vacation!

Well, I’m back from vacation. Time to get grinding again!

I experienced a minor setback while working on DN, admittedly my own fault. In anticipation of getting a functional alpha prototype working, I committed the single worst mistake a programmer can make - no design document. While the design document itself can be anywhere from hastily scrabble notes to entire bibles, the need for one is paramount. I rushed into the client code and began hacking left and right. The client kinda works right now, and while I could spend time to fix it, I shouldn’t. It is ugly, unwieldy, unreliable and will not scale well.

Two steps forward, one step back.

I’m working on a set of specifications and then will begin rewriting the client code, fixing problems along the way. Among the new “features” will be a unified file format. The current client saves states, genotypes, phenotypes and metadata. All in different files. Some files are plain text, other binary. To run a trial requires a complex dance of opening, editing and saving multiple files. Should the computer crash at any unexpected point, the state files would be out of date and phenotypes incomplete. This system is unwieldy and just plain bad programming design. The first step is to unify the data into a single file. Frankly, this will be a pain in the ass to program but will save me much hassle down the road and should prove to be much more robust.

The other big problem revolves around brain.dll. The neural network code was not originally written to function as an independent DLL. It too requires a complex dance to get working correctly, passing in various parameters and states about the environment. And all must be done in a specific order or else a catastrophic crash occurs which the client can’t recover from. I’m going to be moving the neural code back into the client while at the same time cleaning up pre-requisites for successful simulation. If I eventually decide to move the code back out to a DLL (which I will most likely be doing in the somewhat-near future) it should prove much easier.

Leave a Reply