Wednesday, March 11, 2009

Red, Green, Re-factor

I find my self getting more and more into the test driven development paradigm.  I am working on some fairly heavy OO code with a great requirement specification (it is actually and ISO standard).


The application is growing pretty much via the unit tests.  Write the test, then make sure the code fits.  It is amazing how many times I am not sure how a piece of code is going to work so I just put together the unit test to fit the standard and then code the class.  I can then re-factor as needed.



I am using the speech API’s to drive the interface so the speech api simply outputs a string of text that I can use to execute the program commands.  I wanted the program to be able to be both driven by speech commands and through the standard GUI approach.  Since I am working on a compiler, interpreter I have simply added the speech grammar as another grammar in the compiler.  .I will probably do the same to parse the command line options.


Makes for some interesting code :-).

No comments: