Techiness
I'll clump web design talk and gadget talk here, I guess.
-
Uncategorized
More on the story engine
I started working up the story engine last night in Ruby. Greg suggested that XSLT would be perfect for it if I stored my stories as XML. Do a simple transformation, and voila, a story in XHTML with layout and everything. I was hoping I could knock it out in a single evening. Turns out Ruby and XSLT are two more separate critters than I thought — there’s no default library to handle it, and the three or so available are older and lack documentation. Better yet, the one easily available as a gem doesn’t use Ruby’s nice REXML, it uses LibXML. Combine all that with never having used XSLT…
-
Uncategorized
Story engine
I’ve always loved the simplicity and pleasantness of whatever must be under the hood of Elf’s stories — he seems to have easy management of story arcs, multiple sortings of stories, multiples sets of stories, next and previous buttons within stories, etc. I’m debating how I want to build my own little story engine. Right now, my stories are in WordPress, published as page. One avenue I could take would be to write a WordPress plugin to allow me to manage stories the way I want — keep them as pages, but add the fluff I want. Another avenue would be to roll my own — make a separate little…
-
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
Busy bee
One of the big worries I have is that I will look back at my life in a decade and realize that I spent my youth working only for a company. I work for a pretty awesome company now, don’t get me wrong, but I don’t want all my accomplishments in life to be through them.