Metracide still happening

I was delayed on Metra this morning due to train vs. pedestrian. Metra had another problem yesterday. People on the train this morning were talking about yesterday’s having been a suicide and its going around that today’s was as well.

It reminded me of an article I read and blogged about back in 2004.  Its a good read and worth revisiting given the past two days.  As bad as my day may be going (and it is,) I’m still alive, and I didn’t have to see a mutilated body and carry that emotional toll, as the article points out.

In discussing this on Twitter with @jason1749, he pointed out a few interesting things I’ll just quote.  The important bit of context you need is that back in June the then current head of metra, who was under fire for some scandals, performed a metracide.

@ktgeek I think I read that back in the day. That’s why that Metra Exec’s suicide was even more messed up. He knew what he was doing. — http://twitter.com/jason1749/statuses/21583904671

@ktgeek He was the guy who put most of the stuff in place to help engineers with mental issues coming out of suicides. — http://twitter.com/jason1749/statuses/21584110039

Whoooah, we’re Halfway there!

For about 2 years I’ve been periodically going into Spin Doctor Cyclewerks, my local bike shop, and looking at a bike that I thought would be a great addition to my morning commute. In late June I went in one last time, and Greg, the owner, told me to just buy it already since its been two years. :)

When I went in, it was for one final “do I still want this” before Sarah and the kids got it for me for my birthday. I decided I still wanted it, and the next week, I got it. What is this it I keep talking about? Its the Giant Halfway folding bike.

I was back in the store a few weeks ago to get a minor part replaced, and Greg said I should post on the store’s FaceBook wall about my experiences. Since I don’t do FaceBook, I told him I’d write a blog post and get him the link. So, here it is!

Let’s start with the bike itself: The Giant Halfway is a folding bike that folds down to 32″x30″x14″ which is pretty close to as small as you’re going to get. When assembled, it feels like an adult version of a kids BMXish bike. The ride is nice and quick, and thanks to the small tires, it feels very responsive and nimble on turns. The bike seat is a standard bike seat, so the first few weeks hurt a bit as my doughy ass got used to it. The bike is only about 30 pounds, so its very easy for me to carry with one arm. It fits nicely into the trunk of my Ford Fusion with some room left over for other cargo.

The bike also comes with soft carrying case with a shoulder strap. Its good for storing the bike, but for my and my 5’7″ frame, its actually more cumbersome to carry in the bag. I’ve managed to rip a hole in the bag already where the seat meets the ground in the folded position. It happened about three weeks in, and it may be a combination of the bike not fully being on the reinforced bottom along with the gritty ground it was on, but I was disappointed that happened so fast. (And really, that’s been my only disappointment really.)

As I mentioned earlier, my main goal for this bike is for my commute. I take Metra Milwaukee District West Line from Bartlett to Union Station. Before I had the bike, to get from Union Station to work I would take either the Chicago Water Taxi or CTA Bus 121. My goal is to replace waiting for and then sitting on the vehicle for a total of 15 to 20 minutes with 10 minutes or so of exercise. And if gets me to/from work faster than the vehicles, all the better.

What one should do before they take a bike on the train is something I hadn’t done until I was writing this, review Metra’s rules for taking bikes on the train. I took it on faith that the Spin Doctor people knew what they were talking about (and they did) but I still should have read it myself. Anyway, there is one specific rule that applies to the folding bikes:

16. Folding bicycles in protective covers are permitted on all trains at all times but should not block train aisles or doorways.

Reality has shown that you can often get away sometimes with it not being covered. In my experience it depends on who the conductor is and what their general mood is that day and how much they care. But by the letter of the law you need the bag. Experimentation has shown that if I drape a cover over it, they’ll let that pass, so I’m thinking about making a “quick-release” cover for it since I want to be ready to ride when I hit downtown or I have to walk 2 blocks to my car in Bartlett.

The biggest trick I’ve learned is to just go to the handicap cars and try to get on either end of the 4 person bench or the two person bench. Those usually have enough room to sneak the bike in. At worst, you have to put it in front of you. As long as the aisle is clear and everyone else around you is comfortable, you’re usually left alone. I’ve been lucky enough to fit into those spaces, I haven’t yet had to come up with a backup plan for when I’m not there. In any case, though, those cars are your best bet.

When I hit downtown, I then walk to the Madison Ave exit of my platform and carry the bike up the long stairs. This is where the bike only weighting 30 pounds really pays off. If it was any heaver, I don’t think I’d really be able to make it up because I’m weak. Luckily, my children are around 30 pounds, so I’m used to it. If I had gotten the bike pre-children, I might have a tougher go. Doughy computer guy here, remember?

Once I hit the street I unfold the bike, snap on the helmet, and head off to work. The google map below has the route I take from the train to work and back again. Its only about 1.3 miles, but its 1.3 miles where I wasn’t exercising before.

Canal is a nice street because it has an official bike lane for most of it. Kinzie doesn’t a bike lane, but is known to be a bike friendly route. Usually in the morning on Kinzie if I’m stopped at a light, I’m usually one of at least 5 bikes waiting to go, if that doesn’t say its the way to go, I’m not sure what is.


View Morning Bike Route in a larger map

Once I get to work, I go in via the loading dock, fold my bike up, and take the elevator up to my floor. I keep the bike in my office as I’ve got space to do so, and its also makes a nice conversation piece.

Due to travel, weather, and some other misc. stuffas, I’ve been averaging about 4 days a week riding the bike in. I’ve been doing it for 5 weeks or so now, which tells me I must like it to be keeping it up like this.

On days when I don’t have to drop the kids off I also bike from home to the train station. That gives me another 2 miles in the morning and evening. Again, a small distance, but exercise and fun riding.

All in all, I’ve been terrifically happy with the bike and with biking to work. I’m getting to work earlier then I would have, I’m a bit more awake from the brief exercise, and I’m feeling better over all. A win all around.

Who is driving? OMG, Bear is driving! HOW CAN THIS BE?

From CNN:

Story said the bear was probably drawn to a peanut butter sandwich left inside by his 17-year-old son Ben. He said the family didn’t realize what was going on until deputies arrived and the neighbor came back and called them. By then the car was no longer in the driveway.

Incredulous, Story, his wife and three teen children — who have lived in Larkspur for 17 years — rushed outside to see the red Toyota down the hill and near a tree.

Somehow, the bear had either opened the unlocked back door or pushed a window down to get inside. Understandably agitated, it bumped into the horn repeatedly and eventually knocked the car’s gear into neutral. The Toyota rolled down the hill. The door added to the bear’s indignity by closing at some point during the ordeal.

Previously on Clerks the Animated Series:

More than meets the eye!

Revoltech 019 Optimus Prime
Creative Commons License photo credit: jquiz

In news that disrupts major portions of my life, there’s this happening:

Robots in disguise will likely alter your commute for the next few days as filming for the third installment of the Transformers film franchise takes over the Magnificent Mile.

Michigan Avenue between Wacker Drive and Ontario Street will close Thursday night and will remain shut down through 5 a.m. on Monday, July 19.

But that’s okay, because that’s a pretty cool thing to have the filming of Transformers 3 in town.  Even cooler is what’s on Michigan Avenue between Wacker and Ontario:  my office.

Because I don’t intend to sit in the office all weekend, I’ve set up a web cam pointed down at the street.  On Friday I’ll aim it better, but for now, you can watch the traffic on Michigan Ave.

Free video chat by Ustream

Also, here’s a bonus photo of my buddy Chris with an Autobot he found in the loop last weekend. (Click for the full size.)

Addings chapters to an existing mp4/m4v file

In the process of working on my TiVo to Video Podcast stuff I finally got to the point where I wanted to do something about commercials.  The ideal solution would be callable from ruby or at least the command line so that it can be used in an automated manner.  After a few weeks or research and playing around I found a workable solution that required me writing some code.

Early on I made the design decision to put chapter markers in around the commercials rather than cut them out.  The main reason for this is “What if the detection is wrong?”  For a 30 minute show, you’d end up missing more than half it in a worse case scenario.  Since its easy to jump ahead to the next chapter on my iPhone and iPad this seemed like a good decision.

Here’s the three most important facts I learned in my research…

  1. Commercial detection: No question, comskip is the right tool to use here.  The downside is that by default its a windows-only command line tool.  It works perfectly under wine, so that mitigates it.  Right now I use it via wine, but the source is available, so in the long run it would be good to have a native linux binary to call.  Comskip creates a variety of output formats, so I picked one that seemed to be the easiest to work with.
  2. There is no good command line tool to add chapters to an existing mp4/m4v file: I dug around and found a lot of potential solutions, but the all were either not on linux, couldn’t take the resultant files that comskip spit out, or just not a good fit for what I was doing.
  3. The MP4v2 library had primitives for adding the chapters: From this point forward, it was just writing some code that did exactly what I wanted.

The code below expects three arguments: 1) The video file to work on, 2) The chapter file output from comskip in ZoomPlayer chapter format, 3) and the total length in seconds of the video file.  The last one I might be able to remove once I have more brain time to devote to this.

#include <fstream>
#include <string>
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
#include <mp4v2/mp4v2.h>
 
// Compile with something like: g++  AddChapterInfo.cpp -o AddChapterInfo -lmp4v2 -lboost_regex
int main(int argc, char *argv[])
{
    char *m4vfilename = argv[1];
    char *chapfilename = argv[2];
    uint32_t total_length = boost::lexical_cast<uint32_t>(argv[3]);
 
    std::ifstream chapfile(chapfilename);
 
    MP4FileHandle m4vfile = MP4Modify(m4vfilename);
 
    // Add the chapter track, have it reference the first track
    // (should be the video) and set the "clock ticks per second" to 1.
    // (We may want to set that to 1000 to go into milliseconds.)
    MP4TrackId chapter_track = MP4AddChapterTextTrack(m4vfile, 1, 1000);
 
    boost::regex chpre("^AddChapterBySecond\\((\\d+),");
    boost::smatch rem;
    std::string s;
    uint32_t last_time = 0;
    while (getline(chapfile, s))
    {
        if (boost::regex_search(s, rem, chpre))
        {
            uint32_t t = boost::lexical_cast<int>(rem[1]) * 1000;
            if (t > 0)
            {
                MP4AddChapter(m4vfile, chapter_track, t - last_time);
                last_time = t;
            }
        }
    }
 
    if (total_length - last_time > 0)
    {
        MP4AddChapter(m4vfile, chapter_track, total_length - last_time);
    }
 
    MP4Close(m4vfile);
    MP4Optimize(m4vfilename);
 
    return 0;
}

I’ve been using this code for over two weeks straight and has been operating perfectly, but obviously this code could be made a lot more robust, especially in the areas of error handling. I’ve only run into issues when comskip guesses commercials wrong, which is only payoff for putting chapters in instead of nuking the commercials all together.

In the long run, I should either write and release a generic tool that helps the next poor sap like me or work on using swig bindings to mp4v2 so I could just do the calls in ruby.

Tivo2Podcast update

I’ve made a few updates since my last release a few weeks ago. I thought I’d toss an updated version out there.  What’s new in this version:

  • Duration is no longer hard-coded to 32:00 and actually reflects the duration of the show
  • The script will attempt to find the TiVo via Bonjour/mDNS/ZeroConf/DNS-SD/whatever unless passed a -t flag with the TiVo’s IP address. If you have more than one TiVo, it will go with the first one it finds.
  • Moved the stuff in lib to lib/tivo so the package is more easier sucked in by something like encap or stow

Download: tivoscripts-20100314.tar.gz

When I get some motivation later in the week, I’ll put the git archive online, incase anyone wants to clone it and do some development on it.

My new car is finally “mine”

My new car is finally fully mine now that my new plates arrived today…

TiVo -> Video Podcast

Previously on “You can imagine where it goes from here”: We released a script to download stuff from the tivo, and then made some improvements to it.

After two years of saying I was going to fully automate the process of downloading and transcoding shows for my iPhone, I finally got off my ass and did it.  The script is called TiVo2Podcast and it not only does the downloading and transcoding, but it stuffs the resultant video into a an RSS feed for easy consumption/playback by a podcatcher such as iTunes. I’m now automatically getting the shows off my TiVo and onto my iPhone for easy commute-time consumption. (I commute by train, I do not recommend commute-time consumption if you are driving.)

The ruby script wraps tivodecode, HandbrakeCLI, and AtomicParsley and is intended to be run from cron.  I’ve tested this on Linux, but it should run on any UNIX-alike, but it won’t run on windows since I make liberal use of the system() call. Also, this is intended for PERSONAL USE ONLY, do not set up podcast feeds and violate the ethics (and also the laws) of copyright left and right.

This is a very early version and can certainly use some tweaks and enhancements, primarily in configuring the shows you want to capture.  Right now, configuration is in the form of doing INSERT statements in SQLite.  Not very friendly, but it gets the job done until I can make a quick and dirty question based TUI. Here’s an example of setting up getting the best fucking news team on the planet:

insert into configs (config_name, show_name, rss_filename, rss_link,
                     rss_baseurl, rss_ownername, rss_owneremail, ep_to_keep, encode_decomb)
            values ('tds', 'The Daily Show', 'tds.xml', 'http://www.thedailyshow.com/', 
                    'http://example.com/podcasts/', 'Keith T. Garner', 'kgarner@example.com', 4, 1);

Download tivoscripts-20100304.tar.gz and let me know what you think. Make sure you read the README!

[Update 3/5: Forgot to add that all the code I wrote is under the Simplified BSD License, so have at it.]

Today IS pretty cool…

Rob McCool said the following quote on a UIUC alumni mailing list we’re both on:

Actually, all things considered, right now is pretty awesome. You can buy a device for about $200 which has more floating point computing power than a Cray did in 1972 and carry it around in your pocket. Its battery can store energy equivalent to a small hand grenade and can run the device for hours without plugging into the wall. And you can use it to communicate with virtually anybody on the planet, sometimes by bouncing radio signals off of aluminum canisters we’ve flung into outer space.

That’s pretty cool.

I totally concur.

Book review: Dead Until Dark

Dead Until Dark (Sookie Stackhouse, #1) Dead Until Dark by Charlaine Harris

My rating: 4 of 5 stars
After thoroughly enjoying the HBO series True Blood for two seasons I decieded to give the Sookie Stackhouse books a try. (This worked well for me in reading Kathy Reich’s Temperance Brennan books after watching Bones.)

The first season of the show is incredibly faithful to the book so most of the major plot points were not the surprises they could have been. However, lots of little details are just different enough to add to the experience of both the show and the books.

You follow the story of Sookie Stackhouse, a telepathic waitress in Bon Temps, LA. A Vampire named Bill moves into town in the process of mainstreaming. Sookie is taken with Bill since she can’t read him. Then, women who seem to be assocated with vampires start dying around town. Was it Bill? Is it Sookie’s brother? And the mystery is on…

It seem to fall somewhere between a mystery with supernatural elements and a bodice ripper. At times it almost felt “too girly” but the supernatural characters and happenings allow me to accept the material where usually only Fabio dares to tread.

The writing style and my interest made it an incredibly quick read. All in all, if you liked the shows, you’ll like the books. If you haven’t seen the show, you’ll still like the books if you’re looking for what I’d venture to call “a girly Harry Dresden.”

View all my reviews >>