You are viewing the archives for the category Tech.


Frontpage | February 6, 2004

MS Frontpage banner ad.

Microsoft ad, originally here, via Dave Shea. Psst: look at line 28.

Posted 5:22 PM
Link :: Comments (4)

Wildcard | January 23, 2004

What do poverty, bland, mono, outsourcing, plagiarism, XML, apathy and Buddhism have in common?

Google searching with wildcards is the new black.

Posted 2:38 PM
Link ::

Atom for MT in Four Easy Steps | December 22, 2003

  1. Download Movable Type 2.65, released this morning. It has two security fixes, so you’ll want to upgrade even if you’re not going to create an Atom feed.
  2. Make a new Index Template. Output file: index.atom. Code:
    <?xml version="1.0" encoding="<$MTPublishCharset$>"?>
    <feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
      <title><$MTBlogName remove_html="1" encode_xml="1"$></title>
      <link rel="alternate" type="text/html" href="<$MTBlogURL encode_xml="1"$>" />
      <modified><MTEntries lastn="1"><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></MTEntries></modified>
      <id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTDate format="%Y"$>:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$></id>
      <generator url="http://www.movabletype.org/" version="<$MTVersion$>">Movable Type</generator>
      <copyright><$MTBlogCCLicenseURL encode_xml="1"$></copyright>
    <MTEntries lastn="15">
      <entry>
        <title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
        <link rel="alternate" type="text/html" href="<$MTEntryPermalink encode_xml="1"$>" />
        <modified><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></modified>
        <issued><$MTEntryDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$></issued>
        <id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTEntryDate format="%Y">:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$>.<$MTEntryID$></id>
        <created><$MTEntryDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></created>
        <summary type="text/plain"><$MTEntryExcerpt remove_html="1" encode_xml="1"$></summary>
        <author>
         <name><$MTEntryAuthor encode_xml="1"$></name>
        </author>
        <MTIfNonEmpty tag="MTEntryCategory"><dc:subject><$MTEntryCategory encode_xml="1"$></dc:subject></MTIfNonEmpty>
        <content type="text/html" mode="escaped" xml:lang="en" xml:base="<$MTBlogURL encode_xml="1"$>">
         <$MTEntryBody encode_xml="1"$>
         <$MTEntryMore encode_xml="1"$>
        </content>
      </entry>
    </MTEntries>
    </feed>
    This is the same as the Atom 0.3 template provided by Movable Type, except I removed the optional Author Email element to protect against harvesting and changed the Copyright element to reflect my Creative Commons license. You could just use the original.
  3. Add the following line to your .htaccess file to give your feed the correct MIME type:
    AddType application/atom+xml .atom
    If you don’t have a .htaccess file, create one (it’s just a text file with a funny name) and upload it to the root of your public web directory. Host doesn’t support/allow .htaccess? Get a better host.
  4. Link to your Atom feed from the <head> of your pages:
    <link rel="alternate" type="application/atom+xml" title="Atom" href="<MTBlogURL>index.atom" />

End result: Valid Atom

Sources and further reading: Joe Gregorio, Mark Pilgrim, Atom Wiki, The Feed Validator.

Atom feeds with other tools: more than a million at Livejournal, Atom for Bloxsom, Atom support in Drupal, Atom in Textpattern, Atom feeds built in to TypePad, more by the hour.

Posted 11:02 AM
Link :: Comments (5)

Missed | December 15, 2003

Lately my obsession has been this place called missed connections. It’s a part of craigslist. Craigslist, if you’re not familiar with it, is a website, started (not surprisingly) by a guy named Craig, for people to find each other, whatever that means. Buyers finding sellers, employers finding employees, givers-away finding pickers-up. Whatever.

But then there is missed connections. In a way it’s the same, but sadder. The typical post is only two or three sentences, but each is a story, in the way that personals and yearbook notes and messages left in dryers are stories:

“Your smile was amazing. I couldn’t stop checking you out while I was in there on Sunday. What a way to brighten my day. Thanks!”

So-called confessional writing has long been popular—writing about this or that illicit encounter, whispering in the reader’s ear. People go for it, it’s exciting. These are like little anti-confessionals, broadcasting that one good thing that happened to you, hoping beyond hope that your message will be heard.

“To the nice blond guy who told me my tire was going flat — thank you!!! I made it to the gas station in time and they filled it up with air for me, there doesn’t seem to be anything wrong with it, just a slow leak of some sort. Thanks for chasing after me to tell me!”

“You are beautiful. I apologise for staring at you but you are very pretty. You smiled at me. Write back if you get this message.”

Can it happen? Will “six degrees of separation” come through for these people?

“The 70 bus to Cambridge around 8:15am - I ride the bus every morning between 8 and 8:30, but have never seen you - I’d certainly have remembered. Somewhere between the river and Central Square you sneezed. I blessed you (haha), but wished I’d have said more. Drop me a line if you happen to read this.”

“June/July 2001—I first saw your intense blue eyes in the bagel shop (w/ the steam coming out the top?) near the Park station. We got on the same car, you got off at Central & we walked to Harvard.”

“You were working in Martha’s Vineyard as a stonemason, had traveled to India teaching English, and planned to go to Marlboro for journalism. You brought your skateboard but I didn’t let you go until you were to have dinner with your dad. You are the most attractive man I have ever met; I learned how my heart could turn somersaults looking into your eyes. I was interning outside of Boston that summer, blonde hair, I got your number, we talked once, but then my phone was stolen.”

This big tangle we call the Web, it may yet be good for something. Let’s hope it can fix some missed connections.

Posted 8:12 PM
Link ::

Installing IE5 for Design Testing | November 6, 2003

Joe Maddalone discovered this method of getting multiple versions of IE installed under Windows XP. Matt Haughey and Dave Shea also picked up on it; diligent web designers all over rejoice.

My contribution is for the lazy web developers: instead of downloading the 90 megabyte IE5.5 installer, extracting 10 of the .CABs, and then deleting unnecessary files, just grab this one ZIP (offsite link, 3.25MB).

If you want to mirror the file somewhere, feel free; leave a comment and I’ll link to you.

Update: Someone else had the same idea, and we’ve got another mirror available.

Posted 3:34 PM
Link :: Comments (1)

Uncle Sam | July 4, 2003

I’m writing this entry at my uncle Sam’s house. (You might think that this is somehow related to the present holiday, but it’s not—that’s just his name. Really. Anyway you could have figured that out from the capitalization, ‘uncle Sam’ and not ‘Uncle Sam’.) I’ve just showed him my website, starting with the photos section (he wanted to see Rebecca), and a couple other weblog-type sites.

I always find it fascinating to see people’s reactions when they find out that I keep a “journal” online. I know that there are hundreds of thousands of them, but I forget that they are still quite obscure to most people.

More ruminations later—it’s time to go amuse his 3 adorable little boys.

Posted 6:42 PM
Link ::

MS-DOS Returned? | May 14, 2003

The pop-up ads seem to be getting more and more ridiculous these days:

Ad made to look like a DOS command prompt.

It’s a change from the AMAZING X-CAM, anyway.

Posted 6:51 PM
Link ::

Test | May 9, 2003

Notice anything strange? Then you might be using Internet Explorer for Windows.

Posted 2:38 PM
Link :: Comments (2)

Greptastic | April 18, 2003

This builds on Dean Allen’s tutorial, “Finding needles in a text haystack with Regular Expressions”. I call it “Finding needles in a text haystack, melting them down into little motes and ingots, and reshaping them into something useful with Grep”.

Let’s imagine you’ve somehow gotten yourself the project of converting an existing site to Movable Type. The site contains some 208 entries, in about a dozen categories. What you have is the HTML files, authored in—horror of horrors—that heinous blight on sensible web design everywhere, Microsoft FrontPage. What you need is perfectly formed, whitespace-sensitive metadata, according to the Movable Type import format.

Is this an elaborate hypothetical situation or what?

Grep works by recognizing patterns. Suppose you notice that in the garble of nested tables and meaningless divisions, the real content always comes right after the code <td class="bord" width="74%" height="76%" valign="top">. You can use Grep to delete everything from the beginning of the document (<html>) to that point, inclusive. Hit F3 or Control+F in your Grep-enlightened text editor (EditPad, Microsoft Word, BBEdit), turn on Regular Expressions, and search for:

<html>.*?<td class="bord" width="74%" height="76%" valign="top">

Explanation:

  1. <html> is what you want the selection to begin with. The first thing in the pattern.
  2. A period in Grep syntax means “any character”. Anything at all, as long as it’s after <html>.
  3. The * means “repeat the previous item zero or more times”. Since the previous item is a period, it means any number of any characters. So .* is essentially a variable-length wildcard.
  4. The ? disables the “greed” of the * operator. Basically, it tells it only to go to the shortest possible selection instead of the longest.
  5. The last part is what we want to be the end of the selection. Grep will select everything (.*) up until the first instance of this ending code. If the ? operator were not present, it would select everything up until the last instance.

There also might be a lot of garbage at the end of the file, so you could remove that using a similiar expression:

</td>.*?</html>

Now we’re getting somewhere! FrontPage still frustrates our efforts, though—it has a habit of putting meaningless spaces in front of every line. The Movable Type importing mechanism won’t tolerate extra spaces, so we need to delete them. A sample substitution would be to search and replace:

^ *(.*?)
[line break]

With:

\1
[line break]

Huh?

  1. A carat is the Grep symbol for the concept “Beginning of line”. We’re looking at a selection that starts with the beginning of a line.
  2. Next is a space followed by an asterisk. Remember that an asterisk means “repeated any number of times”—so, the beginning of a line, and then any number of spaces.
  3. Parenthesis create a backreference; something we want to be kept in memory and recalled later. Inside the parenthesis is another variable-length wildcard, .*?.
  4. The selection ends with a line break; only selecting one line at a time, going from the beginning (^) to the end.
  5. In the replacement string, we use a backslash and the number 1 to indicate that we want the contents of the first backreference (though this time there was only one). So the backreferenced part of the line—that is, everything except the leading spaces—is put right back. FrontPage, we laugh at thee.

Now we’ve winnowed out all the kruft; what’s left is just rearranging things. Dean’s tutorial covers that quite adequately, so I will end here and wish you all happy hunting.

Posted 5:17 PM
Link ::

The Saga Continues | March 1, 2003

Tried to install Direct X 9 today (so I could play the Freelancer demo — giddy with excitement still), and again had that old problem with Microsoft releases somehow not being Microsoft certified.

This time I’ll grudgingly give them a half ounce of credit, as the fix was available on their website, and it only took me an hour to find.

Posted 12:00 PM
Link :: Comments (1)

Syndirella | January 19, 2003

I am now using the amazing Syndirella to sit in my tray and automatically check all of the blogs in my Recommended section, and alert me when a new post is made.

I tell it a main site URL. If an RSS feed is present, it uses RSS autodiscovery to find it. If not, it configures a “screen scrape”, and makes a feed out of the page HTML (which hopefully is semi-consistent about which tags it uses for titles and which for other content). The result: I no longer have read any sites in my browser.

Oh, did I mention it’s all free and open-source?

Coming soon: an RSS feed of the comments on my site, so I can check for those automagically without having to actually visit the page and look.

Posted 12:00 PM
Link :: Comments (1)

Electronic Kindness | January 11, 2003

Jeremy Hedley writes on electronic kindness:

It suddenly occured to me that this sort of electronic inventory tracking could spell death to a certain sort of human kindness, where the clerk, recognising me as a regular and big-spending customer, decides to waive the late fees just this once for whatever reason (to put us both in a good mood and keep me coming back for more, say). I’d latched onto the idea of electronic systems making certain forms of human behaviour impossible and was thinking of how so many of our inventions seem to make us smaller, seem to limit us rather than augment our behaviour. I’d hand over my late tapes, the clerk would wave the scanner, and we would both play the roles that some programmer somewhere had scripted for us under the direction of the video chain’s accountants.

Posted 12:00 PM
Link :: Comments (1)

Semantics | December 28, 2002

The place is all abuzz this week about semantic markup in plain old HTML, and the benefits and practical applications thereof. Mark Pilgrim makes Daypop yet again with a totally cool trick using the cite tag, and then follows it up (semantically!) with the ins tag. Tantek Celik gives some tips on using the class attribute to give meaning as well as structure. With so much semantic potential in regular HTML, Aaron Swartz knows that XML is bad at everything.

On the other side, we have this kuro5hin writer arguing that a semantic web is just a pipe dream, and the semantic tags in (X)HTML are too arbitrary and limited to merit anything useful. Personally, I’m with the anti-XML folks, and strongly on the side of clever HTML tricks.

Posted 10:37 PM
Link ::

Fuckheads II | November 3, 2002

This deserves a more articulate rant, because it’s still frustrating to me.

Who exactly had the idea that it would smart to require that all software installed must pass some entirely arbitrary test? I mean, even if it worked properly - instead of, say, preventing you from upgrading Internet Explorer 6 - even if it worked like it was supposed to, is that the kind of thing that’s going to benefit consumers?

  1. Can the monopolism get any more obvious? If MS can arbitrarily decide which programs pass XP Logo Testing and which don’t, what’s to stop them from making it impossible to install, say, Word Perfect or Mozilla?
  2. Even if we want to stretch our imaginations and pretend that their intentions are perfectly benevolent, it’s a perfectly useless technique. If they could somehow include an exhausive list of allowed software at release time, there’s still the issue of XP coping with future releases - and right now, it doesn’t cope at all. It rejects updates coming from Microsoft itself. Are the developers honestly so shortsighted that they didn’t realize their technique would only work until the next security patch?

Posted 10:29 AM
Link :: Comments (4)

Warning: This Entry Contains Vulgarity | October 29, 2002

Internet Explorer 6 Service Pack 1: This software has not passed Windows Logo Testing and cannot be installed.

Internet Explorer 6 Service Pack 1 has not passed Microsoft Windows Logo Testing and cannot be installed.

Real slick, you stupid fuckheads.

Posted 6:36 PM
Link :: Comments (2)

My world just got bigger. | October 22, 2002

Holy shit. And it didn’t cost me a dime. (Who says working for a struggling dotcom startup is such a bad thing?)

Posted 3:46 PM
Link ::

Three | September 21, 2002

One June, my dad supplied me with a sleek-looking HP Kayak, excess from his office, which no one else could get to work. I was not so much thrilled by the challenge itself as I was deperate for a faster machine - the Gateway had reached the point where even Powerpoint seemed to crawl, and reformatting was out of the question with 5 users in the house and no means of mass storage for backing up.

I spent virtually the entire summer fixing up the Kayak; finally, sometime around August, I succeeded in getting Windows 98 to boot properly. (I could see why they had given up in the office). It was gorgeously fast - 266Mhz, with 96 entire megabytes of RAM. As my reward, I got to bring the computer out of the basement and into my bedroom. There, it served me well for a number of years.

I can’t even remember all the games I played during that time. For starters, looking at the old boxes in my basement: Heroes of Might and Magic II, Unreal Tournament, Commandos, StarCraft, SimCity2000, The Incredible Machine, Dungeon Keeper 1 and 2, Red Alert, Civilization II.

Somewhat later, we were finally enlightened by broadband. (Wow! What have I been doing all my life without this?) A friend pointed me in the direction of Asheron’s Call (beta at the time), which would become a major vice for almost 3 years. I got Napster, and downloaded my first MP3s (today, the number is somewhat embarassing).

Posted 10:16 AM
Link :: Comments (1)

Two | September 17, 2002

A few months after Windows 95 came out, my father decided we needed to upgrade, which also required a new computer. Somehow - I don’t know how - he decided on a Gateway 2000, and a couple months later, it finally arrived, a Pentium 120mhz with a whopping 2GB hard drive and Win95 preinstalled.

It was around this time that I had my first access to the Internet. We had Prodigy, on a limited number of hours per month. I explored, as a third grader is prone to do, and found a sort of riddle-based game called Labyrinth. There was a witch with a cauldron, some trolls, and that is about all I can remember. One month, I managed to run the Prodigy bill up to $200 or so playing this game; my father came and had a talk with me. (I don’t remember him being angry, so much as somewhat stern; he was probably amused.) After that, we switched to AOL, on an unlimited hours plan. (AOL2.5, if I remember correctly.)

Early graphical adventure games were the first games to catch my eye during the Gateway era. A classmate of mine and I beat Myst all by ourselves, then moved on to Return to Zork, The Manhole, and Treasure Quest. Later came sims; first SimAnt (the ancient DOS version), and then the original SimCity. (SimFarm was given as a gift, but I never got interested in it.) Towards the end, I started playing more action-filled games: Quake 1, Command and Conquer, Red Alert.

Posted 4:24 PM
Link :: Comments (2)

One | September 15, 2002

The first computer I used regularly was a Zeos 386. Before that, there was an AT&T (at the time, they had not yet figured out that PCs weren’t telephones), but I was too young for it. The Zeos’ primary OS was MS-DOS - I don’t know which version - and you could also get to Windows 3.11 by typing ‘win’.

My dad was a member of a club of sorts, where every month a 5.25” diskette would come with samplings of various shareware games. Most of these were knockoffs of arcade games - I remember a Tetris clone called “D-BLOCKS”, and a port of Pac-Man, among others. My dad would copy his favorites of the games from the diskettes to our massive several-megabyte hard drive, and I’d play them or fool around rearranging the icons in Win3.11’s Program Manager.

The first “real” game I played on the Zeos was Wing Comander: Privateer. To date, it’s still one of the best games I’ve ever seen. Totally open-ended - you basically just flew around space and did whatever you wanted. There was a quasi-realistic economy - agricultural planets had cheap food, manufacturing planets had cheap electronics, etc etc, and you could earn money by buying things one place and selling them after a few hyperspace jumps. (You could also smuggle illicit goods for the Space Pirates, but then the militia would hunt you down.) Money was used to upgrade your ship and keep it fueled and heavily armed. To an 8-year old, the possibilities were really and truly magical.

Some people cherish a toy, a doll, a blanket; I had video games. (To this day, I am still trying to get Privateer to run under XP or 98.)

Posted 8:48 PM
Link :: Comments (5)

Let me count the ways. | September 14, 2002

In Hocus Pocus, Kurt Vonnegut - actually, it’s not actually Kurt Vonnegut himself, it’s a character in the book, but you just know it’s actually supposed to be him, you know? - starts making this list of all the women he’s had sex with in his long, rather amorous life.

I, being younger and somewhat differently eclectic, will attempt to make a list of all the computers I’ve had.

I can never remember a time where there wasn’t a computer in the house. Ever since I was old enough to read, I was encouraged to play around on the computers, and figure out how they work. This is a fact to which I attribute much of my later success - get ‘em hooked early, parents.

Posted 4:40 PM
Link :: Comments (7)