Refactoring: VFP form calls external PRG, uses Publics for shared data

I’ve inherited another legacy VFP application and am updating a routine to use a new format required by my client’s customer. There is a VFP form that eventually calls a program to gather, format, and export relevant data. One of the first things I need to do is change the form and program so their code can be independently tested. Once that’s accomplished, I’ll change the routines to generate the new format.

The question is, as always with this common situation is whether to pull the code into a “blob” method in the form and change all variables to properties, or call the program from the form with parameters. I realized my usual inclination is to use the former because eventually I would be binding the form properties to properties on future business classes that I’d create down the road. It’s odd how I’ll suddenly think of a usual problem in a different light. This is a routine that’s run four times a year, the new format is needed soon, and the client wants to begin planning for a new application to replace this one. Visual FoxPro will probably not be the tool of choice, so there is no reason to build the Queen Mary when a dinghy will get us across the narrow inlet just fine.

Can you tell I’m prone to make everything into A Work Of Art? Maybe I’m changing after all.

Programmers aren’t the only ones who suck at user interfaces

I recently saw a notice posted in the front lobby at a client’s office. The notice gave directions to a room where a class was being held. I was struck by the relative complexity of the instructions and sympathized with an attendee trying to remember the details as they navigated the halls.

This example of a “user interface” illustrates a couple of interesting things:

  1. Too much information too early in a process can actually impede communication rather than facilitate it.
  2. It’s hard for any “expert” to think like someone who is inexperienced…not just programmers. So cut us a little slack! We’re only human.

I noticed this because it’s far more common, it seems, to post simple directional signs with the name of the class, for example, and an arrow pointing in the direction one should go, at the spot it’s necessary to know the fact. In other words, direct the person when they need to know.

This is of particular interest to me because I work on a web-based module that requires my client communicate a lot of very dense information to the target audience. The inclination is to put in more words rather than fewer. I sympathize because it’s an inclination I share, but I work overcoming it. Whether in personal relationships or program interfaces, I struggle to find a balance between words and silence. I suppose it’s a little like the spaces between musical notes. Thelonious Monk and Erik Satie are two composers who exemply the practice of making the silences between notes count as much as the notes themselves.

Hm. I think Thelonious Monk will be on the CD changer today.