22 May 2008

stories that are short and tweet

Yesterday, on a tip from Scott, I checked out the first-ever Twitter-based fiction writing contest. Twitter, for the uninitiated, is a combination micro-blogging application and social-networking tool all rolled into one, but the significance is that all updates (dubbed 'tweets') are 140 characters or less. Thus the 140-character (no more, no less) story contest.

I'd written my entry fairly early, but having mulled the idea over some more, I wrote, well, some more*:

I found a time machine that only makes things younger. Spent the afternoon making burgers into veal. And then, well...now I need to grow up.
She was scared. Zombies attacking, and only with a lot of help were the houses made safe. But now mommy said that the neighbors were hungry.
She ran. He ran, pulled a gun, and sprayed bullets at her. She dove into the canal, and he swam after her. Was this a chase, or a triathlon?
Found a lamp in the antique store. Rubbed it, and a genie appeared. I wished I could understand what he was saying. It was "You get 1 wish".
I need to learn how to ride a motorcycle. I'd take lessons or talk to another owner, except the nearest one looks mad I'm stealing his bike.


* Only one entry per person, though. So the rest of these are just for fun. Then again, so's my "official" entry also, since I'm not going to win.

21 May 2008

walking in place

Two and a half months ago I started a new job. I work in a skyscraper downtown, and I was rather a bit surprised to find that any ascending or descending more than one or two floors' worth of stairs got me out of breath*.

That came as a bit of a shock, as I had never been that badly out of shape. I haven't been working physically-demanding jobs for a while, but even then I hadn't realized I'd let myself go that much. Either I hadn't noticed, or during my months of unemployment and contract work I'd atrophied considerably.

So I decided to do something about it. After a month (I didn't say I decided quickly) I started getting back on my treadmill every night I could. Since then I've burned over 11,000 calories and walked almost 60 miles, which would just about get me to Zanesville or so. My goal is to keep at it at least every other night, and better yet, every night. I've only skipped a few, but tonight's going to be one of them as right now Natalya's resting peacefully on my lap and shoulder. If I set her down, she screams. I'm hoping this is a one-night thing.

Anyway, I'm not posting this to complain about her. I'm trying to guilt myself into making sure that every night when I don't have that good of an excuse not to do it, that I get back on that treadmill. I've recently raised my average mileage (of course to keep myself interested I'm tracking all of this on a spreadsheet) and it would be a tremendous disservice to me to quit with such great momentum.

At least now I can take the stairs without taking a breather in between floors. And that's a pretty good start.


* Another surprise was that the stairwell door of the floor about five below mine that has the nearest convenience shop and snack bar is locked. Fortunately for me, just as I was discovering this, somebody came through the door into the stairwell.

14 May 2008

word count plugins for habari

November's still five months away, but I'm thinking ahead. I've written two simple plugins for Habari that will let me easily see how many words I've written* toward the 50,000 word goal of National Novel Writing Month. These plugins provide a quick and easy tally of words used in individual posts and all posts with a given tag.

Requirements

version 0.4.1 of Habari or later

Download

These will always link to the most recent versions:
Word Count by Tag
Post Word Count

Installation and use

Word Count by Tag

Unzip wordcountbytag.zip in /user/plugins. Then activate and configure it in the Plugins Admin page. If you leave the 'tags to include' box empty it will count all words from published posts with all tags.

Here is the template tag for adding to your theme:

echo $word_count;
Post Word Count

Unzip postwordcount.zip in /user/plugins. Then activate it in the Plugins Admin page. There is nothing to configure.

Here is the template tag for adding to your theme, inside the posts loop:

echo PostWordCount::get_word_count( $post->content_out );

Comments and questions should be left below. Subsequent updates and releases will likely appear on the plugin page, not here.


* Or rather, how far behind I am, if my typical progress from the last several years progress is any indication.

13 May 2008

geotags plugin for habari

I've written a simple plugin for Habari to add geographical information to a blog. I've used geotags for years* with websites like GeoURL by manually-editing my page headers, but this geotags plugin automatically inserts the correct tags in every generated header.

Requirements

Using version 0.4.1 of Habari or later, all you need is this line somewhere in the <head> block of your theme.

$theme->header();

If you are using one of Habari's default themes, then you are already set.

Download

This will always link to the most recent version: geotags.zip

Installation and use

Unzip geotags.zip in /user/plugins. Then activate and configure it in the Plugins Admin page - you will need to know your latitude and longitude in decimal. To find them you can use My Geo Position.

Once the plugin is installed and configured, you're done. Your headers will now display your position like this (the location of my site):

<meta name="DC.title" content="mikelietz:fine whine">
<meta name="ICBM" content="40.076665, -82.95996">
<meta name="geo.position" content="40.076665, -82.95996">

Comments and questions should be left below. Subsequent updates and releases will likely appear on the plugin page, not here.


* Whether or not they've ever been useful is, I suppose, a question I've never really asked. They've certainly got potential to become something interesting, or at least useful.

12 May 2008

the missing months

I've removed the calendar from the top corner of this site. It's not because of all of the days (then weeks, then months) that passed without any new updates*. No, I've changed the software platform on which this is built yet again. I've been able to keep most of the look and feel the same, though no small effort of breaking and fixing the existing code both for the presentation (colors and graphics, etc) as well as actual bits of the software that I needed.

I'm now running Habari, an open-source blogging platform built from the ground up (not adapted or ported or forked like many of its predecessors) to be better. It's not a finished product by any stretch, but it's more than functional enough for me now, and, what's better, it's being actively developed by an accessible dev team. They already know me by name for all of my questions, suggestions, and bug reports, and soon I'll be contributing a plugin or two myself.

I was tempted to work backward, backdate some posts, and claim that database issues kept a few of the more recent updates (that is, anything after January) from showing up, but I'm going to be honest and just admit that I haven't been writing anything here.

So what's happened in the last four months? I left a contract position to work full-time for the State of Ohio as a Business Analyst. At least, that's my title - I'm still a ways from knowing exactly what that really means. I stay busy, though, and I like the people. I really like working in downtown Columbus - it's a big difference, now being able to eat lunch looking out from over thirty stories up, from the windowless cement bunker where previously I'd spent my meals. Being able to get out and still the city is also quite nice, and I've procured an inexpensive, pocket-size camera with which I've taken a few pictures around town. The good ones I've posted to Flickr. In fact, I've taken quite a few pictures recently, and I've been attempting to take at least one picture every day and post it.

Photos aren't the only things I've posted online. I've also been active with a so-called 'microblog' on Twitter, which is great for small updates, random questions, brief conversations, and a whole bunch of things I don't know how to do yet, or that need more people I know to be signed up to be useful. At some point I intend to better mesh those updates with the longer posts I put here, but until then you can find my most recent update here on this page in the upper right corner.

So now that I'm done fixing most of what was broken on the back-end, will I get back into the business of posting new stuff? Difficult to say. Right away I'm going to have a bunch of posts about some Habari plugins, and then after that, who knows?


* Well, not entirely at least. But it was a bit, well, disheartening to load the page and see that blank calendar all the time. Not disheartening enough to get me to load up the editor and write new stuff, of course, but pretty close.

21 January 2008

a creativecommons-licensed interesting photo findr for flickr

The more I play with making fake CD covers from flickr photos, the more I get frustrated by the sheer number of interesting photos that are unusable because of their creators' chosen license. I realize that if I emailed them, many wouldn't mind me using their photos for something like this, but that seemed like it would be so much trouble.

So instead I programmed a little script to find only the usable shots, and made a page for it. Took me a couple hours, give or take, to get it working.

To be more specific, here's what you might want to know about what I did.

Flickr photos can be licensed in a number of ways, either through the default "© All rights reserved" that regular copyright protection grants, or through the more flexible and friendly creative commons licensing with its many permutations, including requirements for attribution, non-commercial and commercial use, and even the licensing of derivative works. So what I needed to do was take the five hundred photos flickr picks each day for their "interestingness", and filter out anything that was marked "all rights reserved" or "no derivative works". Fortunately those happened to map to the integers 0,3, and 6, which meant filtering them out was a simple modulus test*. Calculations aside, the rest was a matter of a few hours' work and the phpFlickr documentation to get a working script that wouldn't hammer my server, nor get me banned from flickr's.

So all it does is check 3,500 of the last seven days of interesting photos, and from those, screens out the usable ones. From my quick observations, the percentage of correctly-licensed photos chosen for their interestingness is under ten percent. Which means that hopefully I can save people some time. The one that it picks, at random, is ready to use.

Click here to try it for yourself.

Go ahead and put your comments and questions below. I'm releasing this as a 0.1 version - I know there is much more I'd like to do with it, but since it works, I figured I'd get it out there for people to play with. My source code is messy, but eventually I'll get the relevant bits of it posted too.


* At the risk of sounding too nerdy, modulus is, and has been, one of my favorite mathematical operations. It's just a fancy name for "the remainder", but since that sounds like something out of elementary school, I think everybody calls it the much more impressive "modulus". It's wildly useful (or at least, I've used it a lot), and, well, I've used it a lot, probably more than multiplication and division combined, in my programs over the years.