Saturday, March 3, 2012

Programmer's Pursuit - Initial Commit

Since my last post, I have been working on test-driven development and using Git as my version control system.  Test-driven development, as noted in that previous post, is working quite well; although it does have its problems, the benefits far outweigh the costs.  On the other hand, I have been less successful with Git.  In fairness, I can use Git to some extent, and at least in theory Git sounds better for a single-developer project such as this.  However, at the moment my limited knowledge of Git is roughly as useful as telling someone that the way to get to the University is to go three blocks down the road, then turn right, then turn left at the next two lights, then go onto the freeway, and then drive for a dozen or so miles until reaching the University exit: the instructions might help the listener in this specific instance, but as soon as said listener has to deviate from those directions he or she will have a much more difficult time completing the task.  (The difficulty has absolutely nothing to do with my poor sense of direction.)  I can use Git to complete simple tasks (most of the time), but anything more than pushing changes onto the Google project site is currently beyond my abilities.

The project site finally has some code on it.  Unfortunately, it also has a fair bit more than just the code and documentation; the various libraries, results from testing, and byte code are also on the site.  Since I do not know how to get Git to remove those files (and the end result of trying to get Git to do so was that my computer crashed), those files will have to stay there for now.  Since I wrote that I would use Git, I have every intention of continuing with it until I learn how to become competent in its use; if it begins to pose too many problems though, I may create a separate project site for me to communicate with through SVN.

There are now some Ant build files in the project (that are supposed to be there).  At the moment, these only perform very basic tasks such as compiling, running JUnit tests, and generating JavaDocs.  I will add in automated testing once I learn how to configure Checkstyle and PMD to my preferences; although the stylistic guidelines that I followed a few months ago are quite similar to my personal style, the few differences would undoubtedly produce a few hundred warnings that would make passing the verify test impossible. 

As for the project itself, the three basic classes (Item, Person, and Room) are completed.  I have also created the enumerated type Direction to specify the valid types of movement.  The next task for me to work on then is the parser and handling commands; after looking at the original code, I suspect that this should be a relatively simple task.  The parser can probably work as a static class since it does not particularly need specific instances.  At the same time, I will be considering how to extend these base classes. 

No comments:

Post a Comment