Monday, October 10, 2011

A year like no other

Today is a significant marker in my life, the first anniversary of the passing of my mother-in-law. Her death was sudden and I was unprepared for it. While shocked and sad, after the week of mourning was over, I expected life to return to normal quickly. In many ways it did, but in retrospect I'm amazed at how much flux there was throughout the following year.

In hindsight, I now see how depressed I was for several months after her death. It feels silly to say that, since I'm generally a happy person. The idea of me being depressed for a day let alone a month feels very out of character. But I was and it affected the decisions I made and blurred my focus, both personally and professionally. I've been searching during most of the past twelve months and it took a while to find myself again, as my wife has so patiently endured.

My productivity at work took a nose dive for a while, partially because I became extremely disinterested in what I was working on. My disinterest led me to entertain notions of leaving ESPN. As the old cliche goes, I started thinking about what I wanted to do with the rest of my own life. I considered starting my own company and began working to that end. Around the same time I was contacted by Zynga, best known for the Farmville and Mafia Wars games on Facebook. I was flattered but the idea that I'd pickup my family and move seemed a bit crazy, so my thoughts turned to, "well if I'm really considering this, what is exciting in the network of people I already have and commutable?" This led to a string of interviews in the city at some great places like GetGlue and foursquare.

The interesting thing is that these interviews, while they didn't lead to job offers they led to other interviews. My interview at foursquare led to an interview at a stealth-mode startup. And that interview led to another interview where I got an job offer. In the end I didn't accept that offer but it's been a surreal ride to experience how the NYC tech startup scene works and how tightly-knit it is. The connections I've made have been pretty amazing, and I hope they will end up helping me someday when I start my own company. But that's for another year...let me continue.

While all this was going on, I got an interview request from Apple. That ride took me from a clandestine interview hidden away in a New York hotel, to a trip to the Cupertino mothership, all the way to a job offer that nearly turned my family's world upside-down. We were "this" close to uprooting my wife and kids to the Bay Area, a continent away from everything we had ever known. In the end, leaving everyone we had ever known was too great a hardship to accept, and that was one of the biggest lessons I learned this year. I took me quite a few extra months to learn it after I began reflecting on my own mortality, but for me, family and friends are too important to allow ambition to pull me away from them. I would have loved to have worked at Apple, lived in California, and have that notch on my resume, but I love seeing my kids playing with their grandparents more.

So though my path doesn't lead to One Infinite Loop, it doesn't mean my ambition has ended with that journey. I can take an East Coast path to get where I want to go. Amazingly, it looks like that path stays at ESPN. On the exact same day, actually in the same hour that I got my offer from Apple, I got news that ESPN wanted to create the role for me that I had been asking for for years, as a build engineer. I started that new role last week, and I haven't been this happy professionally in a while. It's exactly where I want to be right now, which brings me to my second cliched lesson, everything happens for a reason. If things had played out differently, I would not have been at ESPN to accept the new role.

With all that happened, Joanne hasn't been out of my thoughts for very long. I miss her, and I hope she is at peace. I know that right now, I am too.

Thursday, September 15, 2011

Simplifying logging with Maven and SLF4J (Part 2)

So in my previous post I explained how to simplify your logging with Maven and SLF4J. If you haven't read it yet, please do before reading more.  Since then I've discovered an easier and cleaner way to remove the secondary frameworks from your Maven dependency tree.

Here's a revised overview of the steps:

  1. Decided which logging framework will be your primary, aka who will actually write to your log file.
  2. Define the dependency scope of all the secondary frameworks to be 'provided'.
  3. Configure your project to depend on drop-in replacements of each secondary framework from SLF4J.

Define secondary frameworks as provided


Use the dependencyManagement section for this. Its used when you might have a dependency transitively.

Add dependency on SLF4J

Add the following to your pom.xml

Conclusion


So now in only 3 steps you can redirect all your logging to your primary logging framework without changing a line of code!

Thursday, August 11, 2011

Newly open source

Well its about 10 years too late for some of this stuff but I figured I'd open the source to my dead projects I have lying around. Some are pretty raw, like my flocking applet from a college course, while others are completely functional and dare I say beautiful code, like my X10 Java library.

  • FlockingApplet - a graphical applet that simulates the flocking behavior of birds.
  • handlecheck - a web app that searches the web to see if your favorite username is taken.
  • gwt-common-widgets - a collection of Google Web Toolkit widgets
  • x10-java - a Java library for home automation.

Thursday, July 28, 2011

Parental Controls - The V-chip of 2011

I've done something that I swore I'd never do, I've set ratings limits on my TV. As a kid/teen/young adult I swore I'd never use the V-chip on my kids. My thought was, how can you not be around to see what your kids are watching that you need to lock down your TV!? Now with the wisdom of 5 years as a parent, I can't watch my kids every second of the day, and for that 30 seconds I leave them to go to the bathroom, they somehow always turn on Wanted or 300 or Zombieland or _____(fill in the blank with a rated R movie I own). My 20 year old self would be very disappointed, but my 33 year old self says "You don't know what you're talking about." (P.S. He'd totally be geeking out our setup at my house though with our iMac-based home media server with 150 GB of movies played via a settop box (AppleTV) on an HDTV. 1998 Brian thinks that's AWESOME!)

Wednesday, February 02, 2011

Best Practices with Maven: Versioning your Artifacts

I realized today that I had made this nice flowchart about two years ago of how I decide when to add qualifiers and increment version numbers, but I never shared it anywhere very useful.

This is heavily based on the version numbering scheme that Maven inherently understands. You should also checkout the excellent versions plugin for Maven that include some great utilities for upgrading your plugins and dependencies.

Tuesday, February 01, 2011

TeamCity build triggering by GitHub

So I started using GitHub for a side project and discovered their very cool feature of service hooks. A service hook allows a repository administrator to setup a callback to another service when a commit is made to the repository. For example it can send an email, or chat a message via Jabber.

Now continuous integration servers, like TeamCity, can poll source control systems every few minutes to see if any changes have been committed. But wouldn't it be more efficient to use a service hook to trigger a build?

Looking at GitHub's service hooks, there wasn't one already available to callback a TeamCity server, but right on that same page was a link to the open source repository for GitHub Service Hooks. They "eat their own dogfood" so to speak and make it very easy to contribute new service hooks back to them. So I took an evening, did my first Ruby coding in a while which included more time getting Ruby setup and working on my Macbook than actually coding. In a few hours I had committed a TeamCity service hook to my fork of the project and requested them to pull the changes from my fork.

After just a few hours the pull was completed and the changes were in production, wow! Turned out I had a few bugs and it took some back and forth to get it all ironed out, but its now available as a working service hook at GitHub!

How to use the TeamCity service hook
Begin by creating a new account on your TeamCity host. Since this account will be used to kick-off the builds, its best to name it something like "GitHub Service Hook" so your developers will understand the build history when they see "Triggered by GitHub Service Hook". Note the username and password you create as it will be used later.

Next, navigate to your GitHub repository and look for the Admin button and click it.



Select "Service Hooks" from the left sidebar.



Select "TeamCity" from the submenu.


In the form that appears, enter
  1. the url to your TeamCity server (which can contain a path in the url if you run it on a shared host).
  2. the build type ID which you can find in the address bar when you are on TeamCity and looking at the build you want to trigger (ex. "...?buildTypeId=bt123&...", in this example the ID is "bt123").
  3. the username of the GitHub Service Hook user you created.
  4. the password of the GitHub Service Hook user you created.


Once you press "Update Settings", the page will refresh and you should see the "TeamCity" sub menu item change to have a green dot.

If you select "TeamCity" again, the form will reappear with a new "Test Hook" button. Press this and it will manually trigger the build with the information you entered.

The next time you push new commits to your GitHub repository, GitHub will trigger your TeamCity build!

Friday, January 28, 2011

25 Years, A Moment in Time

"Daddy, what happened?"
"It blew up, honey."

My sister was five and she was the first speak. I was seven and knew I was going to be an astronaut. We were in Florida on vacation and the shuttle was supposed to launch while we were there. My awesome parents drove us from our condo in North Palm Beach to the Cape, not once, not twice but three days in a row as the launch continued to get scrubbed due to cold weather.

I remember the instant the shuttle blew up, watching it from the side of a nearby roadway, and I knew exactly what happened. I remember the crowd gasp. And I remember my sister pulling at my father's arm and being the first in the crowd to say anything. I remember being annoyed, as most typical seven-year old brothers tend to get, when she asked a question I knew the answer to. I remember the look on my parents' face. I remember feeling sad. But most importantly, I remember how proud I felt and how much more I wanted to be an astronaut that day.

Today, I reflected on how did being there affect my life. Most obviously it kept my passion for space alive and two years later, in July of 1988, I went to SpaceCamp. Later, as I neared the time to begin planning what I would do after high school, my parents spent countless hours researching the path to NASA including how to become an Air Force pilot and how they could get me the most prestigious recommendation they could to earn me entry into the Air Force Academy. In the end I didn't choose that path and instead chose a path into computer science, thanks mainly to the effect of Jurassic Park.

Reflecting on the "what-if" of becoming an astronaut, as a now parent of two, I'm blown away by what my parents tried to accomplish for me. What an amazing thing, to have someone on this Earth who would go to any lengths possible to get you the right foundation to make your dreams come true instead of to laugh and scoff and say "sure Brian, an astronaut". And I'm blessed to have two, and now for the past decade I've had a third person too.

The other thing I've realized is the coincidence that this year is the 25th anniversary of that day, and also the year the space shuttle program will end. As my wife and parents know, for the past few months I've made it clear that I will be taking Penelope down to Florida to see the next and penultimate space shuttle launch. If Wally was older and able to appreciate it I'd bring him too because I want my kids to experience, at least once, the wonder of watching a manned spacecraft launch to the heavens and the imagination it sparks with that tangible discovery that anything really is possible. The symmetry that mine and Penelope's first launch will be 25 years apart had escaped me until today and the thought is bittersweet because who knows when, or if, she and Wally might see another launch of a manned mission to space.