Irregularly Expressed Dept.


One of the "fun" things I did with Movable Type (note the sarcasm quotes) was create some special URL handlers.  F'rinstance, if I want to link directly to an Amazon product, I just have to create a URL that points to amazon:xxxxxx (the XXX being the product ID), and a regex will transform the output when the post is published.  Ditto Google searches, Amazon products with images, references to Discogs.com, and so on.

Getting this to actually work was frustrating beyond belief.

The biggest problem with regular expressions is, as someone else once put it, they're a way of solving one problem by replacing it with another, even bigger one.  Regex syntax makes Perl look like a model of beauty and syntactical elegance in comparison.  Worse, you may be at the mercy of whatever local variants of regex you're being forced to work with, so something that looks like it might work in System X doesn't in fact work in System Y.  And so on.

That said, I think I've climbed over most of the worst hurdles by this point.  The next step is to see how I can integrate the ideas I have more elegantly into MT so there aren't massive performance hits incurred by what I'm doing.

On the whole, I'm happy with having moved to MT4 and made the decision to re-architect everything.  I am, however, discovering certain limitations to the system that I'm going to have to engineer around.  Template hacking is not my favorite hobby in the world, and I hate the idea of hacking the system to do something only to find that one or two revisions down the line, they've created a native way to do it — which in my mind means I have to undo my work and do it their way to avoid future compatibility / performance issues.

Example: What would be the best way to create a block of text that appears at the top of a category index?  A "pinned post"?  Direct editing of the template?  (My instincts tell me the best thing to do would be to create a post with certain attributes and then create some kind of exception in the template that allows it to bubble to the top and have its date information suppressed — so I've done that to see how it holds up.)


Tags: Movable Type




About this Entry

This page contains a single entry by Serdar in the category Uncategorized / General, published on March 17, 2008 2:40 PM.

You can see alphabetical or chronological listings of all entries in this category.

» See other Uncategorized / General entries for the month of March 2008.

» See all other entries for the month of March 2008.

Find recent content on the main index or look in the archives to find all content.

About Me

I'm an independent SF and fantasy author, technology journalist, and freelance contemplator for how SF can be made into something more than just a way to blow stuff up.

My Goodreads author profile.

Learn some more about me.

My Books

Coming Soon

Out Now

More of my books

Search This Site


Other People We Like

Fandom

Archives