Monday, May 18, 2009

Understanding the true value of Open Source

I've been using various Open Source Software (OSS) packages (both personally and professionally) for many years now. Today, for the first time, I contributed back to the community. Recently, I've been using a very handy program called RESTClient for testing web services. I wanted to use the command line version of this tool to run some tests, only I found that the latest version had a bug that prevented my from using the JUnit "fail()" method.

Instead of giving up and looking for another tool, or deciding to just not use the JUnit call, I figured that "well, it must be an easy bug to find and fix" so I gave it a shot. I grabbed a copy of the source from the public Subversion repository, got it all to compile, and in short order I found and fixed the bug.

Being the lazy sort (not wanting to maintain my own private build forever), I filed a bug and submitted a patch, along with a simple test case that showed it worked. The project owner got backed to me today and told me my change had been accepted, and is in the latest build. Cool stuff!

Although the fix itself was trivial (I had to change one line), what isn't trivial is overcoming inertia. Most developers (myself included) are too busy/reluctant/lazy to go through the effort of something like this. I overcame my own inertia and discovered that (A) it isn't all that hard and (B) and I enjoyed doing it.

You see, I think what most of us miss the point that Open Source software, is well, open. If you see a problem and it gets in your way find it and fix it. This simply isn't possible with proprietary, closed source software. Oh, sure, we all know the arguments for OSS, but we rarely take these to heart. Heck, I best most folks don't even bother to download the source just to learn from it, much less try and fix a problem in it.

Contributing back bug fixes (even trivial ones) like this goes beyond helping the maintainers or other users of OSS - it helps you as a developer, too - perhaps even more so. It gets you out of your own software ecosystem: You may have to use a source code control system you're unfamiliar with. You'll have to get a build working. You'll have to figure out new code. You'll have to debug and fix unfamiliar code.

All these things are good. They promote learning - and in software development, learning is not optional.

Besides, it feels good to know you made an improvement in something other folks use (even if it seems like a trivial change).

Tuesday, May 12, 2009

Why do things have to be so hard?

I've been playing around for a few days (a little bit at a time) trying to get a simple "Hello World" app running using Jersey. For those that don't know, Jersey is the reference implementation of JSR 311 (Java API for RESTful Web Services).

They have a sample "Hello World" app you can download and run (in theory, anyway), but, as is all too often, it's not "download and go" (although it seems to think it is). I had to play around way more than I should have to get a simple example working (not even using Glassfish - that's going to be a whole other story when I'm done...).

Anyway, I got it working. I'll post an update on the silly things I ran into that blocked my progress.

Monday, March 23, 2009

No Fluff, Just Stuff, Spring 2009 Wrap-up

I still haven't caught up on much sleep from attending the No Fluff conference past weekend, but I decided to keep my streak going and post a quick wrap-up.

The conference was a big win, as usual. As "long" of a weekend it may be, I always find it invigorating (and, perhaps, a bit depressing learning how much there is I don't know!). Although perhaps a bit unfair (because I thought they were all worthwhile), I'll list my favorite talks of the day (here's the full schedule, in case you're curious):

For Friday, March 20:
For Saturday, March 21:
For Sunday, March 21:
My favorite talk of the entire conference:
This session was notable for me because I went to several talks by speakers I hadn't seen before, like Ken Sipe and Stuart Halloway. Although I always enjoy seeing "the regulars" like Scott Davis, Neal Ford, Jared Richardson et.al., it was a nice change to see some new (for me) speakers (and excellent ones, to boot!).

During one of Stuart's talks, he showed a video of a visualization of Ruby on Rails (RoR) commit history (built using a tool called Ruby Swarms). It was quite interesting, especially towards the end (he said it occurred around April 2008, I believe) when they switched from using Subversion to Git for their source control. Git allowed them to be much more collaborative and accept changes from may more people. You can see this by the explosion of committers around that time. Very neat stuff.

One of the "frustrations" (if you can call it that) for me of this conference is that I am often forced to make hard choices about which talks to go to. Often, many of the speakers/topics overlap, and they don't repeat. It's the price you pay for having high density quality, I guess. It just really encourages me to go every time the roll around (2x/year) - and that's a good thing.

The other "frustration" (as I mentioned in an earlier post) is it really gets me thinking about plunking down for a Mac. But then I start thinking, hmmm... desktop? laptop? mini? Tough choices (and not really cheap ones, either). One of these days I will have to do it, though.

Usually, during the speakers expert panel talk on Sunday, they do a round-robin of what the speakers are reading. They didn't this time, but they did have some interesting non-technical books for sale. I picked up "Why We Make Mistakes" by Joseph T. Hallinan. I'm looking forward to reading that one.

Oh, and once more thing. My most profound takeaway (or at least the thing I'll be thinking about most) from the talk was Stuart's comments about how he felt Java was "end of life." He said the JVM has many more years left to it, but Java the language is really becoming a "legacy" language.

Have to think about that one (and maybe spend more time with Ruby and Rails!).

Sunday, March 22, 2009

No Fluff, Just Stuff, Spring 2009 Day 3

Today was the final day for Spring 09 No Fluff. Another good day, quite enjoyable, but I'm glad it's over. I need to get some rest. I spent several (three to be exact) sessions with Stuart Halloway.

My first session was Agile, Relevance Style where he talks about how his company (Relevance) "does agile." It's a topic that's of interest to me in part because my company is using Scrum (an agile method) and I'm always interested about how others do things. I figure I may get some ideas that may help my own organization. He mentioned that they use two week iterations at Relevance. I've done some thinking and experimenting with two week iterations with my team (as a company we tend to use four week iterations). He made a comment that I think made a lot of sense: "For systems that don't have a good codebase, have poor test coverage, etc. - this may push you to longer iterations." The implication was that the technical debt the team has to deal with makes getting something working take longer, and thus lengthens the feedback loop. Made sense to me.

Some of the things I found interesting in this talk:
  • "Are you building systems to enable capable people to do things, or a system to prevent less capable people from doing bad things?"
  • Their iterations are bound to work days, not calendar days. This makes all iterations a constant (working day) length, thus making planning and project statistics easier and more meaningful.
  • They don't estimate hours for their story points. They rely on the "law of large numbers" to smooth out the variations in task estimates.
  • Looking at story points and hours is like looking at climate and weather. He was trying to explain the difference between looking at trends (or burn down) at a macro (climate) level, not a micro (weather) level.
  • Whenever possible, they pair everything, including business analysis, iteration reports, etc. Anything that requires "knowledge work."
  • "Why pair? Agile is about having the tightest possible feedback loops."
  • All refactoring is built in to estimates.
  • They have four day workweeks. Every Friday is their "20%" time. They work on open source projects, etc. They all do this on the same day, and don't interact with outside customers.
He also mentioned a video interview he did with on feedback loops in software development. I haven't checked it out yet, but it's on my list.

The second talk I attended was Taking Agile From Tactics to Strategy also by Stuart Halloway. This was a continuation of his previous talk, and talked about things at a higher level from his previous talk. Highlights:
  • "Agile works where risk and uncertainty are king." (we was talking about all knowledge work, including software dev).
  • All story points tasks are on a bell curve. For example, some two point items are bigger than others, some are smaller." This hit home with me.
And my favorite line from this talk:
  • "Code rots even if you don't touch it."
He was talking about the need for constant refactoring. Again, this really hit home.


The post lunch talk (number three) was also with Stuart (it may seem as if I was in a rut, but he's a really good speaker). This one was a departure from his Agile talks, and instead was on alternative languages on the JVM. The talk, Java.next #1: Common Ground, was quite interesting, and explored commonalities bet wen various "alternative" languages for the Java Virtual Machine, like Groovy, Scala, Ruby (in the form of JRuby) and Clojure. Again, some highlights:
  • "Design patterns are the crap we couldn't figure out how to reuse or build into the language." I've also heard Neal Ford sum it up another way: "Design patterns cover up code smells."
  • All objects in Clojure have equals and hashcode defined properly be default.
  • Checked exceptions violate encapsulation. It was an interesting experiment. It failed and we should get rid of them. He point out one of the few things Microsoft didn't copy with .net was checked exceptions.
  • The language Fan was one of the few that made a conscious decision to run on the JVM and on the .net CLR.
And the most interesting (and, depending on what you believe and what you do) scary quote:
  • "It is getting close to being professionally dangerous to start doing greenfield development in Java"
Note that he wasn't talking about the JVM, just Java the language. He also said that "I think we'll get another 10 years out of the JVM."

The fourth and final talk I went to was Become a Maven Maven, given by Srivaths Sankaran. I don't know a whole lot about Maven, and need to learn more as we're converting all our Ant scripts to Maven. Seems like it will be a big win.

Phew! It was a long day, and a good conference. I'll post a wrap-up of the conference after I've had more sleep...

Saturday, March 21, 2009

No Fluff, Just Stuff, Spring 2009 Day 2

Day two of the Spring 09 "No Fluff" conference is over. Whew! Another tiring (but rewarding) day.

The talks I went to were good (as usual). The first talk of the day was Programming Scala by Venkat Subramaniam. It was interesting stuff. I don't think I'll have any immediate need (or ability to put it to use) for Scala, but I was interested in the language. Venkat is working on a Scala book, which I'll probably pick up just for fun when it's out.

Talk number two was Architecture and Scaling by Ken Sipe. I attended two of Ken's talks yesterday, and this was good as well.

The third talk of the day for me was Introduction to JMS by Mark Richards. It was a real toss-up for me, though, because it conflicted with Neal Ford's Test Driven Design talk. I've seen Neal's talk twice, and was really tempted to go for number three, but in the end, I wanted to learn a bit more about JMS. The last time I used a messaging system (Spread) it was several years ago. I've never had the chance (or need) to work with JMS yet, but I'm sure it will come up eventually.

By far, though, today's "blow me away" talk was one given by Stuart Halloway. The talk was on Git (the source code control system) and was titled "Git Control of your Source." I know, I know, it sounds a bit hyperbolic to describe a talk on a source code control tool, but it really was. I was interested in this talk for a couple of reasons. One is that he seems like a very sharp guy, able to communicate effectively. I have one of his older books - "Component Development for the Java Platform," which contains the best description of custom classloaders I've ever run across. Second, if someone like him is doing a 90 minute talk on Git, there must be a darned good reason.

Anyway, back to the talk. Stuart is an excellent and engaging speaker, and really knew (and was passionate about) the subject. Second, after Stuart started talking about Git, I realized how game changing it is, both for source control and Open Source development in particular. Stuart has a recent blog post "Fork Everything" which sums up some of the cool things about Git, and does a better than than I can.

Here are some of the most memorable (for me, anyway) takeaways and quotes from the talk:
  • It's a game changer for Open Source development. It makes grabbing a repository and forking your own changes easy, and even preferred.
  • It removes the "One True Repository" mentality. Anyone can easily make contributions available, and allow other to use them (as well as push back into the "original" repository)
  • "Git is like a versioned filesystem, with a good remote sync"
And my favorite line from the talk:
  • "Every once in awhile things get better in this industry. This is one of those times." (referring to Git)
I guess this means I have to check this out, too.

Friday, March 20, 2009

No Fluff, Just Stuff, Spring 2009 Day 1

First day of the"No Fluff Just Stuff" conference (Spring 2009, Boston). Always good to go to these - this is my 5th (in a row no less).

I went to to two fantastic talks by Ken Sipe, one on JVM Memory Management and another one on Debugging your Production JVM. He talked about some nifty tools bundles w/ the JDK (like jpid, jvmstat, and VisualGC, among others. I remember being at Sun (Javasoft), in the distributed computing group (makers of serialization and RMI) when Sun was starting to add instrumentation like this into the VM. It's amazing to see where it's gone (I haven't paid attention to it in quite awhile).

His Debugging your Production JVM focused a lot on VisualVM (which is very cool), and the rather amazing (and emerging) BTrace. I will definitely have to check all this out.

My third talk of the day was Ted Neward's talk on Advanced Platform Security. I don't usually have to mess with this, but it's always good (and interesting) to look in on this kind of stuff occasionally. You never know when you'll need the info.

Jared Richardson gave the keynote this time: Career 2.0. He's written a book on this, which I got as part of the conference package. I'm looking forward to reading it.

Going to these NFJS conferences always make me want to get a nice Mac (laptop or nice desktop). Most of the speakers use them, and I see they have good reason to. I'll just have to pull the trigger one day...

Tuesday, May 06, 2008

Groovitude

Note: title shamelessly stolen from the title of a Get Fuzzy comic collection. I'm a huge fan.

Anyway, I'm working on some simple scripting for work (to automate setting up a development environment on Linux), and I think "hey, why don't I use Groovy for this?" I've been reading some very good Groovy books (and doing a little hacking with it), so it seemed like a perfect opportunity.

My first task is simple enough - grab some gzipped tar files from a source directory and expand them into some destination directory. It starts of in a simple minded way:


"tar zxf $/sourcedir/file_a.tgz -C /destdir".execute()
"tar zxf $/sourcedir/file_b.tgz -C /destdir".execute()
"tar zxf $/sourcedir/file_b.tgz -C /destdir".execute()


OK, not very "Groovy" (or terribly useful or cleaver, for that matter). So I say "well, I can at least abstract out the source and destination directories, along with the filenames." Now I have:


SRCDIR = "/sourcedir"
DSTDIR = "/destdir"
FILE_A="file_a.tgz"
FILE_B="file_b.tgz"
FILE_C="file_c.tgz"

"tar zxf ${SRCDIR}/${FILE_A} -C ${DSTDIR}".execute()
"tar zxf ${SRCDIR}/${FILE_B} -C ${DSTDIR}".execute()
"tar zxf ${SRCDIR}/${FILE_C} -C ${DSTDIR}".execute()


Not much of an improvement.

OK, then I wise up a bit an realize I can use AntBuilder instead of executing tar directly. The "tar..." lines become:


def ant = new AntBuilder()

ant.untar(src:"${SRCDIR}/${FILE_A}",
dest:"${DSTDIR}",
compression:"gzip")
ant.untar(src:"${SRCDIR}/${FILE_B}",
dest:"${DSTDIR}",
compression:"gzip")
ant.untar(src:"${SRCDIR}/${FILE_C}",
dest:"${DSTDIR}",
compression:"gzip")


A little better. Finally, on about midnight, I begin to think of how to do this in a much more idiomatic "Groovy" way: put the files in an array, and iterate over them with a closure! (Those used to Groovy, Ruby or any other decent dynamic language may feel free to say "duh" at this point. Give me a break - I've been using Java since 1.0 :-). Now I have something like this:


SRCDIR = "/sourcedir"
DSTDIR = "/destdir"
files = ["file_a.tgz", "file_b.tgz", "file_c.tgz"]

files.each {file ->
ant.untar(src:"${SRCDIR}/${file}",
dest:"${DSTDIR}",
compression:"gzip")
}


Much Groovier. Now I can go and get some sleep ;-)

Thursday, November 01, 2007

Halloween 2007

Halloween has come and gone, and Nicholas had a great time. He went trick-or-treating with his friend Patrick for the first half of the evening, then pressed on with me for a few more houses. He has quite a haul for the night.

He picked up a "trick-or-treat for UNICEF" box at preschool and collected some change for UNICEF, too. He liked that part as well. His costume this year was a "Go-Kart Racer" :-)

Saturday, June 09, 2007

Storyland 2007

In early July, we made our annual trip to Storyland. Everyone had a fantastic time, especially Nicholas. We went up there with a couple of other families we know (Nicholas is friends with their kids). We combined this trip with our annual trek to Keepsake Quilting - Gail likes to go to their big annual sale. As she said, "something for everyone!" ;-)

In addition to Storyland, we went for a one hour ride on the Conway Scenic Railroad (Nicholas is very into trains at this point).

I've included a couple of pics (below) from the trip (the traditional shot of us in front of Humpty Dumpty and Gail and Nicholas at Keepsake). There are more shots from the trip if you're interested.




Friday, June 08, 2007

Everything is Miscellaneous

Recently, I was reading Geoff Arnold's blog (I used to work with him at Sun), and he had a post about the author David Weinberger. David has a new book out, "Everything is Miscellaneous." It sounds like a great book (I'm going to order it). There is a web site to go along with the book - David gave a fascinating talk at Google, which the nice folks at Google taped and put on the web. I've embedded it below - check it out.


Friday, May 18, 2007

The Bike Trailer

I bought a bike trailer this past weekend. It connects up to my bike and lets Nicholas ride behind me. It's quite fun, and Nicholas loves it. We've only been out for one ride (besides a test run around the block). We went along the Minuteman Bike Path, riding from Arlington to the Lexington town line and back.

I can see getting a lot of miles from this thing :-)

Thursday, May 10, 2007

Nicholas helps out

Nicholas helped me fix and stain the deck recently. We've had some boards rotting out for some time, and I used it as an excuse to get myself a reciprocating saw :-). We replaced several boards and steps, then re-stained the deck.

Nicholas helped out, and got a real kick out of it. I've put up some pictures of the fun. Click on the picture below for more photos.

Fixing the deck

Monday, March 26, 2007

Neat Nerd Score Test

I was reading "The Tidal Blog" today and saw a neat nerds score thingy. Being the nerd I am, I had to take it :-) I have to admit, I'm a bit disappointed I didn't score higher ;-)

I am nerdier than 89% of all people. Are you nerdier? Click here to find out!