Wednesday, March 5, 2008

Grader: KISS (Keep It Simple Stupid)

When my brother first asked me to write this program, he mentioned that someone had suggested to him he could solve his problem using Microsoft Access. I haven't used Access much before, but looked into it as a starting point. Creating the data tables was not a problem, but when I started looking at creating entry forms that spanned multiple tables, I decided it would probably just be easier for me to write an application from scratch.

At this point, I figured my next decision should be to decide which database to code against. I was picturing the ability to query on players, plays, years...quite a grand scheme. Taking a step back, I realized that my brother had asked for none of this functionality. All he wanted was a way to input grades for a single game and a summary report so he could evaluate each player's performance over the entire game. From this point on, I decided I was going to create the simplest program possible, focusing more on providing a solid user experience, and adding functionality only when it was requested. This decision resulted in the following decisions:

No Database
All of the data entered by the user is stored in memory and is lost once a game is completed (unless you count the report summary html file). This decision saved me quite a bit of time, and the more I thought about it, saving the data to such a history wouldn't provide much value at the high school level. Why would a coach care to save data for a player that is going to graduate in a year or two anyway?

At startup, the user must select two files that they previously created (or use the default files created by my brother), which contain the data needed for grading. The first file is just a text file that contains the list of players begin graded. The other file is a comma-delimited file that contains the grading scores, grading categories and descriptions of each score for each category. For example, a simple file might contain the following:
Score,Catch,Yards After Catch
1,Circus Catch,Ran for Touchdown
0,Catch,No Yards
-1,Drop,Lost Yardage
HTML Summary Reports
I was originally going to provide the summary reports in a dialog window once a game was completed. I was also intending to provide the capability to print that report. Having written some printing code before, I knew this would turn out to be complicated. I was pretty happy with myself when I thought of the idea just to generate an html report file. Not only could the user just print the file from his web-browser, but the html format allows the user to put reports out on a web server where other coaches can view the data.

The next two missing features are things I think I will eventually implement, even if my brother does not request them, as they would be generally useful.

No Backspace
At this point, the user cannot go back to a previous play after it has been submitted. This probably isn't a big deal as it shouldn't be too hard to enter the data error-free. But it might be nice to have that capability if a play is accidentally submitted before all the data has been entered.

All or Nothing
Grader currently doesn't support any concept of saving off partial results. So the user must enter a complete game at one sitting. I think it would be pretty useful to allow the user to enter complete game data over a series of application sessions. Of course, the usefulness would depend on how long it takes to enter an average game, information I will have to get from my brother. If it only takes 5-10 minutes, then maybe this isn't a worthwhile function to implement.

I saved myself a lot of time and was able to deliver the product much faster than if I had decided to move forward on implementing any of the above features. Instead, I was able to spend more time on solving the little problems faced when trying to make a GUI look just the way you want, which is the topic I will discuss in my next post.

No comments: