June 30, 2008

Simultaneous Development with Maven

Migrating Project Darkstar from Ant to Maven for our builds has been a mostly positive experience. Now that the migration is complete, though, and the team is beginning to use it more extensively, we're still working out a few problematic use cases. One such scenario just came up today. Here's the problem:

Let's suppose you are doing development against the Project Darkstar server. As part of your mini development cycle, in addition to running the unit tests against the server, you also want to run an example application specifically designed to provide performance benchmarks for the system. By convention, this application would specify as a dependency the latest 'SNAPSHOT' of the Project Darkstar server (in this case the latest snapshot is 0.9.7-SNAPSHOT). In order for the example application to be run against your SNAPSHOT, though, you need to build the server component which includes the changes made in your development branch, and install it into your local repository. This is straightforward to do and requires basically an mvn install from your development branch. Running the example application will then pick up your latest SNAPSHOT from the local repository, and all is well.

However, what if you wish to compare the results of running this example application against both your development SNAPSHOT, and also the latest SNAPSHOT from the trunk. If you execute mvn install from these respective codebases, they'll clobber eachother because they both have the same version number (0.9.7-SNAPSHOT). The problem is exacerbated even more if you have multiple development branches that you are working on simultaneously. You can workaround it by rebuilding each copy before running the example, but this is tedious and error prone. You could also make temporary changes to the version numbers of the artifacts by hacking your POMs so that each development branch has a unique version. This is also tedious and error prone, though, and is ugly because it requires reverting changes to your POMs before merging patches into the trunk.
Ultimately, we want a solution that meets the following requirements:
  • Modifying the POMs or assigning temporary version numbers is not necessary.
  • It does not require rebuilding each development version as they are needed.
  • Ideally, a simple configuration parameter on the command line is all that is required to specify which development version we wish to use.
The solution that I came up with is actually surprisingly simple. All that you need to do is isolate each of your development versions by using separate local repositories. By default, Maven stores artifacts into a local repository located in the ~/.m2/repository directory. However, this location is configurable, and a different location can be swapped in and out depending on your needs.
To put this into the context of our example, let's say you have a checked out version of the Project Darkstar server trunk, and you also have two development branches that you are working on, branchA, and branchB. You would then do the following to install each of the respective artifacts into separate local repositories:
trunk $ mvn install -Dmaven.repo.local=/home/owen/.m2/repository-trunk
branchA $ mvn install -Dmaven.repo.local=/home/owen/.m2/repository-A
branchB $ mvn install -Dmaven.repo.local=/home/owen/.m2/repository-B
At this point, you have local repositories which are completely isolated from eachother. You can use each one of them independently to build and/or run your example application against the respective development version of the Project Darkstar server:
example $ mvn package -Dmaven.repo.local=/home/owen/.m2/repository-trunk
example $ mvn package -Dmaven.repo.local=/home/owen/.m2/repository-A
example $ mvn package -Dmaven.repo.local=/home/owen/.m2/repository-B
That's it. No POM hacking, no building and rebuilding the same code, just isolate your development versions with separate local repositories. Hope this helps someone out there.

Ultimate Air

Monday June 30, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 89 F, Mostly Sunny, Humid
Field: dry
Perfect conditions for Ultimate.

Another brutally hot and humid day, but that, of course, does not stop us!

Ultimate Statistics (since January 2008):
Total Games Played: 64
Total Hours Played: 75

June 27, 2008

Ultimate Muggy

Friday June 27, 2008
12PM Pick-up game
TRW Field, Burlington, MA
Weather: 83 F, Partly Cloudy, Muggy
Field: dry
Perfect conditions for Ultimate.

For some reason we're having a hard time getting good numbers for our Friday games this summer. A lot of people must be ditching out on work and going to the beach instead. Nevertheless we played a decent 3v4 game in the heavy, mid-day air.

Ultimate Statistics (since January 2008):
Total Games Played: 63
Total Hours Played: 74

Ultimate Intern

Wednesday June 25, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 80 F, Mostly Sunny
Field: dry
Perfect conditions for Ultimate.

Great game on Wednesday. We had a full turnout, playing 7's with multiple subs on each side. David, interning with the Project Darkstar group for his third summer, also came out to play.

Ultimate Statistics (since January 2008):
Total Games Played: 62
Total Hours Played: 73

June 24, 2008

Ultimate Humid

Monday June 23, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 70 F, Showers, Muggy
Field: wet
Perfect conditions for Ultimate.

I wasn't sure if we were going to have enough for a real game today but we ended up with 7 total for a decent 3v4 game in the rain.

Ultimate Statistics (since January 2008):
Total Games Played: 61
Total Hours Played: 72

June 22, 2008

Ultimate Showcase Series

layout Today Katy and I went to see The Ultimate Showcase Series championship games at Dilboy stadium in Somerville. The event is a series of games put on by BUDA over a month long period featuring elite level ultimate players from the Boston area. Every player in the showcase has competed at either Collegiate Nationals, US Nationals, or the World Championships. We went to the same event last year and both times it was very cool to see some really high quality ultimate (including numerous layout grabs, layout blocks, and leaping catches). The action shot to the left is from today's game.

June 20, 2008

Ultimate Turnout

Friday June 20, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 75 F, Mostly Cloudy
Field: dry
Perfect conditions for Ultimate.

Big turnout today of 19.

Ultimate Statistics (since January 2008):
Total Games Played: 60
Total Hours Played: 71

Ultimate Slide

Wednesday June 18, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 75 F, Sunny
Field: dry
Perfect conditions for Ultimate.

Ultimate Statistics (since January 2008):
Total Games Played: 59
Total Hours Played: 70

June 16, 2008

Ultimate Throws

Monday June 16, 2008
12PM Pick-up game
TRW Field, Burlington, MA
Weather: 65 F, Showers
Field: damp
Perfect conditions for Ultimate.

Low turnout today but we managed to get 4's by the end of the game.

Ultimate Statistics (since January 2008):
Total Games Played: 58
Total Hours Played: 69

June 14, 2008

Battlestar Galactica: "Revelations"

Colonel Tigh[WARNING, the following contains spoilers and plot information for the June 13, 2008 episode of Battlestar Galactica, "Revelations"]
Wow.
I've never actually written a review of a television show or a movie, but after watching last night's episode of Battlestar Galactica (the mid-season 4 finale), I felt compelled to share my thoughts. It was about a year ago that I first started watching the show, catching up on the first two seasons via Netflix, and watching season 3 via various online resources (including streaming episodes at scifi.com and hulu.com). Right from the get-go I was hooked. I've always been a fan of science fiction, but Battlestar Galactica takes the genre to an entirely different level.
What about last night's mid-season 4 finale, though? One of the complaints about a serial drama series, is that sometimes there are episodes that are laborious to watch. This has been my feeling throughout many of the episodes of season 4 to date. Several were clearly setup episodes that were begging for a payoff further down the line. Well payoff they did. Easily the best episode of the entire series thus far, "Revelations" is one of the most badass hours of television you'll ever see. Let's start from the top:
D'Anna's standoff
When the Three's were unboxed last week in "The Hub," we knew the identities of the four cylons in the fleet had to be revealed to the others soon. Well right off the bat, D'Anna initiates a cataclysm of events that sends us right down this path. Declaring the members of the colonial fleet on the base ship her hostages, she visits Galactica and informs Lee that she will release the hostages as soon as the final four cylons have joined them on the base ship.
I love the subtleness of this scene. With Tigh, Tory, Anders, and Tyrol all present on the hangar deck, D'Anna says that "she's already been in contact with the four, and will be awaiting them on the base ship." Giving the impression that she's using some kind of secret cylon communication protocol, she's actually just contacting the four of them directly on that floor. Predictably, Tory finagles her way onto the base ship with some story about Roslin needing her medication. It is the reaction of the other three, though, and especially Colonel Tigh that makes this scene so riveting, and sets up the rest of the episode.

Tigh comes clean
The development of Colonel Tigh has been nothing short of awesome throughout this series. The irony of his character is that once he found out that he is a cylon, his transformation was overwhelmingly positive. Gods damn if he's a cylon, he's going to do his duty as a member of the colonial fleet. This is a far cry from the alcoholic train wreck that we saw in seasons 1 and 2. Well "Revelations" gave us the ultimate scene of his transformation.
When D'Anna begins executing hostages when the remaining three cylons have not been given up, Tigh sees it as an opportunity. He comes clean to Admiral Adama, revealing that he's a cylon, and suggesting that they can save the fleet, by threatening to blow him out an airlock. Surely, D'Anna won't risk losing one of the final five. The execution of this revelation scene is nothing short of spectacular. Tigh is stoic in his confession. He's a cylon, he knows it, and gods dammit he's still loyal to Adama and still wants to save the fleet. Adama's reaction is brilliant and believable: denial, then anger, then uncontrollable grief.

Lee's coming of age
The writer's of the show have done well to keep Lee Adama always somewhat in the shadow of his father. He somewhat broke out of this mold with his actions at the end of season 3 and his unbelievable monologue at Baltar's trial. But with his handling of the fallout from Tigh's confession, he finally establishes that he can stand on his own, and it is him that comes to his father's rescue in his moment of complete despair. I admit that while I was fairly sure the writers wouldn't kill Tigh off the show (his character is too good to lose), I wouldn't have been too surprised if Lee actually had airlocked Tigh when he took complete charge of the hostage situation.

Starbuck's revelation
Starbuck's plot thread has been the most mysterious of season 4. "Revelations," however, gives us a potential answer to those ominous words uttered by the hybrid in "Razor": "Kara Thrace will lead the human race to its end. She is the heralder of the apocalypse, the harbinger of death. They must not follow her.” What does this mean? Starbuck has been obsessed with Earth ever since she came back from the dead. Does Earth have something to do with it?
Starbuck is the one that returns with the mysterious Viper, and now we find out that the Viper was the "on switch" for the final four cylons. It was what held the path to Earth all along, and now Starbuck makes this revelation after Anders, Tyrol, and Tigh are drawn to the Viper after hearing that music once again. Heralder of the apocalypse? She ultimately brings them to Earth, and Earth's fate? an apparent apocalypse indeed...

Earth
I was very surprised that the fleet made it to Earth in this episode. They were only one jump away? Who knew? The penultimate scene, where the crew and the fleet celebrate the end of their journey is fitting and brings appropriate closure to this aspect of the story. The truce with the cylons? Believable, and the brightest injection of hope in the darkest season of the series. In fact, even with so many plot threads left unanswered, there was a feeling of satisfaction with this scene that they could have almost ended the series right there. Not that I would have wanted that, but it wouldn't have been a horrendous ending to the show (say if the writer's strike had killed the series).

The shocker
Thankfully, the show, and the series doesn't end with the fleet's arrival to Earth. In the last minute of the episode, we see Adama and many of the others standing on Earth, looking at an apparently demolished wasteland of what once was New York City. Wow...
So where do they go from here? This episode was incredibly satisfying and yet raises a ton of new questions, and still leaves many unanswered. What happened to Earth? Is this even Earth? Who is the final cylon? Where did the final five come from? What happened to Boomer and the 1's, 4's and 5's? Will Roslin survive her cancer? Will the truce between the humans and cylons hold up? Will they colonize Earth, or move on? There are so many more. I just hope that next season (or is it season 4.5?) delivers the finality that this outstanding series deserves.

So say we all.

Ultimate Uneven

Friday June 13, 2008
12PM Pick-up game
Rahanis Field, Burlington, MA
Weather: 80 F, Sunny
Field: dry, rocky, and soft
Perfect conditions for Ultimate.

I'm not sure what they did to Rahanis field but the surface was horribly soft and uneven for yesterday's game. It looks like they attempted to add some additional soil and grow some new grass with terrible results. We probably won't be playing there again for a while until they get that field straightened out.

Ultimate Statistics (since January 2008):
Total Games Played: 57
Total Hours Played: 68

June 12, 2008

Ultimate Cooler

Wednesday June 11, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 85 F, Sunny
Field: dry
Perfect conditions for Ultimate.

Apparently there was a lunchtime conversation on Monday about the fact that Keith and I were outside playing Ultimate when it was nearly 100 degrees. The perfectly reasonable explanation for me being out there? Young and stupid. Keith? Well...

Ultimate Statistics (since January 2008):
Total Games Played: 56
Total Hours Played: 67

June 9, 2008

Ultimate Heat

Monday June 9, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 95 F, Sunny
Field: dry
Perfect conditions for Ultimate.

Today was the first really brutally hot day to coincide with an ultimate game. Nevertheless, there were still 15 others at least as crazy as me out there.

Ultimate Statistics (since January 2008):
Total Games Played: 55
Total Hours Played: 66

June 6, 2008

Ultimate Hungry

Friday June 6, 2008
12PM Pick-up game
TRW Field, Burlington, MA
Weather: 58 F, Showers
Field: wet
Perfect conditions for Ultimate.

Another rainy game. Summer officially arrives tomorrow as it's supposed to be 40 degrees warmer than today.

Ultimate Statistics (since January 2008):
Total Games Played: 54
Total Hours Played: 65

Ultimate Rain

Wednesday June 4, 2008
12PM Pick-up game
Mitre Fields, Burlington, MA
Weather: 60 F, Rain
Field: wet
Perfect conditions for Ultimate.

Wednesday was my first game back after the tournament over the weekend. It was a small, rainy game but definitely necessary to shake my legs out.

Ultimate Statistics (since January 2008):
Total Games Played: 53
Total Hours Played: 64

June 2, 2008

Ultimate Tournament

Sunday June 1, 2008
9AM BUDA Spring Hat League Tournament
Mitre Fields, Burlington, MA
Weather: 78 F, Mostly Sunny
Field: dry
Perfect conditions for Ultimate.

Despite barely having enough people for a full team, yesterday's BUDA tournament was tons of fun. Playing with almost no subs for much of the day, though, we didn't quite have the legs to make it to the finals. Nevertheless, an eight hour frisbee-playing marathon is always a great way to end yet another hat league season.

Ultimate Statistics (since January 2008):
Total Games Played: 52
Total Hours Played: 63