• On Life and Love

    New laptop en route

    I’ve been bantering around the idea of having a device for mobile writing for a while now. I had a list of specs that seemed rather impossible, initially. It needed to be small (less than a 12-inch screen), it needed to have at least a few hours of battery power, it needed network connectivity (for research purposes and managing the repositories of my stories), and it needed to be cheap. Cheap. I haven’t sold a novel yet, so I can’t fathom dropping $1000+ into a device that won’t actually make me a better writer. I was thinking more along the lines of, ya know, $300 or less. Preferably with a…

  • Uncategorized

    Lower-casing URIs in .NET

    A few months ago, a client asked that their .NET site have all its URIs lower-cased for search-engine optimization purposes. This was an existing site with a lot of files, already in SVN. SVN in Windows is wonky (by which I mean, terribly broken) when it comes to changing the case of filenames, so I decided to go for a programmatic solution to the renaming. I ended up with the following: void Application_BeginRequest(object sender, EventArgs e) {     string currentURL = Request.RawUrl.ToLower();     if ((currentURL != Request.RawUrl) && (!currentURL.Contains(".axd")))     {         Response.Status = "301 Moved Permanently";         Response.AddHeader("Location", currentURL);     } } The most important thing is the “!currentURL.Contains(“.axd”)” condition. .NET sticks its scripts in…

  • Uncategorized

    James Spader’s Secretary

    I just finished watching Secretary, a movie starring James Spader (of Stargate and Boston Legal fame) and Maggie Gyllenhaal (of Dark Knight fame). The movie is incredibly awkward — I spent a good bit of the movie curled up in a seat, eyes partially covered. It’s full of very broken people who don’t know how to deal with themselves or other people. It’s also about the two main characters’ sadomasochistic, D/S relationship, which is why I was watching it. Well, first because it was James Spader, and second because it featured D/S. I’ve always been fascinated by D/S relationships; it’s a power play/exchange/relationship that I’ve always wanted to partake in,…