Hints and Musings


Storing a Graph In a Database

My thoughts on storing a graph in a database.

Vi or Emacs?

First of all, note that this is the correct question. If one happens to be enslaved on a corporate anti-production machine, then notepad will sometimes allow one to cope.

The answer, of course, is both. Each has its strengths and weaknesses. If you spend any significant time with real computers, both are worth learning. It's like being a biblical scholar and choosing between Aramaic and Koine Greek. You may be a fine scholar knowing only one, but you're limiting yourself.

Literate Editing with Outlines

Editing, or, more generally, represention of information for multiple purposes, has just acquired an important new tool: LEO. Leo combines two important facilities ("affordances", per the design community): first, the ability to represent a program to both a human and a machine; and second, to provide multiple views to the human.

The first facility has always been an object of high level languages, but Leo is not a language, but a means of presenting the structure of a text. Most high level languages have tried to provide some semblance of that facility, using some combination of include files, macros, functions, and classes, but there has always been a compromise in favor of the computability of the representation, due to the separation of the editor from the language. IDEs (Integrated Development Environments) try to bridge the gap, but remain closely tied to the structures provided by the underlying language. Leo is entirely about exposing arbitrary structure, and can work with nearly any ASCII represented language - including English or HTML, depending on the intended reader.

The second important facility or affordance is the ability to expose multiple, overlapping structures of the same material. Through the use of "cloned" nodes, one can make explicit the flow control structure in one view, data structure in another view, historical structure in another view, project management structure in another view, entity relationship structure in another view, and on and on, to any extent deemed useful by the author. One technique is, whenever fixing a bug or adding a feature, to create a new view containing only those nodes affected.

Software RAID

I've used software RAID under Solaris and Linux. Under Solaris, I've used DiskSuite and Veritas Volume Manager (both Veritas's version and Sun's OEM version, StorEdge). Under Linux I've used the md stuff that comes with RedHat 6.2.

Solaris DiskSuite is included with a Solaris Server license, so it's going to be cheaper than Veritas Volume Manager. It is also simple (which is not to imply trivial); it does not include:

By contrast, I find Veritas Volume Manager to be far, far, more complex, but if you need those thousands of slices ("subdisks" in their nomenclature, as if we needed a third name for them) per drive, they're your only ticket. Here's some notes from my Volume Manager adventures.

Ruby Programming

I've started learning the Ruby programming language. As an exercise, I reimplemented in Ruby the hangman7.cgi perl program from ``Writing Apache Modules with Perl and C''. I may post the rest of the code later, but one component that others may find generally useful is an extension of CGI::Session that keeps its data in PostgreSQL. See here for more.

Korn Shell pushd, popd

When I googled for a Korn shell pushd, the closest thing I found was an illicit copy (gone, but cached) of part of an O'Reilly book on shell programming. And that version did not support directory names containing spaces. Here's my implementation: first, stack operators, then popd and pd (pushd is too much to type :-). This code will NOT work with a Bourne shell (it needs functions, typeset, and arrays to function in the Korn shell manner); and it will not work with bash - but bash already has pushd and popd.

Triangle Peg Game

You've seen the puzzle consisting of a set of 14 pegs in 15 holes arranged as an equilateral triangle. You jump a peg over its neighbor, removing the peg over which you jumped. The object is to leave a single peg. Apparently, this puzzle has quite a long history.. The 15 peg variety was difficult enough to drive me to write a prolog program for assistance. Then my mother-in-law gave the family as 28 peg version! While the simple search of the prolog version worked fine for 15 holes, an expanded version was churning for more than two weeks without finding a solution. That version is here. Needing more speed and power, I came up with a version in C that used bit mask comparisons instead of prolog's unification to choose among the alternative. Even that was still churning for more that two hours before I gave up. Then I added memoization: set a bit for every position you've already encountered, and don't search through that path again. Now I had an answer. These programs can be used to solve smaller triangles by commenting out all the moves that wouldn't be available for the smaller triangle.

Web Publications

Here's a couple things that North Carolina Systems Administrators found useful enough to publish at their site:


If there is any theme running through my taste in poetry, it may be that most of it requires some effort to appreciate. My favorite poet is Amon Liner. Here's a sample, and here's another, in case you can't find him on Amazon. I like T.S. Eliot. I like the love poems of Robert Herrick. Italo Calvino's Invisible Cities, at least in the translation I have, seems closer to poetry than prose to me, and I love it.

Techncally Useful Web Sites

Stokely Consultings Serial Port Resources: Most of what you'll need to know about RS232
Linux news
Where to find software
Where to find books
Use.Perl.Org: Perl News
Ruby: I recommend this scripting language.

Humanly Useful Web Sites

QuasiTiler: Feed the Eye
The Hunger Site: Feed the Poor
Commonweal: Feed the Soul

About Me

I had been looking for work, but I've now found a great position with R.F. Micro Devices. Thanks to all who helped me find it!

I adore my family. I sing in the parish choir. Nearly all the rest of my time is spent playing with computers. Contact me at SSchaefer at ACM.org; replace the second at in this sentence with an at symbol(@).

A Mandelbrot interpretation Generated using my own code, witten in the Icon language.