• Uncategorized

    Deliberate starvation

    I find that I have a lot of trouble mustering the courage to write about weight loss here. I mean, to really write about it, to give numbers and talk about specific failures and how I felt and how much weight loss sucks. My one goal for 2008 (from March 1, 2008 to March 1, 2009) is and was to lose 35.9 pounds. I’ve lost 14.6 lb since then (for a while I flailed about, very confused as to what to do), which leaves me with… 21.3 lb. In about 21 weeks. Doable, if I keep on the path I’m going. I use the Hacker’s Diet Online to track my…

  • 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…