Monday, February 23, 2009

Backronyms

I wanted to backronym something recently and quickly searched the Internet for a generator. Unfortunately, there is only one that I can find and it doesn't do a very good job. You can see pretty quickly that all it does is combine random words that match your initialism. For instance, if I enter DWYER, it might return: Devious Windjammer Yapped Electromagnetism Restrained.

It got me thinking: I know these aren't good backronyms, but what is it that makes a good one? I think a noun stack would work. I also think some combination of adjectives followed by a noun works. If we apply a Madlib-esque approach to the generator, we should be able to get passable backronyms. I'll try to make something that can do this and post more later.



Wednesday, February 4, 2009

Light Bulbs

On the MA-LINUX mailing list, a member asked this question:
By the way, do we really need several hundred GNU/Linux operating systems? Is it time to converge? Or would we be better off with several hundred different light bulb sockets, too?
After all, there are a lot of distributions. Distrowatch lists no less than 593 distributions in their news filter. On the face of it, it's a legitimate concern. With hundreds of choices, how is one to make a decision?

The good news is that the light bulb socket analogy is incorrect. The socket is not the Operating System; the socket is the architecture. Viewed that way, there are relatively few sockets that are in widespread use, and GNU/Linux in general supports even the most esoteric of these. If you have a computing device, you can probably install GNU/Linux.

The real analogy is that we have several hundred light bulb manufacturers. And yes, we want that. They are each allowed to innovate and provide different products which will serve (or not) the needs of different userbases.

If you're just starting out with GNU/Linux, I still haven't solved this question: Which Distribution? I personally recommend Ubuntu, but the interesting thing is that my recommendation has changed several times in the past 10 years and that's definitely a result of the aforementioned innovation. I suspect in 10 more years, my recommendation will be entirely different and I'm psyched about that.

Monday, February 2, 2009

Winter Ale


I'm following the recipe that Annapolis Home Brew gave me for their Winter Ale. Fermentation is done. I racked it to a secondary carboy tonight to allow some more sediment to settle out and then it will be time to keg it, carbonate it, and drink it! The OG on this was high, like 1.080. My boil was a bit too vigorous I think so I ended up boiling off too much water, resulting in the more concentrated wort. In keeping with my recent idea to name beers after video games, this one is called Killing Spree Winter Ale.

Sunday, February 1, 2009

MediaWiki Stubbing

I stubbed about 18000 entries in our StimulusWatch.org wiki so that people would have a little framework to work within when adding data, thus keeping the site relatively uniform in appearance while still providing a wiki. This took far longer than I think it should have. I didn't actually time it, but we're talking on the order of 12-18 hours. I used the MediaWiki perl module. The code is incredibly simple since you get to do something like this:
$c->setup({
'bot' => {
'user' => 'accountabot',
'pass' => 'PASSWORD'},
'wiki' => {
'host' => 'stimuluswatch.org',
'path' => 'mediawiki'
}}) or die 'Error connecting to wiki';

...

while (($name,$state,$project_id, $cost, $jobs) = $sth->fetchrow_array()) {
$page_name = "$state:$name:$project_id";

$page_content = "== General Description == \n{{project-stub}}\n\n== Points in Favor ==\n\n== Points Against ==\n";
print "$page_name ";
print "\n";

do {
$rv = $c->text($page_name, $page_content);
if ($rv != 1) {
print "$rv\n";
print "error: $c->{error}\n";
}
} while ($rv != 1);

}
And you just let that rip. I don't know if this is using a MediaWiki API or screen scraping (hoping on the former but not surprised about that latter). In any case, writes to MediaWiki through this interface are dismal. There must be a quicker way, but one night of processing was just under the threshold where I care because it's done. If I do have to run this again, I'm going to need to find a better way.