There are at least 38 different kinds of windows in Tinderbox. I know this, because there are exactly 38 classes that compute a WindowTitle. (Some windows, of course, have no title, or don't need to computer a title). Indulge me while I adduce some consequences:
- Because it's obvious that each HypertextView needs a title, this was one of the oldest parts of the Tinderbox code. Walking down memory lane is sometimes pleasant, but this youthful indiscretion summons up no bittersweet smiles.
- The old method was named MakeWindowTitle. In prose, a bad choice like this would have been caught by my editor, or it would by now be way back in the rear view mirror. In code, we've had to repeat the same awkward construction in more and more places
- Because this is an old corner of Tinderbox, the calling convention was designed to reduce memory allocation which I then thought would be expensive. Wrong: it's not expensive anymore. Wrong twice: the design doesn't actually reduce memory allocation. It did make the code look clumsy, though.
- Ripping out the old code and replacing it took all 112 minutes of Wonder Boys, which is a very fine film indeed.
- I think there's a business case for cleaning up the annoying code smell surrounding this. But I'm not at all sure. I can rationalize it, of course. I'm the boss, it's the end of a long day, it's 1 AM, and why not fix up the clutter. But it's like office furniture: you may suspect good furniture helps people work better, but it's hard to prove it.
Incidentally, the development peekhole is back.