Wednesday, June 10, 2009

The Summer Project 2009, Part 6: Interface Beginnings and Project Analysis


One of the oddest things about programming is how much work it takes to make something actually visible. Above, you see the beginnings of EAR's primary interface, with the account entry and selection section at the top, the transaction entry section at the bottom, and a swath of nothing in the middle where the register should eventually be. That folks, results from three weeks of spare time programming, mainly because it's been quite a while since I last visited the Java User Interface libraries some four versions ago.

Functionally, adding and renaming accounts works, as does adding transactions to accounts. (Of course, you can't see the results of that last bit in the UI.) User interface code consists of creating the little fiddly bits that make up the visible part of the program, and telling them where to put themselves and how to behave. The hard part is making sure they do what the user expects, making sure the data they produce is valid, and generally making the UI connect to the underlying data model in a way that is robust. After all, you don't want someone to be able to enter an amount of Thursday in a transaction. (In the interest of full disclosure, at the moment, you can type an amount of Thursday in EAR, and it will cause any attempt to add the transaction to quietly fail.) Unfortunately, I can't really think of much generally interesting to write about the details of this work. Unless you want to discuss the different forms and functions of the Java widgets or how they are laid out or how to use a Java enumeration to populate a drop-down selection box, there isn't really much to say here. Fortunately, I have something else to write about.

Periodically during the development of a project, it's a good idea to take a step back, evaluate, and see if things are moving in the right direction. Here's what I've learned so far.
  1. Sun has done a magnificant job with the Java documentation. Between the API specs and the tutorials, it's extremely easy for someone with a minimal amount of experience with the language (e.g. me) to answer questions without resorting to Google. Kudos.
  2. Yes, I can still program at home, and it's still fun. What I can't do is string three or four hours together to do it. That has severe productivity consequences.
  3. Writing about programming takes longer than programming. (This one hopefully reflects more on my writing ability than my programming ability.)
I'll admit, the last two are more germane to the discussion, but I couldn't let the first one pass without mention. Good documentation is a rare and beautiful thing. Anyway, the EAR is making progress steadily, but slowly. I set out on this project primarily to discover something about myself, and I've learned what I needed to know. Along the way I've picked up some new Java tricks. For me, the project has already accomplised its mission. Don't worry though, I can't quit until we at least make an attempt at displaying transaction registers, saving, and loading. That empty grey expanse in the middle of the UI is just ugly.

PS: Extra points if you are paying close enough attention to notice what part of the data model I've left off the user interface.

No comments: