Writing a text editor that supports multiple fonts, sizes, styles, text alignments,
loading & saving, hyperlinks and undo
involves discipline and good object-oriented design skills.
I was at Gavel & Gown Software for about six and a half years. During that time I wrote most of the code in three Macintosh versions of G&G's legal productivity application, called Amicus Attorney. As time went on I moved from GUI work to the cross-platform database layer, but I'll always remember the fun times I had crafting visual widgets. Although G&G have ceased to carry the Mac version because the market is too small, the Windows version of Amicus Attorney V still incorporates a lot of my database interface code. Let's take a brief tour:
The program was is divided into modules representing a lawyer's legal files, contact rolodex, appointment book, to-do list, phone call history and billing system. Each module was designed to be reassuringly similar to its real-world analogue. This created lots of fun little graphical puzzles to solve.
Amicus Attorney was implemented on the Macintosh using the THINK Class Library. This was a good choice at the time as the only real competition in 1994 was MacApp; in later years PowerPlant would become increasingly popular but it wasn't yet available. In 1996 we started using CodeWarrior with a port of the TCL to that compiler and IDE, and I began writing helper applications using PowerPlant.
Many of Amicus Attorney's screens involve multiple layers of art and control widgets with complex interdependencies. Clicking on a checkbox or radio button would often make groups of other widgets show, hide or grey themselves out. Normally when using the TCL, redrawing four or five layers of art, views and widgets would cause unsightly flashing. I avoided this by drawing everything in off-screen views and copying. Each update started with the background art, as in the file list at left. Then a user-selected background texture would be copied into a region calculated for the image at program startup. Then the view and widget stack would be drawn back to front and the result would be blitted onto the screen.
The calendar was one of the more enjoyable views to program. As you can see in the combined schedule view, booking multiple appointments at the same time leads to an interesting graphical problem. Also, all of the calendar views support richly expressive drag and drop for appointments and To-Do items. I rolled my own drag and drop system, then later migrated it to the Drag Manager when that became available (System 7.5?) This experience allowed me to write a cross-platform (Windows / Linux / Mac) Drag & Drop facility when I moved to Hotline Communications.
A Rolodex of the lawyer's contacts and a phone call module to keep track of calls round out the list of major modules. Note that each module has two or three more views than are shown in these screen shots, so it required a fair amount of programming discipline to keep the code organized. This is where I became enthusiastic about design patterns.
Lawyers are like any other profession that bills for time, although they bill more than most, and bill more creatively. Each of the main modules had methods for creating time sheets, and a substantial part of the program's functionality was billing-related. The 'phone and billing modules were written by another programmer, Thomas White.
I'm an avid woodworker. I've designed and built a number of furniture pieces, some of
which are shown here.
My woodworking projects are often experiments in proportion,
in which I look for ways to make esthetically pleasing shapes useful.
I've also built a couple of conical drum bodies,
deriving the angles myself.
I took a fourth year robotics course at Queen's, which covered
coordinate transformations as matrix multiplications.
Recently I've played around with Java Swing, written a little social networking visualization prototype, and done some exploratory work for a Mac OS X application to be called "Shiny Button". Have you ever wanted a fast way to produce the art for new widgets to work within your Aqua applications? Shiny button will automate the process of creating polygonal objects with rounded corners and transparency. Colours vary smoothly from one vertex to the next. Note: this is an experiment in pixel-by-pixel graphics manipulation under OS X.