Saturday, March 26, 2005

Electron Model

ElectronModel is an idea I have for a small program I am thinking about writing.

Saturday, March 19, 2005

Cal

My current assignment is Cal. This is a program that will output a calendar using only formatted text. The user can ask for any year, and also request any square size. That is the months can be formatted to be a grid of 3x4, or 4x3, or 12x1, etc.

I am not allowed to use any array bigger than 12, so pretty much only for month names, and all work is to be done using loops. This will be an interesting project.

Colorize

I have been very busy with homework so I haven't even had time to write about it here. The first project for my Java class was Colorize. It involved reading a Java file and turning it into a colored, formatted html file using a finite state machine. It was due on Tuesday at midnight, and I started Sunday. I spent all afternoon, probably 1pm to 11pm working on it and editing and debugging it was very frustrating. On Monday I decided to rewrite the entire thing. I set up the ground structure Monday and wrote most of it Tuesday afternoon and evening. All programming should g that way. Stuff just worked! Because my design was better I was able to add functionality without messing up anything else and I was able to easily debug because I knew where the problem was. I worked right up until about 11:45pm, but I wasn't rushed.

I am not sure I like programming using finite state machines. It seems a step backwards from using methods and objects. I want to say "here is an algorithm I will run many times, I will put it in a method, but that is not how one uses finite state machines. On the other hand I think it would be very difficult to write this program without using finite state machines.