Zac muses, semi-frequently and with zest.

Chuck Moore is the creator of the Forth programming language and a brilliant engineer. The creation of Forth is unlike many of the older languages in that it was created by an engineering need, not an academic need (i.e. Smalltalk or Lisp).

I’ve been relearning Forth lately, trying to get a stronger footing in the language and trying to pick up some of the principles so that I can apply them elsewhere in my work at MSFT. I was reading through Leo Brodie’s Thinking Forth and stumbled on this little pearl of a quote from Chuck Moore:

Sometimes the possibilities for simplification aren’t immediately obvious.

There’s this problem of zooming in a digitized graphics display, such as CAD systems. You have a picture on the screen and you want to zoom in on a portion to see the details.

I used to implement it so that you move the cursor to the position of interest, then press a button, and it zooms until you have a window of the desired size. That was the way I’ve always done it. Until I realized that that was stupid. I never needed to zoom with such fine resolution.

So instead of moving the cursor a pixel at a time, I jump the cursor by units of, say, ten. And instead of increasing the size of box, I jump the size of the box. You don’t have a choice of sizes. You zoom by a factor of four. The in-between sizes are not interesting. You can do it as many times as you like.

By quantizing things fairly brutally, you make it easier to work with, more responsive, and simpler.

 

§33 · June 30, 2011 · programming · · [Print]

Leave a Reply

You must be logged in to post a comment.