Saturday, October 28, 2006

 

I can do it in my sleep


Over the last couple of weeks I've been wrestling with some thorny design issues the etc3 project has opened up. In particular, I've been trying to complete the design for a text-generation program ignorant of the grammar it is using. This in service of several different design goals, such as the system's having the ability to shift among different grammars and lexical distributions. To get this to work I would need a way to create the grammars, a way to persist them so that they could be split and spliced, a way to realize surface without any terminal being aware of the grammar in which it was embedded but at the same time responsive to a composition plan, and then to be able to attend to details that require constituents to know a little something about each other (e.g.: agreement).

Experience told me that I would only have one chance to screw this up--a mistake anywhere would cascade into mistakes everywhere. So I did a little prototyping, figured out an Xml schema for defining TAG trees (actually, this part was kind of easy), and drew page after page after page of UML class collaboration diagrams. Then one day early this week, I worked on the problem too late into the night and slipped into bed without taking a little down time. And of course I dreamed I was working on the problem.

(This isn't the first time I've dreamed of the work of computer programming. Any programmer who's worked on a difficult problem has had this experience. Once I even dreamed I was a DATA statement in a BASIC program that looped infinitely through its DATA statements. Every time I was read in the dream, I woke up, only to go back to sleep and continue the dream.)

When I awakened this time, I just figured I'd been working too hard and needed a rest. But then I started to think about what I'd dreamed. Hmmm... That works. So does that. Yeah, that's the answer to the agreement problem. Turns out I'd solved the entire design problem, except for one issue that was actually a result of my ignorance about a particular Java feature.

Now if I can just figure out a way to code while sleeping...

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?