Mount Moriah

Owen on the trail

Owen on the trail

A lot of things have happened since Katy and I tagged the top of our most recent 4000 footer. Most notably, we got married! After years of dating, a long engagement, and much planning, we finally tied the knot on June 12, 2010. It was a perfect ceremony, a whirlwind reception, and an incredible day. And it probably goes without saying that we’ve been busy over these last few months! When we originally looked at our summer and possible weekends that we could use for hiking, this past weekend was one of the few that was free. We actually had grand visions and tentative plans of doing a single day, half Presidential Traverse with Patty and Mike. However, when those plans fell through, we decided to knock off a single peak nearby instead: Mount Moriah.

Katy on the trail

Katy on the trail

On Friday night we threw a bunch of camping gear into the car and took off for the 3+ hour drive to the campground at Moose Brook State Park. The truth is that we almost didn’t go at all because my knee has been giving me some significant trouble over the past few weeks. Without a lot of other hiking opportunities coming up, though, I decided to give it a shot and see how it goes. Much of the ride was done in the rain, but when we arrived at the campground after 10PM, the rain had finally stopped. We set up our tent, and tried to get a small fire going, but most of the wood in the forest was very wet, and it was hard to find dry wood in the dark. We got a small flame going for a bit, but quickly retired to sleep after that.

Owen and Katy atop Mt. Moriah

Owen and Katy atop Mt. Moriah

By 10AM Saturday morning, we were at the trailhead for the Carter-Moriah trail in Gorham, NH and began the 4.5 mile trek to the top. The first couple miles of the trail were moderately steep but with a very persistent incline. We reached the minor summit of Mount Surprise just over an hour into the hike. After this, though, we quickly encountered some long sections consisting of large rock slaps that required some considerable scrambling to navigate. The trail was mostly dry which was fortunate because in wet conditions the rock slabs would have been much more difficult to scale. I say mostly dry, though, because we also encountered a few sections at the higher elevations of deep mud. All in all, it was a moderate hike and we reached the summit at about 1PM.

Katy's summit ninja jump

Katy's summit ninja jump

We ate our lunch at the peak and collected some cloudy views before heading back down the way we came. By that point my knee was quite swollen and sore but I made it down without too much issue. Throughout the whole hike we only saw two other groups on the trail, one of which asked if we were “knocking one off today”. Indeed we were! We were back at the car by 4PM and enjoyed an evening by the fire at the campground afterwards to conclude our trip.

With a busy rest of the summer ahead of us, it was good to get another mountain done. Hopefully we’ll find some time in the superior hiking months of September and October to knock off a few more!

Future Interrupted

I always thought of Java’s Future interface as a fairly elegant and effective way of dealing with asynchronous tasks. It’s lightweight, gives you a mechanism to check if a task is finished, allows you to block until the task completes and retrieve its result, and also provides a hook to attempt to cancel the task via interruption. When used in conjunction with the various thread pool services in java.util.concurrent package, it becomes a simple, yet powerful tool.

Yesterday, though, I discovered a subtle distinction about the semantic behavior of the Future interface that slightly diminishes its power. I found myself in a situation where I wanted to cancel a Future, but then still wait until its associated task has completed. Initially I thought this might be accomplished with something like this:

    // send an interrupt to the task's thread
    future.cancel(true);
 
    // block until the task is complete
    boolean finished = false;
    boolean interrupted = false;
    while (!finished) {
        try {
            future.get();
            finished = true;
        } catch (CancellationException ce) {
            // task has been cancelled, handle appropriately
            finished = true;
        } catch (ExecutionException ee) {
            // task completed with error, handle appropriately
            finished = true;
        } catch (InterruptedException ie) {
            // current thread has been interrupted, record and continue
            interrupted = true;
        }
    }
    // re-interrupt this thread if we've been interrupted
    if (interrupted) {
        Thread.currentThread().interrupt();
    }

Essentially, call cancel(true) on the Future in order to send an interrupt to the associated task’s thread. Then call get() on the Future in a loop to ensure that the task has properly handled the interruption and completed execution before proceeding. However, the above code does not work as expected. The problem is that once you call cancel() on a Future, the task’s thread will be sent an interrupt if it is running, but then the state associated with the task is completely cast aside. Subsequent calls to get() on the same Future will always immediately throw a CancellationException and there is no available mechanism to block until the task’s thread has completed handling the interruption and finished its execution.

The worst part about this is that it is not immediately clear from the javadoc for the Future interface that this is the actual behavior. The description of the cancel() method is very clear that if the task has not started, it will prevent it from starting, but if it has already started, it can make an attempt to “cancel” it via interruption of the task’s thread. Of course, since in Java interrupting a thread is only a suggestion for it to actually stop what it’s doing, there’s no guarantee about when or if the task will actually stop unless you handle the interruption properly. Therefore, I hoped that calling get() would wait for the computation to complete, and then throw a CancellationException if the thread was interrupted. After testing it and also digging through the Java source code for the Future implementation, I discovered that that is definitely not the case.

I struggled for a bit to come up with a reasonable alternative mechanism for accomplishing this behavior short of re-implementing my own thread pool and managing the threads myself. Fortunately, after speaking with a colleague, I was pointed to the beforeExecute and afterExecute hooks on the ThreadPoolExecutor. It takes a little more work then I had hoped, but using those hooks allows you to augment the functionality of ThreadPoolExecutor to achieve this type of behavior. I’ll leave the details of it up to you.

Anyhow, that’s my tidbit for the day. Be careful when playing with the Future!

4000 Footers Status

This post is intended to serve as a real-time status report of our quest to join the White Mountain 4000 Footers Club. Personally I’ve hiked probably more than a dozen of these mountains in the past, but this list will only contain dates and reports of instances where Katy and I hiked the mountain together. I will update it with links to trip reports as we continue to make progress.

Mountain Elevation (feet) Date of Hike
Mount Washington 6288
Mount Adams 5774
Mount Jefferson 5712
Mount Monroe 5384
Mount Madison 5367
Mount Lafayette 5260 10/04/2009
Mount Lincoln 5089 10/04/2009
South Twin Mountain 4902
Carter Dome 4832
Mount Moosiauke 4802
Mount Eisenhower 4780
North Twin Mountain 4761
Mount Carrigain 4700
Mount Bond 4698
Middle Carter Mountain 4610
West Bond 4540
Mount Garfield 4500
Mount Liberty 4459
South Carter Mountain 4430
Wildcat 4422
Mount Hancock 4420
South Kinsman 4358
Mount Field 4340
Mount Osceola 4340
Mount Flume 4328
South Hancock 4319
Mount Pierce 4310
North Kinsman 4293
Mount Willey 4285
Bondcliff 4265
Mount Zealand 4260
North Tripyramid 4180
Mount Cabot 4170
East Osceola 4156
Middle Tripyramid 4140
Cannon Mountain 4100 11/15/2009
Wildcat D 4070
Mount Hale 4054
Mount Jackson 4052
Mount Tom 4051
Mount Moriah 4049 07/24/2010
Mount Passaconaway 4043
Owl’s Head 4025
Galehead Mountain 4024
Mount Whiteface 4020
Mount Waumbek 4006
Mount Isolation 4004
Mount Tecumseh 4003 04/24/2010

Mount Tecumseh

Katy and Owen atop Mount Tecumseh

Katy and Owen atop Mount Tecumseh

After a long winter with many changes going on in my life, this weekend it was time to get back to our new constant. Katy and I checked off another mountain in our pursuit to join the White Mountain 4000 Footers Club. This trip was actually a very spur of the moment trip. Our weekends have been very busy lately and when I noticed that we had a free Saturday, and that the weather was supposed to be nice, I suggested that we make an early season trip to the Whites to check off the shortest and easiest mountain on the list: Mount Tecumseh. I knew the trail conditions might be tricky this early in the spring, but after some minor deliberation, we finally decided “why not?” and were on the road at 8AM this morning to make the 2 hour ride to the trail head.

Katy on the trail

Katy on the trail

Mount Tecumseh is home to the Waterville Valley ski area and as such, the trail head is actually at the ski area parking lot. Not being a skier at all, I’ve never been to Waterville Valley but it turned out to be a really nice ride through the valley once we were off the highway on a perfect spring morning. With the busy winter ski season over, it was a generally empty road all the way to the mostly deserted ski area, with only a few other hikers’ cars in the lot. By 10:30AM we were on the trail under clear skies and temperatures in the 60’s. The first mile or so was an easy ascent on a dry trail with a few easy river crossings. Once we reached the higher elevations, though, the trail was essentially completely covered in a foot or so of hard packed snow. We barebooted all the way to the top without too much trouble, only some slipping, but microspikes probably would have been helpful on the way up. We, of course, didn’t have any. We passed several groups on the way up, some wearing microspikes, some not. We reached the summit two and a half miles from the trail head in good time, just before noon, and stayed awhile to eat our lunch.

Katy's ninja pose at the summit

Katy's ninja pose at the summit

I thought the trip down would be a little tricky with the snow pack on the trail, but I actually found it very easy to boot right down. Katy’s descent tactics were pretty amusing, though, as she seemed to be in a semi-controlled slide for most of the top half of the trail. We made very good time on the way down; it probably didn’t take us much more than an hour, and we were back at the car a little past 1:30PM. We stopped for some food on the way back home, and were back around 5PM.

Fun and easy five mile hike. Perfect weather. Great company. Just what I needed.

What’s Next?

So what’s next for me? I’m happy to say the initial trauma of being laid off is gone, but not without sentiment. Sun Microsystems is the first company that I worked for as a fresh, green college graduate, and I like to think that my experiences there took a very unique path. I started off as a QA Engineer, automating tests for hardware products used directly by paying Sun customers. From there, I transitioned into a tools developer role, developing and supporting an automation framework used by the rest of the QA team(s). My “customers” while in that role were all internal Sun employees. Finally, I moved into Sun Labs on the Project Darkstar team, where technically, as a research project, we didn’t have any customers. In practice, though, we provided direct support to users through the open source community. While going through it all, it seemed like a very natural progression for my career; but looking back, I realize that it’s a real valuable trifecta of experiences that not many are fortunate enough to claim.

It was very hard for me initially when Project Darkstar was canceled; it was more than just the obvious emotions that come with losing your job though. There’s one other experience from my past that I can compare it to. The circumstances were different, but the feelings and the emotions were eerily similar. For four years while at RPI, I was a member of the track and field team. It was more than just an extra-curricular for me, though, it was my primary focus. I was a highly competitive, contributing member of the team, and was one of the team captains in my final season. Each of the four years that I was there, we won the NYSCTC outdoor state track and field championships; I felt like I was part of something great. The 2005 ECAC championships was my final track meet in my collegiate career. Even though I knew going into it that the meet would be my last, I was not prepared for the emotions that I would feel afterwards. For four years I was part of something great, and just like that it was over. I still remember lying in bed that night, surprised at my own tears.

With Project Darkstar, I also felt like I was part of something great. Not only was it a great project, not only were we driving towards a goal that had never been achieved before, but we were also a great team. There were such a unique set of personalities on that team that all meshed together to form a sum greater than its parts. Not only that, but we were nestled inside of Sun Labs, which is probably one of the smartest collection of people you’ll ever find. The way that it was all torn away from us, so harshly and abruptly, and when we were so close to our goal, is what made it so difficult. Once again, I had established my place in something that was great, and just like that it was over.

It’s time to move on, now, though. If I’ve learned anything from my past it’s that there’s always something great waiting in my future. I’ve accepted a new position as a software engineer at Nokia and am actually very excited to begin work on Monday. I’ll be working on some scalable caching and indexing infrastructure for their service platforms, and am looking forward to a new and interesting challenge. I also plan to continue working on Project Darkstar’s successor, RedDwarf Server in my own personal free time. I obviously expect my available time to devote to that effort to be considerably more limited than it has been, however.

Things are looking up, and I’m looking forward to my next great thing.

Oh LaTeX how you taunt me

Here’s a good one. Since I’m currently unemployed and looking for a job, naturally I’ve been sending resumes out. I’ve used LaTeX to generate my resume for years now, and it has always worked out quite well. However, today I had a need to print out my resume, and when I did, I noticed that the font seemed slightly too small, and that the right margin seemed a bit too big. It looked fine on the screen in my PDF viewer, but not on the physical printout. Hmm. As it turns out, I accidentally generated the PDF file with A4 size paper and all of the electronic versions I have sent out thus far have been this A4 version. Grrrr!

I must have come across and handled this issue before, but at least on my Ubuntu installation, PDF documents generated by sequential latex, dvips, and ps2pdf commands default to A4 size paper. In order to get the correct US style letter paper, I have to explicitly use the “-t letter” option in dvips. After rooting around a bit, the command “texconfig paper letter” has changed my default system paper size for dvips, dvipdf, xdvi, and hopefully I’ll never make this mistake again!

P.S. Metric system? One day we will give in to your logical structure and simple unit conversion. Clearly, though, that day is not today.

Still Playing Ultimate

Repeat visitors to this blog may be wondering: what happened to my frequent ultimate frisbee status updates? Well, the status updates may have petered out, but that doesn’t mean I’m not still playing. I’m still very much attending the regular Monday, Wednesday, and Friday lunchtime pickup games in Burlington. It’s business as usual in that department. In fact, I’m kind of regretting not signing up for the BUDA winter indoor hat league that’s currently underway in Milford. It’s probably for the best that I missed the boat on that though as while I really loved playing in that league the previous times that I’ve done it, that indoor turf can be pretty brutal on the knees and feet.

Anyhow, one other bit of ultimate news is that Walter Fredrick Morrison has died at the age of 90. Morrison is regarded as the “father of the frisbee”. And to reinforce the notion that the sport is dominated by geeks, the story was picked up by Slashdot and hit the front page a couple days ago.

I always thought that Marty McFly invented the frisbee in 1885 though…

RedDwarf

As I mentioned previously, I do intend to continue working on Project Darkstar part-time at least while I search for new employment opportunities. Not only will it allow me and whoever else is interested push along the original goals of the project, but it will also give me a perfect place to keep my skills sharp while I’m out of work. Selfless and selfish reasons, molded into one. However, it does not seem appropriate to continue working using what are now Oracle’s resources and contributing code to Oracle’s official repository. Not only are there questions about outside contributions, but there are also no guarantees about how long Oracle’s official repository will remain active. So I am going with an equally reasonable and open-source-y alternative.

I have established what I hope will become an official community fork of Project Darkstar. This fork will go by the name RedDwarf and is hosted as a sourceforge project. I cannot take credit for the new name, as it was dreamt up by the original instigator of Project Darkstar at Sun Labs (Jeff Kesselman), but I do hope that it will become an even more well known name than Project Darkstar ever was in the games industry. So without further adieu, here are the new community guidelines:

  • The sourceforge project is used to host what were once three separate projects on java.net. The reddwarf-server, reddwarf-shared, and reddwarf-java-client all live in the same subversion repository, but under completely separate sub-trees, each with their own trunk, branches, and tags.
  • The development process should remain largely unchanged from Project Darkstar. All commits to any trunk repository must undergo a thorough review by at least one other committer, and commit privileges are earned. Review requests should be sent to the mailing list: reddwarf-develop on sourceforge.
  • All design, support, and informational documents should go in the Trac instance hosted at sourceforge.
  • All issues and bugs should be filed as a ticket in Trac.
  • Forum discussions should continue as usual on the sourceforge hosted forums.
  • Releases will be done periodically as appropriate. All releases will be published to the central Maven repository rather than the java.net Maven repositories. (This is my first task and may take some time). They will also be published as files for download on the sourceforge site.

Progress will be much slower than before, but I think it’s very important to maintain the structure and code quality standards that we had established as a fully funded project. Will anything come of this effort? I’m not sure. But I think it’s the best chance for coordinated progress to continue with Project Darkstar.

Shocking News

It’s been a while since I posted anything on this blog, and I wish my return was the result of better circumstances but no such luck: my position at Sun Microsystems has been eliminated, and as a result I have been let go. It is ironic that the European Union’s lengthy delay in approving the Oracle-Sun acquisition gave the Project Darkstar team and community such a long, uninterrupted stretch of time to make some unbelievable progress towards our goals. However, once the deal did finally close, the decision had already been made that Oracle will discontinue investing resources in the project, and so here I am: newly unemployed.

I must say that the shock and disbelief of learning that you’ve been laid off is a predictably emotional time. Of course I didn’t think it would happen to me, but it did: proof that job security is all but an illusion. They say losing your job is like dealing with any other type of loss, which is absolutely true. Knowing this doesn’t make it any easier though. Despite this difficult situation, however, I have received nothing but support from my family, friends, colleagues and even people who were previously just casual acquaintances. Thank you to everyone who has been there so far; I know for a fact I’ll come out the other side of this a strong person.

As for my future, and the future of Project Darkstar? Well both are uncertain. I have already started ramping up and preparing for a full scale job search in the hope that I will find something even better than the best job I’ve ever had. In terms of Project Darkstar, a core group of former members of the team have already started exploring alternative ways to keep the project going. This includes both potential for-profit and volunteer efforts to carry out the original mission objectives laid out years ago. At the very least, after getting myself organized, I personally intend to continue working on the project on a part-time basis during my job search and hopefully beyond. More details to come…

Cannon Mountain

Owen and Katy atop Cannon Mountain

Owen and Katy atop Cannon Mountain

For several weeks, now, Katy and I have been hoping to knock off another 4000 foot mountain in our goal of hiking all of New Hampshire’s 4000 footers. With winter closing in, there aren’t too many weekends left before we would likely be hiking on a snow covered trail. With the recent unseasonably warm temperatures here in the Northeast, though, we planned a quick day hike up Cannon Mountain for this past weekend. Cannon Mountain is “across the street” from Mounts Lafayette and Lincoln, our first conquest, and is home to what once was the iconic Old Man of the Mountain. There are several routes up it, but we chose to start our ascent from the Lafayette Campground on the southeast side of the mountain.

The quality of the weather for this trip was in doubt right up until we took our first step on the trail. A significant rain event was forecast for all day Saturday and into Sunday morning, but it was unclear when things would clear out on Sunday. We were feeling optimistic, though, and were up before sunrise on Sunday and began the two hour ride to Franconia Notch in the dark and in the rain. By the time we reached the trailhead, the rain had stopped and patches of blue sky were trying to break through the low clouds and the fog. Things were looking up and we were on the trail at 8:40AM.

Katy navigating through some serious boulders

Katy navigating through some serious boulders

Even after deciding to start our hike from Lafayette Campground, there were still a number of interconnecting trails that could get us to the top of the mountain. On the way up, we hiked all the way out past Lonesome Lake via the Lonesome Lake Trail and continued our ascent up this trail to its northern terminus where it met the Kinsman Ridge Trail. The Lonesome Lake Trail was well maintained with a reasonably moderate grade as we ascended about 1700 feet of elevation in 2.3 miles. From there, we followed the Kinsman Ridge Trail to the summit. The most technically challenging and steepest part of the climb was definitely the section between the end of the Lonesome Lake Trail and the junction with the Hi-Cannon trail (about 0.4 miles from the summit). In this section we went up about 500 feet of elevation in less than half a mile, requiring quite a bit of scrambling over large boulders and roots. We reached the top a little bit after 11:00AM.

Katy doing a Matrix style pose at the summit

Katy doing a Matrix style pose at the summit

There’s a tramway and ski area on the opposite side of the mountain that we hiked, so the summit is fairly well developed with an observation tower at the peak. It was warm, even at the top of the mountain, with temperatures in the 50’s and we were able to enjoy at least some partial views with clearing skies and mountain tops peaking out of the clouds to our north and west. It was quite a bit of a different feel than our early October hike with fall foliage nearing peak season. This time around the trees were bare with evergreens peppering the mountain sides. There wasn’t much to see to the south and east, though, as some low, stubborn clouds had settled in, obscuring the views over to Lafayette and the Franconia Ridge. We hung out at the top for a while and ate our lunch before heading back down.

Owen overlooking Lonesome Lake on Hi-Cannon Trail

Owen overlooking Lonesome Lake on Hi-Cannon Trail

On the hike down, we decided to take a slightly different route. Instead of going down the steepest section of the Kinsman Ridge Trail to Lonesome Lake Trail, we decided to take a left turn at the Hi-Cannon trail. This trail was narrower and seemed a little less traveled. We had to deal with some quite steep sections of long, slippery rocks, including one ledge that was so impossibly steep that a ladder was constructed to assist hikers. Some trail descriptions peg the middle portion of this trail as the most difficult trail on Cannon Mountain. There were several neat lookout ledges along the route overlooking Lonesome Lake with views down the notch. The Hi-Cannon Trail met up with the Lonesome Lake Trail less than a half mile from the trailhead and we arrived back at the car at 1:40PM. Total time was about five hours round trip for six miles of hiking including our extended break at the summit. We drove back home, stopping for some food along the way and were back home before 6PM from a quick, but satisfying and enjoyable trip to the Whites with Katy.

For those keeping track, that’s 3 down with 45 to go!