Mimsy Were the Borogoves

Mimsy Were the Technocrats: As long as we keep talking about it, it’s technology.

42 Astoundingly Useful Scripts and Automations for the Macintosh

Work faster and more reliably. Use Perl, Python, AppleScript, Swift, and Automator to automate the drudgery of computer use. Add actions to the services menu and the menu bar, and create drag-and-drop apps.

Use simple scripts and make your Macintosh play music, roll dice, and talk to you. Create ASCII art from your photos. There’s a script for all of that in my new book, 42 Astoundingly Useful Scripts and Automations for the Macintosh.

The Picture of HTML (1993)

Jerry Stratton, October 24, 2009

Read that title as if Al Stewart were singing it. I’ve just brought the Oscar Wilde section of FireBlade Fiction over to the new hotness (Django/XHTML). Probably the oldest pages on that section of the site were for The Picture of Dorian Gray. I took it from an unattributed site, probably gopher or ftp, and converted it to HTML so that it would be easier to read.

Because it was so old, it was surprisingly simple to convert. It had none of that weirdness I’d do later, such as flipping between using <p> to mark the beginning of a paragraph and the ending of a paragraph; these were all the beginning, and they were all on their own line. All I really had to do was ignore them—take them out completely and use the resulting double-carriage-return to mark paragraph boundaries. The only really weird tags were ones I’d probably added in later for navigation. Since the new navigation is generated from Django, I just had the script strip those out.

Browsing the old pages to verify the visual appearance of the new pages was “fun”, in that quotation-mark way of saying “I can’t believe I did that.” As simple as it was—paragraphs, emphasis1, blockquotes, and pre—it still rendered completely the opposite of how I had originally intended—and how it originally rendered—fifteen years ago.

  1. In order to make poetry break and indent, I was using <pre> tags inside of <blockquote> tags. While I prefer lists today, that’s not an unreasonable way of doing it. Its main drawback is that it turns the poetry’s text into monospaced uggh. For some reason, my modern browser was ignoring the line breaks within the <pre>. All lines of poetry were on one indented line—and because they were in a <pre> tag, they weren’t even wrapping.
  2. There was one <kbd> tag. I was using it to mark a newspaper’s paragraph heading. Why did I think paragraph headings were appropriately described as being from the keyboard? I have no idea. I remember I used to use <kbd> as a generic “monospaced font” character-level tag, but that doesn’t seem relevant here. The rest of the newspaper article was a standard paragraph.
  3. The preface, Oscar Wilde’s Lovecraftian philosophy of Art, was supposed to be customly-indented. Instead, every line was flush left. I had used the <dl> tag as an indentation tool. No paragraphs. No <dt> or <dd>. Just a bunch of lines and heavily nested <dl>s. Apparently modern browsers are confused by definition lists that have neither definitions nor terms. Who knew?

Well, that’s what happens when you design without reference to standards. I fixed the poetry and the paragraph heading by hand; there weren’t enough of them to make it worth automating a fix. Everything else got sucked in by Mr. Hoover from Planet Python.

This brings me another step closer to having the entire HTML section of the site stored in a database and output as valid XHTML. While I’m not exactly looking forward to converting from XHTML 1.0 to something else, I do expect it to be a lot easier than converting this less-than-beautiful HTML soup into XHTML.

Or, The Importance of Being Valid

  1. At some point I must have gone back and replaced all italics with emphasis. Because at some point, that was The Right Thing To Do.

  1. <- The presumption of ignorance
  2. Location-sensitive ads? ->