ToyBox

by Peter Wone - GUI Computing

What a tangled web we weave

This month's best toy is - you guessed it - the web. Distributed WinHelp, as I've always said. But WinHelp on steroids, and a damned site (pun) easier to work with. There are a few goodies missing, like metafiles and pop-up definition windows, but on the other hand HTML is just built to be extended.

You'll never guess what my HTML editor is! Talk about back-to-the-future, I've found that the best combo is MS Internet Explorer and Notepad. Yes, Notepad, although methinks this may be a perfect role for Ed for Windows. (Are you listening, Nev?)

I started with the free downloadable HTML extension for Word7, and it was a good launching point. I had absolutely no idea what I was doing, and the Word extension automatically puts in a bunch of necessary header stuff.

In fact I still use it to create document shells, just not as an editor. Why not as an editor? Two reasons. One, it's horribly slow - on a Pentium 100 with 32M of RAM it's slow - and two, it messes up when you get elaborate with formatting and pictures. It tries to embed the pics into the document, which is right for Word files and very wrong for HTML.

Creating web pages is fun and very addictive. Even more addictive than looking at them, if you ask me. It's also currently a very saleable skill, I hear. Certainly people are paying reasonable money for what I found to be very easy work. Like most craft skills, it's easy to do but hard to do well. Some have the knack, and some don't.

One of the best things about going from paper to the web is that I'm no longer constrained by paper costs and layout requirements. I can cross-reference the blazes out of my pages and I'm not space constrained. It's still not very interactive, but perl is next on my list of skills to acquire and then things should change.

Another totally excellent thing is that it's client-server. I mean, really client-server. There is no possibility of anything else. The client renders and the server serves, God's in his heaven and all's right with the world. I love it.


A cool book

Book of the month is the Jet Database Engine Programmer's Guide. And about time, too. This book should have been released two years ago. Never mind, it's here now. Comes with a CD with sample code and the entire text of the book à la MSDN, not to mention .h files for C++ programmers wanting to hit Jet.

Favourite among features described would have to be the following: Add the following key to the registry:

  \\HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Jet\3.0\Engines\Debug
Under this key add a string data type called JETSHOWPLAN (Make sure you use all capital letters). To set ShowPlan set the value of the new data type to ON. To turn it off, set the value to OFF.

Switching on JetShowPlan will cause query execution to append a query execution plan to the file SHOWPLAN.OUT, which is created if it doesn't already exist.

How's that for an undocumented feature? I liked it.

This book is essential resource material. No, GUI Computing doesn't sell it, although if lots of you try to order it that will probably change. Right now you can get it from Dymocks. If you aren't in Australia, it's a Microsoft Press book so you should be able to find it somewhere.


Interpreters and other stuff

I'm writing another form interpreter, this time in VB4. It's not hard, and it will be very useful. HTML is fun but has too many limitations, and I don't wish to die of old age waiting for Microsoft to release VB Script for Internet Explorer. I could tell you all about it but if you really care you might as well just read a textbook on the subject. There's nothing new about an interpreter.

More interesting is my extension of the Err object. I call it (surprise surprise) ErrEx and it is a superclass of Err.

It's designed to be used when constructing OLE servers. Typically these are a pig to debug because error messages don't supply any context (tell you where the fault occurred). Its principal virtue is that it maintains an error stack. This allows nested invocations of OLE servers to let an error ripple upward unhandled and yet preserve the invocation chain for the person debugging it.

There's no point in me waffling on at length about how to use it. Download this project and you'll have "dlgError.frm", "Error handler.Bas", "VariantStack.cls" and a test harness from which you can see how to use them.

Before you run this program, select "Break on unhandled exceptions" from the "Advanced" tab of the dialog obtained by selecting Options from the Tools menu.

When you run it, you will get an error. That's supposed to happen, remember we're testing an error handling mechanism.

The difference is that in the error dialog you can request more detail and see a list of referencing objects in the order in which exceptions were notified, and the names of the functions in which the error was notified. Try it.


Fridges, trees and why things might work now

Feel the pulse of the marketplace. Stand in a train station and look at the computer advertising posters from David Jones. Comment on one and listen to what people are saying. Talk about computers to people in office situations and consider their perceptions of our technologies.

There are two lessons here.

The world divides into two classes of user. One is a technophile and gets off on the regular supply of new toys. The other has a job to do and couldn't give a razoo about the technology.

Let's ignore the technophile; he'll buy into any new technology and put up with almost any amount of nonsense as long as the supply of toys is continuous and interesting.

The I-don't-care-I-have-work-to-do user is another matter. These people complain that computer equipment "doesn't do what it's supposed to" and that it gets in their way at work.

I have asked many of them "What is it supposed to do?" and they almost universally reply "Help me do my work more effectively." I press for more information "What do you do in the course of your work with which you think computers should help you?" and the again nearly universal response is "I don't know. I do a lot of things."

I have pointed out that they are behaving as though the computer industry should custom tailor everything to their particular needs, but the reaction is basically "then they [computers] are a waste of time."

The public seems to have two requirements of computers and software - that they be more general-purpose, and that they be more directed (specific-purpose). This is an impossible situation for developers. All things to all people. Ack!

Consider a fridge. It's a box. If it has shelves and it gets cold inside then you know it works. People know what they want from a fridge. If it has a freezer and it makes ice cubes and the shelves can be rearranged easily and pulled out for cleaning, then it's a winner. But software is different.

The web goes some way to addressing this situation. Despite its deficiencies, web servers and HTML constitute a universal, platform independent delivery system. All you need is a platform specific browser, which is easy to get and has little to configure and therefore little that can go wrong. Add java to this equation and we have a promising situation.

But there is still a problem. What is the purpose of all this stuff? Until we answer that question we can't deliver high-quality systems. How can you QA something unless you know what it's supposed to be or do? And don't kid yourself that quality is self-evident. A ming vase makes a lousy railway sleeper. And you will get any number of fools who will try to use it that way and then complain.

We have the beginnings of a software delivery system that can be all things to all people. I wouldn't have believed it, but there it is. What should we do with it? I don't know. If I had answers like that I would long since have been nailed to a tree. But I'll keep thinking about it, and who knows, maybe one day I will find an answer.


Written by: Peter Wone
Feb 1996



[HOME] [TABLE OF CONTENTS] [SEARCH]