Disclaimer: IANAD: I AM NOT A DOCTOR. Please consult one prior to engaging in any attempt at weight loss. I provide no recommendation you do things my way and take no responsibility for your health.

Disclaimer 2: I am not affiliated with, have never given money to, and have no relationship at all with the Unnamed Diet System I have based my diet plan upon. I do not recommend for or against their system, I am just sharing the fact that I my own variation of it and have had success.

Since my birthday this year, I’ve been working to lose a little extra weight. I now weigh around what I did when I was in high school and am still losing. I did this to show solidarity with my wife who wanted to lose a bit, but I needed to do this for myself as well.

Wanting to lose weight presented a few problems for me. First, I can not stand to do what somebody else tells me to do. My wife calls that being “obstinate-defiant.” Depending on my mood I usually either say I’m just selfish or I have a built-in distrust of the crowd. In any case, it was clear that unless I could tweak my plan a bit, I wasn’t going to be be happy with it. I’ve ended up tweaking less than I thought I would, but I still can, so there.

My next problem is that I refuse to do cruel or unusual dieting. I’m not going in for any fad or diet that drastically changes things. I’m not giving up cookies or eating grapefruit or doing Adkins. Regardless of what science there is or is not backing these things up, anything that changes what I eat is going to make me grumpy. I love food and there is no shame in that. The shame comes in consistently eating more than I need. I also find the idea of using a pill or surgery repulsive (no offense to those who do such, I won’t). For me, this process is about developing self-control, which means I need to learn to do it and my wife provides enough accountability to that end.

While metabolism and other factors adjust a person’s dietary needs, failure to consume enough calories to maintain a person’s current weight will cause a reduction. (Unless, which I suppose is possible, a person’s body is somehow capable of storing fat, but incapable of using it. I don’t know if any such disease exists, but I don’t have it if it does, so it’s not my problem.) Therefore, my diet plan would have to be something as mundane as journaling what I eat.

Which brings up my next problem, counting calories is too easy and not really addressing the full magnitude of the problem. Because not only should I eat less, but I should encourage myself to eat healthier. The system ought to take other factors into account.

My final problem is that whatever it is I do must be something I can do on a computer. I sit in front of one for around 8-12 hours per day. I can set my computer to remind of things, I can share things between myself and my wife to provide accountability on my computer, and while I like writing down notes, particularly when I’m brainstorming, I really don’t want to do all the math we’re talking about in my head all the time. It’s too tedious.

Fortunately, my wife previously went on and successfully completed a plan using Unnamed Diet System for which you may have seen ads. This system met all my basic requirements. Yet, other than they way they count points, they don’t provide any value to me, at least none I would pay for. Fortunately, everything I needed was published at various places on the Internet and I built myself a Google Docs spreadsheet to do it.

I provide a link to a version of it here for anyone interested in weight loss on similar terms. Go re-read the disclaimers again now. I’ll wait… Done? Okay, I don’t recommend this plan to you, but if you find the spreadsheet useful, great. I’m providing it under a Creative Commons 3.0 license.

If you have a Google account, you can create a copy of the spreadsheet to use it or you can download it in another format to use with Excel or OpenOffice (I think, haven’t tried that).

To use it, I first scroll right until I fill in some information about myself. This sets up the basic tolerances for my diet plan based upon sex, age, current weight, height, daily activity, etc. Then scroll back left and log my consumption. Under each meal, the wide column is for a description of the item eaten and the narrow for recording the points. Once I have “0” points left for the day, I stop eating. The spreadsheet does have a weekly allowance of extra points that I can use as well to indulge in something or just allow me to consume all the points for a day without worrying about going over by a couple. I use all the points I have for a day unless I’m really not hungry. This is not a starvation diet, so I try to use up as many of my daily points as possible. I do not worry too much about using or not using the weekly points. I often consume most of them.

The formula for calculating this points is simple, but elegant in that it encourages me to get more fiber and avoid fatty foods, while consuming fewer calories than I need to maintain my weight:

Points = Calories / 50 + Fat (g) / 12 + MIN(Fiber (g) / 5, 1)

I’ve been told that Unnamed Diet System actually divides Fiber by 4, but whatever. I have embedded a couple calculators in the spreadsheet for the times when I’m too lazy to do the math in my head.

I weigh myself once a week to track my progress (on a separate spreadsheet).Every 10 pounds, I adjust the chart to the right since the spreadsheet gives one less point per day for each 10 pounds I lose. I also copy the spreadsheet (actually, Terri manages this part) each week and blank it out to use the next week.

Eventually, I should reach my goal weight (I haven’t really decided what that is). When that happens, I’ll need to adjust the spreadsheet to deal with maintenance. When that happens, I will give myself more points until my weight stabilizes. I plan to continue recording points for the foreseeable future this way.

Cheers.

I just finished writing a test that discovered I’d made a rather dumb and (upon looking back) rather obvious mistake in a return value in this Perl application I’m working on. The mistake involves a certain errant combination of return and and must be dealt with carefully.

The particular bit of code looks something like this:

sub blah {
    return $foo and $bar;
}

For those who don’t know Perl intimately, Perl has two “and” operators. One named “and” and the other named “&&” like C. These are not strict synonyms. They are both shortcut operators, but the “&&” and the “and” sit at very different places in the operator precedent order. In Perl “&&” has a relatively high precedent and “and” is very, very low.

Back to the problem: this return was returning true when $foo was true and $bar was false. After rereading this line I smacked my forehead and said, “Duh!” The problem is that “return” actually has a higher operator precedent than “and” so this is how Perl would break it out if it showed the AST with parenthesis:

sub blah {
    (return $foo) and ($bar);
}

This means the code immediately return $foo in all circumstances. I might as well have just written:

sub blah {
    return $foo;
}

The solution, then, is to either use the “&&” operator:

sub blah {
    return $foo && $bar;
}

Or use explicit parenthesis:

sub blah {
    return ($foo and $bar);
}

Or don’t use the “return” operator (since subroutines in Perl always return the value of the last expression executed):

sub blah {
    $foo and $bar;
}

Cheers.

This past week I purchased for myself a mini laptop. I wanted something nice and portable that I could use for personal use on trips and do hobby projects on. This thing is great. I got Ubuntu installed and started playing around since it’s been a couple years since I had a Linux desktop, and even then I usually had a Mac OS X laptop I used with it. As such, when it came to copy over my music and such, I needed to convert to a new music player. I’ve settled on Banshee for the moment.

Problem: There’s no import tool out there to go from iTunes to the current version of Banshee.

Solution: However, the process turned out to be not so hard for me. Here’s what I did:

  1. Copied the iTunes music folder from my Mac to the music folder on my new laptop.
  2. Started up Banshee and used Media > Import Media… to tell Banshee where to find all the files and let it do it’s thing.
  3. Went back into iTunes on my old machine and used File > Library > Export Library… to generate a Library.xml file, which I copied to the new laptop
  4. Ran a Perl script I wrote to pull out the play lists, song play counts, last play date, and ratings and push them into the Banshee database

Fortunately the Library.xml file output by iTunes is in a standard format that is pretty easy to understand. Also, Banshee keeps much of the information about your music and such in a SQLite database. So, I could very easily automatically copy over all the ratings and other information I’ve been assembling for the past several years.

Here’s the conversion script, itunes-to-banshee.pl that I wrote for download:

Download itunes-to-banshee.pl

Update (thanks to Rolo): You will need to install a few dependencies as well. On Debian or Ubuntu, this is done by installing:

  • libdatetime-perl
  • libdatetime-format-iso8601-perl
  • libclass-dbi-sqlite-perl
  • libxml-twig-perl
  • libmime-base64-perl

This can be done from Synaptics or by running this on the command-line:

sudo apt-get install libdatetime-perl libdatetime-format-iso8601-perl \
    libclass-dbi-sqlite-perl libxml-twig-perl libmime-base64-perl

Once Banshee has finished adding your song files to its music library, close Banshee. Make a backup copy of banshee.db to somewhere in case something goes wrong (which can be found at ~/.config/banshee-1/banshee.db). Then run:

perl itunes-to-banshee.pl Library.xml ~/.config/banshee-1/banshee.db

This may take a few minutes, depending on how many songs you have. It might show you some warnings if your Library.xml is weird (remember I wrote this just for me). It may also tell you if it can’t find some songs in Banshee that it found in your Library.xml. (It did for me because I’d deleted some songs from the disk and iTunes never figured it out.)

Once it finishes, start Banshee back up and it should have the play lists, ratings, play counts, and last played date set for all the songs that had such information in iTunes.

There are a couple things you might want to know about how the program works. First, it does not touch smart play lists. I don’t know and don’t particularly care how to read the smart playlist configuration from iTunes. I was able to recreate the smart play lists I had in a few minutes.

Second, the import script uses the song title and song file size to match songs from the iTunes library in the Banshee library. This is probably safe since I’ve never seen two CDs with the same songs on them end up being the same size, but it’s theoretically possible it could be a problem.

Third, if you have duplicates in your library, this script will only change one of them. I’d recommend weeding those out first.

I’m not interested in maintaining the script, but I’ll answer questions about it. If you ask really nicely and I’m in a good mood and the change you want is very small, I might be willing to make it, but that’s a lot of “ifs” to line up.

Cheers.

With my work on qublog.net continuing to progress toward hosting this service on the qublog.net web site. I’ve been using the silk icon set for the icons, but recently decided to switch over to the fugue icons. In the process, I rethought how I added icons to the system, which I subsequently chose to try on some work things as well. There’s no magic here, nothing to patent (at least I hope not), but it’s worked pretty well, so I’ll share. I suppose this might not be “The Best Way”, but it’s certainly now “My Best Way.”

First, these icons are all being added without IMG-tags. This keeps my content less cluttered and allows me to very quickly switch icons if I change my mind later just be changing my stylesheet. Typically, these are added to buttons, links, and spans like so:

<span class="icon o-time">12:44 PM</span>
<a class="icon v-add o-task">Create Task</a>
<input type="submit" class="icon v-save o-time" name="op" value="Save"/>

The first class “icon” performs the work of making sure the icon itself is attached to the element properly. This looks like:

.icon {
    padding-left: 18px;
    background-repeat: no-repeat;
    background-position: 1px 1px;
    min-height: 18px;
}

This basically makes sure that my 16 pixel icon has 1 pixel of space around it and makes sure the element is at least tall enough not to cut anything off.

Then, the icon itself is chosen by examining the other associated classes. I’ve divided the classes into nouns (with an “o-” prefix), adjectives (with an “a-” prefix), verbs (with a “v-” prefix), and adverbs (with a “r-” prefix). I define these classes within the style sheet in that order so that adjectives will override nouns, verbs override both nouns and adjectives, and adverbs will override everything. So, now my style sheet looks something like this:

.o-task { background-image: url(ticket.png) }
.o-time { background-image: url(clock.png) }

.a-group { background-image: url(folder.png) }
.o-task.a-project { background-image: url(briefcase.png) }

.v-add { background-image: url(plus.png) }
.v-add.o-task { background-image: url(ticket__plus.png) }
.v-add.o-task.a-project { background-image: url(briefcase__plus.png) }

By setting up the style sheet this way, a regular task reference shows up with a ticket icon. However, a project (which is a kind of task in Qublog) shows up as a briefcase. In case I need a generic add link, I can use a lone plus sign, but if I want a specific add link for tasks I can have a ticket with a plus sign. Finally, I can add a new project with a briefcase with a plus sign.

Later, if I want to modify the icons used, I can do so by just adding another class or something. It’s pretty flexible and if I make sure and include enough information on every link, span, or button that might have icon, I can make my icons more or less particular later just be adding a line or two to my style sheet. (For example, if my icon set lacked a briefcase with a plus next to it and then added one or I created one, then I could add that last rule later and rely on the ticket with a plus sign in the meantime.)

Some final varations I also use are things like having the icon only and ignoring the text itself:

.icon.only {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
}

Now I can add the “only” class to my spans and links and the text becomes hidden. I combine this with a jQuery code similar to this:

jQuery(document).ready(function() { 
    jQuery('.icon.only').each(function(){
        jQuery(this).attr('title', jQuery(this).text());
    });
});

This causes the text of the element itself to show up as a tooltip when you hover your mouse over the icon. Generally speaking, though, I usually try to do this on the server side when I use the “icon only” classes.

I have a few other “icon” class variants for changing the position of the icon, dealing with small 9-pixel icons, and making sure buttons and specific other things look good with the icons, but I’ll leave these as exercises for the reader.

Cheers.

I’m messing around with Drupal again for a church web site. The task I’m working with at the moment is trying to make it so that the breadcrumb is based upon a menu other than than that Navigation menu (which is the normal way content breadcrumbs are set in Drupal). Long story short, we’ve chosen to make the Primary Links the site map rather than the more typical Navigation menu.

The technique that really ought to work is this:

menu_set_active_menu_name('primary-links');
$breadcrumb = menu_get_active_trail();
drupal_set_breadcrumb($breadcrumb);

That’s simple enough, but it doesn’t work. At least, it doesn’t work unless it gets called at some point very early in the request life cycle. After some digging through the Drupal API, I found that menu_get_active_trail() is actually defined like this:

function menu_get_active_trail() {
  return menu_set_active_trail();
}

I vaguely remembered this from a year ago when I was last mucking with Drupal. This is a pretty common Drupal idiom. It’s basically the Drupal developer’s way of using the mutator (i.e., menu_set_active_trail()) simultaneously as a accessor and default setting. That’s fine. However, when you look into menu_set_active_trail() I found something wrong. The code looks like this (minus some code that I don’t want to spew here):

function menu_set_active_trail($new_trail = NULL) {
  static $trail;

  if (isset($new_trail)) {
    $trail = $new_trail;
  }
  elseif (!isset($trail)) {
    // LOTS OF CODE HERE TO CONFIGURE THE DEFAULT
    // BASED UPON THE OUTPUT OF menu_get_active_menu_name()
  }
  return $trail;
}

Do you see the problem? If you happen to set the value returned by menu_get_active_menu_name() (via menu_set_active_menu_name()) in time, you can get it to setup your breadcrumb using some fairly smart code that does the right thing for you.

However, if you don’t set it before the first call to menu_set_active_trail(), you can never run that helpful default code ever again. There’s no way to unset $trail because $new_trail is ignored if it is unset. There’s no way to execute the default code without unsetting $trail since it’s all within this single function.

Bah! The correct solution is to move the default code into a separate method so that it can be called separately later and reused.

My work-around will probably be to install the Menu Breadcrumb module. I’m trying to keep the number of modules installed on this particular site very low, so I was hoping to avoid it. Yet, installing a module is going to work out better than me reinventing the wheel with a module of my own, in this case. It’s these little frustrations that drove me away from Drupal in my personal site. I’m probably being too picky and hypocritical, but whatever.

Cheers.

Recently, I started trying out git to see what the relative advantages and disadvantages of it are over Subversion, SVK, and CVS. I am not quite ready to give up the use of Subversion as the mechanism for sharing my projects with others, if only for the fact that I know more programmers familiar with it than with git (and also for the fact that my web host provides built-in support for Subversion, not git, at this time). Therefore, I’m actually using git as the front-end to access my Subversion repositories, which is quite similar to how I use SVK (and the normal model for SVK use).

The first difference I had to deal with was simply that the command-line is just a bit different. So, I had to map various ideas in Subversion/SVK/CVS into git before I could use it very successfully. Now that I’m using it comfortably, I’m certain I like it better than anything I’ve yet tried and will likely continue to use it over SVK, which was my preference up until now. On the other hand, I don’t think I’ll ever completely give up using Subversion, SVK, or CVS entirely unless and until they become obsolete tools that no one is using.

Adding Changes

Why do I like git over the alternatives? First, it helps protect me from common mistakes. For example, one thing that annoyed me at first is that you have to add any files you change to the list to be committed before committing.

% git add lib/Net/Google/PicasaWeb.pm
% git commit

That seemed a little annoying compared to how SVK lets you commit with a single “svk commit” command and select which files to commit by editting the commit message. Yet, once I got used to it, I realized that I rarely ever have to back out a mistakenly committed file. It only commits those you explicitly ask for. If you’re sure you want to commit everything, you can add whole directories or use the -a switch to commit, but the fact that you have to explicitly make these decisions rather than just committing whatever makes it difficult to make mistakes in what you commit (unless you are in hurry).

Commit by Hunk

Next, I can commit only parts of a file. This feature blew my mind. This should be a mandatory feature for any source code storage system. When I’m making a complex set of changes, but don’t make intermediate commits for whatever reason (laziness, forgot, not sure if what I’m doing in one part really serves the whole yet, etc.), I can perform an interactive patch.

% git add -p
% git commit

When running add with the -p switch, you will iterate through all the listed files (or in this case, all files changes in the repository), and be shown the diff. You can then add individual hunks from the diff to the commit or not. On the latest release of git, you can even edit the diff to pick out individual lines from the hunk to stage and leave the rest out for the moment. This is a killer feature.

Tracking Patches, Not Files

Another nice feature has to do with how git manages to deal with tracking changes. In Subversion, SVK, and CVS the most important unit to work with is the code itself. However, with git, the most important unit to work with is the diff of how the code changed from one commit to the next.

What do I mean? As an example, if I take a project and branch it to work on some complicated feature while the trunk continues to move forward. Then, I merge them when I am done, Subversion, SVK, and CVS handle the merge by diffing the branch with the trunk and then putting all the changes together in a single revision. These will use the history of the trunk and branch in various ways to help resolve problems, but they essentially treat a merge as a single diff. (SVK is a partial exception if you use the “-I” option during merges.)

With git, all the changes of the merge are copied over to the top of the trunk and then you deal with conflicts one diff at a time. This way the entire history gets pulled over from the branch onto top of the trunk, as if the work had been done from the top of the trunk in the first place. You take a little extra time to “rewrite history” this way, but it makes your patches a little more logical.

This same handling of patches works all over the place. For example if you just want to take advantage of some new features placed on the trunk, you can do something called a “rebase” rather than a “merge.” This is the same process as the merge, except all the patches remain on the same branch.

% git rebase master

You can even move the entire branch to a different base point if you want to try your branch out using features still in progress on a different branch:

% git rebase --onto bar master foo

The above command would move all the changes on branch “foo” on to branch “bar” as if these changes had been written for “bar” originally.

Under SVK or Subversion, a merge would be done by pulling in the latest trunk changes over into the branch. This adds a the trunk changes into the middle of your branch as either an individual commit (or as a set of commits with “-I” in SVK).

Work in Progress

Have you ever tried out some code changes and then realized they weren’t going to get you where you want to go? At the same time, though, there are some good ideas here that you don’t want to just throw away. In Subversion you might create a special branch to hold them, but probably not. In SVK, you might create a local branch or something to hold work in progress, but again, probably not.

In git, you can just run:

% git stash

This takes all of the changes you’ve just made and stores them quickly in a special stash. You can then see the stash and recover the latest stashed item using:

% git stash list
% git stash apply

There are a few other commands with the stash as well that are handy, but these are the ones I use most.

Those are a few of the reasons why I really like git. On the other hand, there are some aspects of SVK that are nice, such as the fact that it is very easily extended using Perl (since SVK is written in Perl and written for extensibility). I’ve been thinking about looking into adding features like these into SVK as a fun exercise since I’ve been playing with git. I sure don’t have time to do any of the other of the fun projects I do on my own time, so why not?

Cheers.

I think if I had my way, I would develop tools for developers most of the time. This would be a good implementation of Yegge’s “only build stuff for yourself” principle. The Android project catches my eye because it offers the possibility of being able to get rid of the Microsoft OS on my phone without having to buy a new phone. However, after looking at the site, I’m now more interested in the tools they’ve put together to aid this development.

The first is a tool called “repo”. It’s somewhat similar to a tool we use at work for managing our source repositories. It basically adds some higher level niceties to git and helping connect with code reviews. In addition, it interacts with a nice web-based UI for code reviews they’ve called “garrit”.

Garrit is kind of like a ticket tracker for submitting patches and works almost in reverse of the usual ticket tracker. Normally, you post a problem and then put together a solution. This tool lets you submit a solution and then lets the reviewers determine whether it’s a good idea or not. This is important for a project like Android where it will likely be common for someone to write a patch to get Android working for his particular phone or app and then submit it to the community for general inclusion. It supports the git model for development pretty well.

Anyway, I’m interested in Android and hope some smart folks with better C skills than me can make it work on my phone in the near future, but in the meantime, I think dev tools present some interesting ideas on their own.

Cheers.

I don’t travel away from a network very often, particularly now that I have an EVDO card. However, it is inevitable that when am away from a network (on a plane, in snow storm, on the road) I want to try out a CPAN module or need one that I haven’t yet installed. When this happens and I can’t do whatever it was that I wanted to do because I didn’t have it, I get grumpy. However, thanks to CPAN::Mini, I don’t have to worry about this problem anymore.

% sudo cpan CPAN::Mini
% mkdir -p ~/projects/minicpan

That installs the module itself and sets up the directory for the local repository. Then, I added a nice alias to my shell config:

alias cpansync="minicpan -l $HOME/projects/minicpan -r http://ftp.osuosl.org/pub/CPAN/"

I picked the OSL mirror here since I happen to know the man responsible for admin’ing that mirror. I can then run this to get a copy of the latest and greatest on CPAN:

% cpansync

After that runs, I can run it again any time I want to refresh, which I usually do right before I travel and any other time I want a fresh copy.

Finally, I modified the list of CPAN mirrors to include:

file:///home/sterling/projects/minicpan

Now, whenever I install modules, the modules are installed directly from my hard drive. This is also a bit faster than having to download the modules at install time (i.e., as long as I have already done the download previously).

This setup makes me happy, especially when on airplanes.

Cheers.

I found out about the fact that I would be giving two talks at the Pittsburgh Perl Workshop this week about 2 weeks ago and have been working frantically to get my stuff together since. Well… at least, I worked frantically for the last week. The first week, was not quite frantic. It was more like somewhat diligent, but I did spend a couple nights playing Zelda that should have been spent prepping. Anyway, I got my talks done and I don’t think they were particularly excellent, but I don’t think they went badly (at least, I hope they didn’t). But, this post isn’t really about my talks so much as it is about debriefing PPW 2008. On to the festivities…

Travel To

It all started on a completely average Friday morning of packing… okay, skipping ahead. I flew to Pittsburgh through Milwaukee. In Milwaukee, I was supposed to take a late flight from there, but that wasn’t supposed to me I took off from Milwaukee after midnight. However, the flight the airplane hadn’t even taken off yet from Dallas when we landed. So, I worked more on my slides which weren’t quite finished while I waited. And waited. Finally, the plane arrived and took me to Pittsburgh, where I landed around 2am.

Strange thing about the flight, though. There were only 5 actual passengers on an Embraer 170. For those of you that aren’t airplane fanatics (like me), that’s a plane that seets about 70. There were two flight attendants, the pilot and copilot, and another 4 or 5 airline personnel catching a ride to Pittsburgh. That’s all.

I was the only one that had a checked bag. Uh-oh. When I got off the plane, a baggage handler was asking each of the 5 real passengers if they checked a bag and I said, “Yes.” He said he’d meet me at baggage claim. He met me there, but with no bag. It was lost. Poop. I almost never check a bag and this time I did. Dumb. Oh well.

So, I catch a cab and go on to the hotel and finally get to sleep sometime after 3am.

PPW Saturday

My phone alarm woke me up around 7am. Yeesh. I felt like something scraped off the bottom the mattress, but I got up and showered and got some coffee. I am in a hotel about 1.5 miles from the conference, so I figured I walked. I think this was a good thing as it helped me wake up a bit and it has been a glorious weekend in Pennsylvania. I stopped off to get some antiperspirant and some Listerine breath strips to minimize in odious scents I might be emitting since I was lacking my toiletries.

I made it to Wean Hall on CMU campus and promptly picked up my conference T-shirt and took it to the bathroom to exchange it for the mildly damp shirt I had been wearing that had probably picked up odors from a shuttle bus, three airports, two airplanes, and a cab, not to mention a 35 minute walk on a warm morning with a 30 pound backpack. Okay, so with new shirt donned and odor opposing chemicals applied to my underarms and mouth, I went in to the keynote on Perl 6 in progress.

Perl 6

The keynote was by Patrick Michaud and the news for Perl 6 is good! Yay! For anyone who has followed the drama of Perl 6, you know that some of the history hasn’t necessarily been positive. However, it sounds like things might actually be moving on the right track now. The final release of Perl 6 still expected on Christmas, as it has been for at least a couple years now. But, given Patrick’s report, it sounds like it might actually be a Christmas before my son starts elementary school. (I wasn’t always sure of that.)

Bug Labs

After the first talk, a company called Bug Labs gave a presentation. It was kind of an odd talk I thought since it really didn’t have much to do with Perl (existing APIs are Java), but it was more of a suggestion that Perl hackers could get involved. I’m a bad candidate for that. The product itself looked like an interesting diversion, but nothing I’d be willing to sink that much cash into. I’m not so much a hardware guy anyway.

My personal feelings aside, I have some doubts about the business plan of Bug Labs. It’s nice that they support Open Source, but the viability of the business model is a little questionable to me. The presenter kept saying they wanted to make it so easy that “your mom” could come up with a custom device. First, my mom is not likely to care about a device unless it comes prefab with as few buttons as possible. Second, my mom is not going to put down that kind of cash just so she can create some sort of customized web-cam/motion-sensor/GPS something-or-other. She has better things to do. I suspect she didn’t mean my mom literally, but that doesn’t mean my statements are any less valid for the hypothetically average mom either.

SQLite Extensions

After that was a talk on extending SQLite, which I admit I paid very little attention to because I was still trying to finish my slides for my first talk on Sunday. I thought this sounded interesting and it would be nifty to have more of that in some of the code we do at work, but since we don’t use SQLite for the work I’m thinking of, the talk doesn’t really apply to that.

Data::Rx

Ricardo Signes then gave a talk on something I’d never heard of before, Rx, but I think I’m going to check out. He’s basically put together a data validation system similar to XSD or RELAX-NG, but for general data structures in memory. It’s a really cool idea and I want to see what I might be able to gain from it, so it’s on my short list of things to try out in the near future. The fact that he’s got implementations for it in Ruby, Python, and PHP is also very interesting for interoperability.

Lunch

Next was lunch where I met Dan Klein, a fellow consultant for Grant Street, in person for the first time and had a pretty mediocre chicken marsala, but an excellent salad with fetta cheese, roasted almonds, and strawberries with a raspberry vinaigrette.

Advanced Pattern Matching

Paul Grassie, another co-consultant, gave a talk on regexes, which I again confess I mostly missed to work on my own talk. What material I did catch was a good review and there were bits that were somewhat new, but I wasn’t paying close enough attention to really learn them.

By the way, Paul and Dan work for Tom Christiansen Perl Consultancy. Given what I know of them now (having seen Paul in action and spent part of a day with Dan), I’d recommend their services if you have some need of Perl training for your company.

Network Introspection

This talk I almost completely ignored. There were some things in it that were interesting, but it was mostly for the sysadmins. I was familiar with and impressed with some of what was presented, but I did the system administrator thing already and have turned a new leaf. I’m not going back to the land of putting out fires in the world of hardware.

RDBMS

The next talk was on a database tool called Kioku::DB, which is an interesting idea and something I’m glad to be aware, but not something that will change the way I do my work or hobbies. Again, I’m still working on slides as I glance up now and then and this didn’t really capture my attention.

Email Hates the Living!

Finally, Ricardo gave his second talk of the day on Email. Having myself engaged in mortal combat against the spam monster at one of my first tech jobs and having been a systems administrator, this talk was flipping hilarious. His analysis on the insanity of email and the email specs is right on. For example, “asdf@!#$&” is a valid email address within the To: or From: line of your email, even though such an email couldn’t possibly be delivered. Yet, “asdf@!#$&.” is not. Stupid. It’s a great talk and helps to explain why his CPAN repository is filled with email code, when it doesn’t seem like it should really be quite that hard.

Dinner and Sleep

After that, the Grant Streeters still around headed out for dinner where there was some lively discussion of work and politics. Then, I went back to the hotel room and came up with a Lightning talk, did the final clean up on my slides, and then tried to get more sleep.

The Saga of the Missing Bag

I haven’t finished the story about my bag. Early Saturday, I called Midwest Airlines to find out about my bag. As I mentioned, mine was to be the only checked bag and the handler that I talked to couldn’t find it. He made me out a claim for the bag and said it would be delivered as soon as he could get it to me.

When I called Midwest, the conversation with the woman went something like this:

Me: Hi, I’m calling to find out about my missing bag.
Woman: What’s your name?
Me: Andrew Hanenkamp. H-A-N-E-N-K-A-M-P.
Woman: Mr. Hanenkamp? Yes, your bag came in on your flight. Why didn’t you pick it up?
Me: Um, because the guy who said he was going to pull it out of the plane said he didn’t find it and gave me a baggage claim ticket.
Woman: Okay, I’m very busy right now, I will try to get them delivered to you hotel. Can I get your number?

I gave her the number and then finally was able to get back with her during lunch. This conversation went something like this:

Me: Hi, I’m returning a call made to my cell phone?
Woman: Who is this? Is this Mr. Hanenkamp?
Me: Yes, I believe you have my bags, have they been sent to my hotel yet?
Woman: Well, your bag was here last night. My supervisor wants to know why didn’t you pick it up last night. It was here already.
Me: I know. As I told you before, the guy who pulled it out of the plane told me it didn’t come.
Woman: Hmm. Okay. Umm. Did he give you a baggage claim ticket?
Me: Yes. I have it in my wallet. (Thinking, do you want me to shove it through the phone?)
Woman: Okay, well, I guess I can have the delivery service take your bag over. Which hotel are you at? Do you know the zip code?
Me: [chuckle] Um, no, I don’t generally memorize the zip codes of the hotels I’m staying at.

Anyway, so when I got back, I had my bag and was finally able to change into completely fresh clothing and brush my teeth and such. Ah.

Sunday

I walked over to Wean Hall again after picking up my coffee and started out in the Rakudo Perl talk.

Rakudo Perl

This talk was also given by Patrick Michaud and I went to it rather than the Moose talk because I’m already somewhat familiar with Moose and because Perl 6 and Parrot are something I’d like to volunteer my time on. Perhaps I will at some point, but I have too many other things I’m doing that I’m more immediately interested in. I don’t have any excuse for not joining for reasons due to not knowing how now, though. Patrick went over all the sorts of things someone wanting to contribute might want to do to get started.

Managing Open Source Projects

Next I went to this talk by Tom Lane rather than attending Schwern’s talk on the y2038 bug. The talk was moderately interesting since Tom Lane is a Red Hat employee who spends most of his time contributing to PostgreSQL. It was interesting to here the differences between how Perl is managed and PostgreSQL, but I confess, I was again distracted, but this time by a bug report on one of my CPAN modules.

Data Structures

This was another talk by Paul Grassie and at a very introductory level. I don’t think he covered anything I don’t use on a nearly daily basis, but I was still working on bugs on my CPAN module. I did note that Paul has a very soothing voice and since I’ve only had about 8 hours of sleep total in the past 48 hours, it was making me a bit sleepy.

MooseX::Tour

Next was Jonathon Rockway’s talk on MooseX extensions. There are some pretty cool extensions to Moose available for dealing with various customizations to your meta-programming code. I’d recommend looking over his slides when they are posted on his blog. There’s some interesting things in there.

Lunch

We had more lunch. I got to meet Tom Welsch’s kids, since Tom brought them with him as he did a little light recruiting for Grant Street. I had more yummy salad and a decent sandwich (at least for having been catered).

Jifty Talk

I gave and got through my whole talk on Jifty. I’ve posted the slides, which is enough summary.

Prophet

I watched part of Kevin Falcone’s talk on Prophet and this is another one of those things that I have got to get my hands on in the near future. Qublog, in particular, could benefit from what it does very nicely.

Perl REST

Again, I gave this talk and the slides are posted.

Method Signatures

Lastly, I attended the talk Schwern gave on his new method signatures class. It’s pretty nice overall, but I’m a little hesitant to actually use it. His point about there being 240,000 extra lines of code that can be taken off of CPAN because of it is well-taken, but I’m not quite convinced to actually use it yet. On the other hand, the parser module that Matt Trout wrote, Devel::Declare, which has some interesting possible implications for the DSL work I want to do with Jifty.

Lightning Talks

Most of the lightning talks were great, mine excluded. I fail.

Ricardo gave a talk on Dist::Zilla, which I am also adding to my short list. It’s kind of a replacement for Makefile.PL and Module::Starter and Module::Release and such, but does some very smart things. If I find out that it’s extensible and mostly makes sense when I take a first hand look, I’ll likely be using this to manage my modules in the future.

Kelli Ireland gave a talk on the orange shirt that’s been traveling with various members of the Perl community to exotic destinations and offered it to anyone going somewhere interesting if they will take pictures.

There was a talk on going Sixty to Zero in Perl (a play on the Zero to Sixty tutorial given). This talk was great in that it showed how very readable Perl can be turned very unreadable if someone wishes to do so deliberately in order to maintain job security. It was a very good example of why serious Perl developers don’t understand why Perl gets kicked in the face so much when it is not difficult to write good Perl code if you actually try to do so.

Probably the most memorable lightning talk, though, was the LOLCAT history of Perl. Unfortunately, there’s no way such a talk can be translated into this summary in any useful fashion, so I will just say, that it was awesome.

After that, I skipped out because I’m sleepy and should have been asleep already, but decided to write this instead… Okay, so I think that does it for PPW 2008. This is Sterling Hanenkamp signing off. Good night and God bless.

I gave my talk on REST at the Pittsburgh Perl Workshop today. I think it went alright, but I’m sure it was dreadfully boring. If I ever give the talk again, I’m going to have to liven it up a bit and speed up the pace. For anyone that attended the talk, I would be interested to have your feedback, so please feel free to post it here.

Here are the slides, as promised:

Making Your Perl REST
View SlideShare presentation or Upload your own. (tags: perl rest)

Again here are links to the sample implementation files:

Cheers.