Wednesday, December 29, 2010

NJ - SFO travel epic

After a heavy but hardly extraordinary snowstorm the day after a Christmas spent in northern New Jersey with family, it was time to return home to San Francisco. It had been over a day since the snow had subsided, plenty of time for things to get back up to speed, and although with air travel on the rise this year passengers whose flights had been canceled were desperate to find a way back home, since I had a reserved spot I wasn't too worried. Nevertheless, I left my parents' house with substantial margin to get to the airport in plenty of time.

My plan was to leave the station in suburban New Jersey on the 11:06 southbound to Secaucus, connect on one of a series of LIRR trains to Jamaica, then get to the airport 2 hours ahead of my departure. No problem.

But things didn't quite go according to plan.

First, my sister and I were waiting at the platform, at which we'd arrived with 5 minutes to spare, first 5 minutes, then 10, then 15 minutes after the 11:06 scheduled departure time. Finally we heard the whistle, followed soon after by the announcement that the 11:23 to Hoboken (stopping at Secaucus) was arriving.

I was puzzled by this until I realized the train must have been on a weekend schedule. I'd seen nothing about this on the New Jersey Transit website when I'd set up my schedule the previous night. It could have been far worse than the 17 minute delay -- weekend trains run only every hour. So 25 minutes would have been normal, with a worst-case wait of 55 minutes past the normal 11:06 departure. I got lucky.

The train got to Secaucus without incident. I then assertively moved to Platform 2, where trains bound for New York stop, and got there within 30 seconds of the doors closing on a waiting train. Lucky again, although the following train was only 5 minutes later.

Next was New York Penn Station. Another problem: I'd just missed that group of trains for Jamaica, the last leaving at 12:35, with the next train at 13:10. Actually if the 12:35 had been at all delayed and I committed no missteps I might have had a chance had I sprinted, but instead of rushing like a crazy guy I decided instead to buy some of the spectacular bagels sold there, listen to a guitarist after tossing a dollar into his case, and generally sucking up the atmosphere of the exceptional station. When the train finally arrived, at 13:00, I was able to board it without rush, and pulled out Bangkok Haunts, the book I was reading. I had 2:20 until my departure time -- no longer as good as I'd wanted, but still it should be no problem.

After a slow approach the train reached Jamaica, and I again assertively moved to avoid getting caught in congestion for the Air Train. Except when I reached the Air Train ticket kiosks, they were taped over. This didn't look good.

"There's a free bus to JFK -- go downstairs for a free bus to JFK" a heavyset guy in a uniform was announcing. I moved quickly down the escalator to the ground floor.

Here the scene was surreal. A group of us was speed-walking to reach the back of the line waiting for the bus. It extended a solid hundred meters before I reached the end. I'd made good time, however, and even in a few short seconds there was a substantial and growing line behind me.

I saw some guys who had the lackadasical air of employees on duty. "Do you have any idea how long this will take?" I asked neither of them in particular.

"Maybe two hours. There's only one bus making round trips."

This was beyond absurd. How many of these people had two hours to spare? I pondered finding a taxi, afraid to search because I'd lose my space in line, and it was possible they were incorrect, and there were more buses. But then I saw a taxi pull to the nearby curb, and I instantly left my spot in line to run over.

It took four of us, charging $15 each, all highly illegal but I was hardly in a position to argue, and was only grateful he was there. And so we left. Traffic around the airport was appalling. He said the Airtrain was running intraterminal, just not to and from the train station. I paid and tipped the driver and ran into the airport. But I still had time; when I glanced at my watch it was around 14:15.

Next I took an elevator to the ticket level. There was a guy there wearing a fur coat, which I thought fairly unusual. When I commented on the travel situation, he said he'd taken the bus from Jamaica Station. He seemed surprise at my description of the huge lines: he said it had only been 45 minutes from the station to the gate. So he was probably with the earlier wave of trains, and perhaps the bus was able to stay on top of the passenger flow somehow. In any case, it seems just missing the 12:35 train from Penn Station may have almost been more costly than I'd imagined. Another example of the non-linear cascade of travel delays.

Lines at the ticket counters of the terminal were appalling. However, I found a group of eight self-serve kiosks with only one person ahead of me. Unfortunately the kiosks were clogged with international travelers who were required to find assistance to verify their documents. I waited approximately 7 minutes before a women was able to take care of two of the passengers, liberating a kiosk for me. At this point I was able to check in within 60 seconds.

From the kiosk to security it was like a refugee camp. Military cots were laid out along the walkways, each occupied by someone with a look of futility and defeat. I tried to avoid eye contact and passed to security.

Security went fairly quickly, actually, although I'm convinced my "Priority" line was actually slower. Then a long walk to Terminal 35 and here I was at the gate with an hour in hand. Things looked good as I sat on the ground next to an electrical power stand until I realized it was 15:05 and no boarding announcement yet. With the huge crowd that wasn't good.

Five minutes later a voice announced the plane is ready to go except for the first officer, who just arrived in LaGuardia. Result: 40 minute delay. The Air Travel system is such a fragile, delicate house of cards. It promises to get people to their destination quickly if not comfortably and so often fails on both grounds. On the other hand, all of the rail links of my trip are almost a non-issue; I'm perfectly happy to sit on the train reading, reviewing the papers I've been assigned, play around with computer code, or whatever. Although given the fiasco at the Jamaica station, I'm was sure at least a few people will be extremely grateful to Mr. First Officer.

I boarded in the first group, being first class, where a few attempted intruders were deterred. Maybe if there were a "death penalty" -- ticket cancellation, call up the next stand-by, for this sort of flagrant selfeshness it would be less common. There was a short delay (multiplied by a LOT of passengers) while these folks were weeded from the line and then I was on.

Boarding took awhile, then there was a long taxi delay (delayed off the gate and you pay with heavy interest as you lose your reservation on the runway). We finally took off in darkness at 17:20.

The flight was slow. We descended into unfavorable air to reduce turbulance in the middle of the flight, then had to overshoot San Francisco and land from the west due to the winds. Still, other than wanting to get home, it wasn't so bad. It's actually fairly pleasant in first class, even not adjusting for the fact I was in a plane. Plenty of room, all the water you can drink, well-prepared food, frequent attention. Really nice. I managed to even avoid being suffocated with any noxious odor of self-importance from fellow passengers. People behaved civilly to the stewardesses, and were generally courteous to each other. I decided it was a good flight to have invested those miles.

My neighbor, in fact, had reason to be grateful -- to the late first officer. He'd flown from Puerto Rico with time to spare only to sit on the runway for two full hours waiting for a gate to open. He boarded well after others, in fact I wonder if the plane had been held just a bit specifically for him. I've been in the same position except that the plane didn't wait and I missed a connection to Europe.

It was raining heavily in San Francisco when we landed, but I called Cara and got BART with an "expectation value" 10 minute delay (trains run every 20 minutes). BART went smoothly except the squeaky voice over the intercom announcing stops was barely audible and I only just got out of the train in time at my stop, 24th Street in Mission, thinking I was still at the preceding Glen Park station. But I did escape in time, and Cara was waiting to pick me up (the air seemed obscenely warm after New Jersey's sub-freezing temperatures), avoiding a two mile run through heavy rain or an indeterminant wait for a bus.

Saturday, December 25, 2010

Garmin FIT decoder

I hope anyone reading this is having a fruitful Christmas. I'm personally in New Jersey, where it's cold by San Francisco standards, but excellent weather for running, which I'm finding I can still do despite months of neglect. I know: patience! It's hard, but last year I learned the hard way that going too hard too quickly is a loan which needs to be paid back at a very high rate of interest...

It is a good day for me -- what a great Christmas present this find was, from Japan: a GARMIN FIT decoder library for Perl. In addition to the library, some sample applications are provided: fitdump and fitsed.

So why am I so pleased with these? Well, many reasons, but one is that when uploading files to Strava, I tend to have two problems: either I forget to reset the unit from one day to the next and I end up with "rides" (or "runs") which span multiple days, or I neglect to shut it off when I get on the train or in a car, and end up with motorized segments (this is really good at scoring KOMs, but is, to put it lightly, cheating).

In the first case, it should now be relatively easy to write s short code to fragment FIT files at time gaps exceeding a certain threshold, for example one hour. And the second case I should be able to deal with: how hard can it be to determine if someone is in a car or train with decent accuracy?

I have an algorithm idea for this, one I've already proposed to Strava, but I think it's best to hold onto it until I've had a chance to code it up with Garmin::FIT and see how well it works.

Friday, December 24, 2010

4-dimensional mazes

As I noted last time, the maze algorithm doesn't know are care about topography or dimensionality. All it cares about is a list of nodes with each node's initially unconnected neighbors. How the nodes are laid out is post-processing.

One-dimensional mazes aren't so challenging: each node has 2 neighbors. Two directions, for example east and west.

With a 2-dimensional maze with square nodes, each node has 4 neighbors (no cutting corners). Obviously 2-dimensional is more challenging than one-dimensional: there's no the opportunity for dead-ends and multiple path options. Sample directions are north, east, south, and west: two more than the 1-dimensional case.

To three dimensions, each node (assuming cubic nodes) has 6 neighbors. In addition to north, east, south, and west, you can add up and down to the list of directions.

So there's a pattern here. Each time you add a dimension you add two more neighbors and two more directions, the two directions being the opposite of each other. West is the opposite of east, south the opposite of north, down the opposite of up.

It happens we live in a 3-dimensional world, but there's nothing particularly special mathematically about three dimensions. The maze algorithm doesn't care. It's just as happy in 4 dimensions as in 3.

So following the pattern, if we add a dimension, we need to add two neighbors and add two directions. I like "in" and "out" for these directions.

My maze program, which I wrote to generate semiconductor structures using the structure generator for semiconductor modeling. But for debugging, it also generates a simple text rendering of the maze.

Here's a one-dimensional maze. It's fairly dull:
      0  1  2  3  4  5  6  7

In on the left, out on the right, no choices to be made in between.

Two-dimensional mazes offer choices. Here you enter on the left, exit to the right:
7   |     |           |     |
    +  +  +  +--+--+--+  +  +
6   |  |  |              |  |
    +  +  +--+  +--+--+--+  +
5   |  |     |     |     |  |
    +  +--+  +--+  +  +  +  +
4   |     |  |        |  |  |
    +--+  +  +  +--+--+--+  +
3   |     |  |  |           |
    +  +--+  +  +  +--+--+  +
2   |  |  |  |  |        |   
    +  +  +  +  +--+--+  +--+
1   |  |  |  |  |     |     |
    +  +  +  +--+  +  +--+  +
0      |           |        |
      0  1  2  3  4  5  6  7

For 3-d, the structure editor will have no problems (I'll show that in a later post), but for text-art, I'll represent multiple layers like multiple "floors" in a building floor plan. Access from one floor to another are represented with arrows: an upward arrow for access to the floor above, a downward arrow for access to a floor below, or an up-down arrow for access to either.

Here's a 3 × 3 × 3 example, where again you enter on the left and exit on the right:
z = 2
2   |↓ |↓    |
    +  +  +--+
1      |     |
    +--+  +  +
0   |↓    |↓ |
      0  1  2

z = 1
2   |↑ |↑ |↓ |
    +  +--+  +
1   |↓ |↓    |
0   |↕ |↓ |↕ |
      0  1  2

z = 0
2   |     |↑  
    +  +  +  +
1   |↑ |↑ |  |
    +--+--+  +
0   |↑  ↑ |↑ |
      0  1  2

For four dimensions, I simply extend the floor plan model. In addition to stacking floors one above the other, I stack them in multiple columns. In a node, a right arrow signifies that there's access to the corresponding node in the column to the right, a left arrow signifies access to the corresponding to the column to the left, while a left-right arrow specifies access to either. With so many choices, up to eight, from each node things get complex quickly. Even for a simple 3 × 3 × 3 × 3 case, which has 91 nodes:

z = 2
    +--+--+--+  +--+--+--+  +--+--+--+
2   | →     →|  |↓←| →  ←|  |↓ | ←|↓ |
    +--+--+--+  +--+--+--+  +--+  +--+
1   |      ↓ |  | → ↓ | →     ←|  | ←|
    +  +--+--+  +--+--+  +  +--+  +  +
0   |↓ |↓   →|  |↓→   | ←|  | ←|     |
    +--+--+--+  +--+--+--+  +--+--+--+
      0  1  2     0  1  2     0  1  2

z = 1
    +--+--+--+  +--+--+--+  +--+--+--+
2   |↓ | →|↓ |  |↑ |↓↔| →|  |↕ |↓←|↕←|
    +--+  +  +  +  +--+  +  +  +--+--+
1   |↓→|   ↑ |  | ←|↑ |↓ |  |        |
    +--+--+  +  +--+  +--+  +--+--+--+
0   |↑→|↑→| →|  |↕←| ←| ←|  |↓     ↓ |
    +--+--+--+  +--+--+--+  +--+--+--+
      0  1  2     0  1  2     0  1  2

z = 0
    +--+--+--+  +--+--+--+  +--+--+--+
2   |↑     ↑→|  |   ↑ | ←|  |↑  ↑ |↑ |
    +--+--+--+  +  +  +--+  +--+--+  +
1   |↑    | →|  | →|  |↑←|  | ←|     |
    +--+  +  +  +--+--+--+  +  +  +--+
0   | →| →| →|  |↑←| ←  ←|  |↑ |   ↑ |
    +--+--+--+  +--+--+--+  +--+--+--+
      0  1  2     0  1  2     0  1  2

In this example, the entrance is in the upper right "floor" on the left wall. The exit is in the upper middle "floor" on the right wall.

This was done in Scheme Lisp. A long time ago, I wrote a 4-dimensional maze generator in Microsoft BASIC. In that case, I made a video game of it. You can fairly clearly project three dimensions onto a 2-dimensional screen. But 4-dimensions get challenging. So I just represented three: the fourth dimension was hidden.

The trick is which dimensions should be visible? For coordinates x, y, z, and u, I'd render x, y, and z, with u hidden. Whether access is available or not in the u dimension isn't shown. There'd be a number of options here; for example you could put a symbol on the screen for whether u-direction "in" and/or "out" access is open. But instead I allowed the user to "rotate" so the u direction is visible.

So to do this, in addition to the standard pivots in three dimensions, I added two additional actions: permute right and permute left.

Suppose x is the direction ahead, y to the right, and z up. Then if I permute right, then I shift each coordinate: y is ahead, z is to the right, and u is up. Do it again and z is ahead, u is right, and x is up. A third permute and u is ahead, x is right, and y is up. A fourth permute and I'm back where I started. Initially u is hidden, then x is hidden, then y is hidden, then z is hidden. A fourth permute and u is hidden again.

Anyway, enough of that for now. Maybe I'll do something about bicycling again soon.

Monday, December 20, 2010

semiconducting mazes

Okay, so this is mostly a bike blog, but since I got a new job in October, my time for riding has dropped off substantially. I'm trying to ride into work more often: once to twice per week would be good. But it's 42 miles one-way, so I've got to "make time" for that to happen.

Anyway, in my job, one of the products I use is a structure generator for semiconductor device modeling. So, for example, I can build models for field-effect transistors, bipolar junction transistors, p-i-n diodes, photo-detectors, light-emitting diodes, even static random access memory cells and other small circuits. Fun stuff, really. The models do a remarkably good job of matching reality, even though the reality of semiconductors can be fairly complex.

Knights of the Lambda Calculus
But when I found myself home sick with a bad cold, between naps I needed an activity to keep myself occupied. It was a good exercise to reacquaint myself with Scheme, the scripting language used by the structure editor. My Scheme was rusty, to say the least. Memories of 6.001 in my distant past.

And the best way to learn a computer language is to do an exercise, and since my job is modeling semiconductor devices, I should model a semiconductor device. But I was feeling poorly, and needed something to cheer myself up, and yet another FinFET simulation, for example, wasn't going to do that.

If Scheme has any strengths, it's in linked lists and recursion. And when I think linked lists and recursion, I think of mazes. From an early age I was fascinated with mazes. The labyrinth scene in The Shining, for example, still haunts me when I think about it.

Shining maze
close-up of model of the maze, from The Shining by Stanley Kubrik. The algorithm described here would need to be slightly modified to create this one, since it has loops (pairs of nodes connected by multiple paths).

So I set for myself the task of simulating a semiconductor maze. The thing here is that if you attach an electrode to the starting square and another to the goal square then apply, in simulation, a potential difference, current should almost instantly flow between the two. In other words, the maze will be solved. Would the simulator be able to solve the maze?

Well, the answer is it is, and remarkably well. Here's a plot of the current density through a simulated maze of doped Silicon, with an impurity concentration of 1 million arsenic atoms per cubic micrometer, enough to turn the semioconducting silicon into a decent conductor:


And here's another with more squares:


In each case a positive potential was applied to the left, causing current to flow to the right. Current density is indicated by color: red is the most current, blue is no current. White in the plot is "nothing": electrons can't go there (this isn't quite the same as "vaccuum", which I also could have modeled, but it's computationally quicker and mathematically similar to treat the walls of the maze as impermittable nothingness). The current flows only through the maze solution. Since the current was carried by electrons, this means the electrons, which are negatively charged, flow from right to left. They solve the maze backwards, you might say, although from a simulation perspective the direction doesn't matter.

You can even see the current cutting corners. When going straight, it spreads out to use the full width of the Si region. But when it turns a corner, it crowds to the inside to shorten the path.

So how did I create the maze? The algorithm, which is well-established, is simple. I start with a list of nodes plus a "stack" in which I can access only the top element. Basic actions with stacks include "pushing" an element onto the stack and "popping" the top element off the stack.

The nodes are each defined in terms of their neighbors. Neighbors can be either connected or disconnected, but initially each node has all of its neighbors disconnected.

I start with one random node on the left side of the maze. I put the number associated with that node onto the stack. Then I begin my process:

  1. If the stack is empty, I'm finished. The maze is done.
  2. If the top node on the stack has any neighbors which have as yet no connections, then pick one at random, connect the top node in the stack with that randomly chosen neighbors, put that neighbor on the top of the stack, and repeat.
  3. On the other hand, if the top node in the stack has no unconnected neighbors (neighbors which have no connections, to that node or to another node), then pop the stack and repeat.

That's it! Very simple. The algorithm doesn't care where nodes are located or how they're laid out. The maze could be 2-dimensional, 3-dimensional, or even 4-dimensional. If 2-dimensional, it could be laid out in a square, as hexagons, as triangles, or as irregularly shaped elements. The maze is really a very general concept. It's really just a way of connecting a constrained network such that each element is connected to each other element by exactly one path.

A side-effect of this algorithm is, if you begin the process with the start node at the bottom of the stack, once the goal node is at the top of the stack (eventually it has to be if the maze has a solution), the stack contains the solution, from bottom to top. My code marks the elements of the stack with a number sequence indicating those nodes to be part of the solution, and in what order. However, this isn't relevant to this work: the solutions shown here were generated by the electron transport modeling in the semiconductor device modeler.

But once the abstract maze is connected, it needs to be mapped to "real space" for the simulation. So using the constructor functions in the structure editor, I defined polygons for each node such that the node was connected to the appropriate neighbors. Then I defined the semiconductor properties for the interconnected region, specified which models I wanted, and ran the simulation. Actually, constructing the maze took the most computer power. Solving it was quick: well under a minute for the larger of the two mazes shown here.

So all good fun. And it was effective at improving my Scheme skills. After this, designing my normal semiconductor device structures seemed simple in comparison.

Saturday, December 18, 2010

Low-Key party

Thanks to all for the great time at the Low-Key Hillclimbs party last night! And thanks to Sports Basement for giving us space to hold it.

It's a lot of work doing the slides for the awards, but I think it's really important to try and recognize all of the great contributions that both riders and volunteers make to the success of the series. Once again, despite not really trying, we raised money for the Lance Armstrong Foundation and the Open Space Trust. Each of these charities does great work, similar really. I view the Open Space Trust as fighting cancer of the land, while LAF fights cancer of the body. The two are really intertwined.

And a huge thanks to Strava for providing some wonderful prizes. We awarded this with a card game. I was a bit inspired by Charles Ardai's excellent book "Fifty-to-One", in which a very simple card game was played with very high stakes. We played a series of games which were closer to "one-to-one", until only two were left standing. Ron Brunner and Judy Colwell were the most skillful players, and took the prizes.

Low-Key and Strava are very much aligned spiritually. Both allow the "average" rider to compete, with a focus on hills, against others of similar speed. One of the big motivations for starting Low-Keys was to provide an on-line archive of climbing times over a range of local climbs, measured under controlled conditions, as previously climbing times were generally passed on by oral tradition. Strava of course takes this to a new level.

We announced the schedule for next year, and two highlight climbs are Mix Canyon Road in Vacaville and Palomares Road near Sunol. I've not ridden the former, but by all accounts it's one of the most difficult climbs in the Bay Area (although Bohlman-On Orbit-Bohlman actually rates higher with my scoring scheme). Nobody would describe Palomares as particularly difficult, but the route profile provides for plenty of opportunity for climbers to test each other. Shorter climbs are sometimes tougher than longer ones, as they provide no opportunity for recovery: you've simply got to push pain envelope every second of the way.

Another highlight: the vote for the 2011 series slogan. The winner, in a very close vote (24-19) was "Veni, Vedi, Ascendi". Second place was another excellent slogan: "Rise and Climb". I love both of these, but I wasn't disappointed in the winning slogan (on which I didn't vote), as I'd submitted it. It was the first time ever my slogan came out on top, and it was the only slogan I'd submitted which made it past the first round of on-line voting. (You don't need to see our permit crashed and burned... too bad)

But shorter term, as we've done a few times before, we'll be organizing the Megamonster Enduro Ride this winter: on 12 February 2011, weather permitting. This ride is the work of Kevin Winterfield, who organizes it as part of an annual trip out here from his present home in Connecticut. How great is that?

In case you missed the fun, or had difficulty seeing the slides in the bright light, I've put copies here:
  1. Competitive Awards
  2. Non-competitive Awards
  3. Final Slides
Now I just need to set up the web pages for next year... Expect the design to be similar to this year: I'm finally getting the bugs out of the 2010 Perl code!

Tuesday, December 14, 2010

re-cycling the Marin Headlands

Back in April I lamented the closing of the Marin Headlands for construction. Well, the construction was finally completed last month, and Sunday for the first time since then I rode the loop.

I've been sick for two weeks now: sniffling, hacking, and coughing has been epidemic at work, and after Thanksgiving it was my turn in line. So I've been feeling sort of crappy, riding as I'm able. Yet yesterday I motivated myself to try a loop of the challenging and beautiful Headlands. The last time I'd ridden to the Hawk Hill summit was September, when it had been unpaved, serene, and illegal. The chance to have ridden it without car traffic had been too much to resist. Now the pavement is done and yesterday, fearful of what I would observe, I set off.

Hawk Hill in September
Hawk Hill in September, during repaving.

The result: the pavement is pristine, as expected, which is nice, of course. And my fears of "improvement" were unfounded: there's been little "improvement" to degrade what had been, with the exception of tourist vehicles, a spectacular gem of a road so close to the city of San Francisco. There's a prominent traffic circle at the intersection of McCullough and Conzelman, a few pull-outs presumibly so slower moving (???) cars can allow others to pass, obviously improved guard rails, and sand bags on McCullough which seem to serve as a buffer for vehicles which drive off the road. All of this seems like the sort of infrastructure you'd expect to see on Alpine roads taken by long-distance travelers. The traffic on Conzelman, on the other hand, is virtually all tourists driving their rental-SUVs up the hill so they can admire the view and snap digital photos. And on McCullough most of the traffic is bicycles: there's not much reason for cars to drive there.

So my suspicion that this was all a pork-fest for the formerly Madame Speaker remains. As a result we all get to use those spectacular roads one less summer of our lives, and the economy is driven incrementally further into its chasm of debt. Oh, I forget, it's "stimulus". The new guard rails will generate all sorts of revenue for future generations, spurring a rebirth of American productivity.

Anyway, the loop is much nicer in this season of fall/winter than it is in the summer, anyway. The weather isn't that much different, and the tourists are much reduced. And nothing spoils a good road like cars.

Which is why the proper approach is to close it to cars. Create a pedestrian lane on the "view" side, a bidirectional bike lane on the inland side, and let people enjoy the beautiful, short hike to the summit and back. Oh, people would probably whine and complain about disabled access, and I'm sympathetic, but if disabled access requires maintaining vehicular access, then we should just convert the entire National Park trail system into paved vehicular roads. Such an investment would truly be "stimulus": simulating a little health and exercise, and substantially improving the tranquility of what should be a very wonderful place.

Saturday, December 4, 2010

Caltrain weekend baby bullet schedule

Another day on the Caltrain bike car (StreetsBlog)

Back in February I proposed a weekend train schedule for Caltrain, one which would make the train an attractive option for those traveling along the Peninsula on weekends. That schedule wasn't based on any estimation of actual resource constraints. Rather it was what I expected it would take to start to make a dent in the car traffic on 101 every Saturday and Sunday. That proposal was for express trains traveling north and south each hour, with two limited trains taking care of the secondary stations, also each hour north and south. Without service at least comparable to this, service which is typical of rail systems around the world excluding ours where we've sold our souls to the auto industry, those willing and able to drive will find themselves hard pressed to claim the train is the preferred alternative for travel subject to external time constraints.

JPB meetingI'm sitting next to Ammon Skidmore at a JPB meeting in 2009, where I argued for better weekend service. It was John's petition which really got things rolling, however. (Richard Masoner)

Well, John Murphy's petition and advocacy seems to have gotten the Joint Powers Board (JPB) over its considerable activation barrier and they've finally agreed to do an "experiment" of weekend "baby bullet" (express train) service.

Here's the new schedule.

Basically a train leaves San Jose @ 10:35 am and arrives in San Francisco @ 11:39, 32 minutes faster than it would have had it been a local (there's a cost of 2 minutes per stop; the baby bullet skips 15 stops, which should save only 30 minutes, but they apply some extra padding at the end of the local train schedule to improve on-time statistics, probably figuring anyone taking a local doesn't care about a few extra minutes here or there). The train then leaves again at 11:59, returning to San Jose where it arrives at 1:03 pm, the same 64 minute travel time it spent traveling northward. The exercise is repeated with a train leaving San Jose at 5:35 pm, spending 6:39 pm to 6:59 pm in San Francisco, then returning to San Jose at 8:03 pm.

Now I'm sure this sort of schedule is convenient for train crews. This whole exercise fits nicely into a single 10-hour shift with an unhurried 4-hour lunch break. But does it do anything to help passengers? Well, I suspect somewhat, but if I'm going to the peninsula I want to get there much earlier than the post-noon arrival times of the "morning" southbound, and if I lived on the Peninsula and want to spend a day in San Francisco I'd probably want to return home later than 6:59 pm: just one extra hour would give me time to get an early dinner, for example.

So really this will do nothing to substantially increase weekend demand for Caltrain. However, at least I hope it will demonstrate a latent demand for faster service, as passengers who would have taken the local take the baby bullets instead, resulting in even emptier local trains during these brief time periods. I'd love to be able to take an express south (doesn't much matter where, but Palo Alto works), do a ride in the Peninsula hills, then take another back home. And maybe that's enabled even with the late start. But none of the weekend group rides start much after 10 am, so I would have been oh-so-much happier had that early express train pulled out at 8 am than at a minute before noon.

Another option is to ride south from the City then get the afternoon northbound back in time for dinner. That seems like something worth trying once or twice.

So I'm glad things are, glacially, moving in the correct direction, but it's frustrating knowing that at the rate Caltrain changes, I'll be dead before we get anywhere close to the sort of rail service any resident of Europe takes for granted.

Wednesday, December 1, 2010

cat feeder FAIL

I live with three cats. Of the three, the older of the two males has food issues. He was found, nearly starved, as a kitten, and apparently learned from that harsh lesson to never take the future availability of food for granted. He has a special weakness for crunchies, which he loves. These have the further disadvantage of being calorie dense: he can consume a lot more of them before reaching stomach capacity.

So to keep him at a healthy weight it's important to control how much he gets. With this in mind, before leaving for a three-day mini-vacation back in October (which included some fantastic riding; okay, mandatory cycling content), it was time to break out the automated feeder.

The feeder has a reservoir of food connected to the outside world with a tube containing a rotating screw. The screw turns on when programmed to do so, channeling food down the tube, where it pushes open a one-way door and then falls into a feeding tray, where it is quickly consumed by enthusiastic kitties.

Normally programming this wonder of mechanical engineering is absolutely something I want to do at least a day early. It's important to make sure everything is working before trusting it with the cats' well-being. For example, sometimes it gets into a mode where it ignores a programmed dispense cycle. This is solved with a hard-reset followed by reprogramming, but obviously the cats don't know how to do this. Not yet, anyway (the female is quite clever, however: I wouldn't put it past her).

So after doing the hard-reset, I programmed it with two feeding cycles plus a quick "test cycle" to make sure it was working. The test cycle rotated the dispensing screw for the 10 seconds I requested, so I figured the unit was in working order. Here's what I wanted to program:

  1. on: 6:00 am
  2. off: 6:03 am
  3. on: 5:00 pm
  4. off: 5:04 pm

So a three-minute "morning snack" followed by a four-minute "evening meal". However, I made a mistake, something I didn't catch in any of the numerous times I reviewed my program:

  1. on: 6:00 am
  2. off: 6:03 am
  3. on: 6:00 pm
  4. off: 5:04 pm

The result? It all ended in tears:


Needless to say, the older male was a happy furry. And the several piles of vomited crunchies attested to what happens when a stomach jammed with dry crunchies is supplemented with water from the drinking fountain: absorb, expand, eject.

So note to self: always beta-test code, even if it's something as simple as a cat feeder.