Keep Moving

Posted by Nick Sieger Fri, 16 Mar 2012 13:15:43 GMT

Rather than arouse speculation and keep you in unnecessary suspense,

I’m happy to announce that I’m joining the Living Social team on Monday! Besides the obvious reason of jumping at the chance to work with the caliber of team they’re building, I see this new opportunity as a chance to focus my attention. More about this below.

Of course that means I’m leaving Engine Yard. They have been a great company to work for, and continue to be. I’m extremely grateful that they have supported myself, Charlie, Tom, and the JRuby project for the past two and a half years. If you have a passion for developer tools, cloud computing, virtualization, and customer satisfaction, I would still recommend them unequivocally.

While being paid to work on open source is certainly a dream job for many, I’ve learned that I work better (and feel better about my work) when I have fewer immediate goals in front of me, and something to focus on. Open source is still great fun that I intend to enjoy when I have some time and inspiration to put something into it.

So what does this mean for my involvement with JRuby? Nothing at all, really. Of course, I won’t be working on JRuby full-time. I have already been soliciting new contributors for JRuby-Rack, Warbler, and AR-JDBC, and many of you have stepped up your involvement and contributions (thank you!). These projects will still keep moving, and I intend to still help out when I can. I still am very much personally invested in seeing JRuby win, and I think that JRuby continues to gain traction all over the place. And I still am involved and invested in making JRubyConf a top-notch experience this year in my hometown Minneapolis. (Please join us!)

So, [insert your change metaphor here]. Life goes on. Gotta keep moving!

Letter to My Congresspeople Regarding SOPA/PIPA

Posted by Nick Sieger Fri, 13 Jan 2012 21:00:24 GMT

Dear Sen. Klobuchar, Sen. Franken, and Rep. Ellison,

I am writing to express my deep concern about the pending SOPA/PIPA legislation. I have seen reports that Sen. Franken and Sen. Klobuchar are both in favor of this legislation. This troubles me.

I see the intense legal pressure applied by the movie and recording industries to Congress as evidence that they simply don’t understand how to run their businesses in an ever changing technological landscape. They should realize that they could increase revenues by embracing new channels of distribution instead of wasting time tracking lost revenues due to piracy or fraud.

Based on this view, I see SOPA/PIPA as yet another misguided government attempt to intervene, prop up, and rescue an industry that doesn’t know how to alter its own business models to align with the current economic and technological climate. This attempt comes at the expense of taxpayers and citizens who view freedom of speech and information as inherent, unalienable rights.

Frankly, I find the amount of money raised for Sen. Franken and Sen. Klobuchar to be a disgusting example of special interests buying legislation. As a constituent of the the state of Minnesota and its fifth congressional district, I urge Sen. Franken, Sen. Klobuchar, and Rep. Ellison to return all funds contributed for and against this legislation and to remove any support for this bill.


Nick Sieger

Tags , ,

RSpec 2 Matcher Fun

Posted by Nick Sieger Thu, 20 Jan 2011 17:47:21 GMT

I was troubleshooting some JRuby code that transforms Java camelCase method names into Ruby snake_case form. We had a bunch of specs that did this, for example:

describe "Java instance method names" do
  it "should present javabean properties as attribute readers and writers" do
    methods = MethodNames.instance_methods

    methods.should include("getValue2")
    methods.should include("get_value2")
    methods.should include("value2")

    methods.should include("setValue2")
    methods.should include("set_value2")
    methods.should include("value2=")

The problem comes when these specs fail. The default error message made by the #include matcher looks like:


  1) Java instance method names should present javabean properties as attribute readers and writers
     Failure/Error: methods.should include("get_value2")
       expected [...full contents of array here...] to include "get_value2"
       @@ -1,2 +1,186 @@
       +[...all entries, one per line here...]

That’s not a terrible message, but when your array contains over 100 entries (like an array of method names), it could be a lot better. In particular, I kept scanning the failure message’s big list, unable to clearly see why the methods I was expecting weren’t there.

What I wanted to see was how my changes to the regex which splits a Java camelCase name affected the conversion. So, what I needed was a report of which method names were the closest to the ones that were not in the list. Hey, sounds like a good reason to implement a custom matcher, and take a diversion into fuzzy string matching algorithms!

I settled on porting the pseudocode in Wikipedia for the Levenshtein distance, which calculates how close in content two strings are to each other. I looked around and there are existing Levenshtein ports for Ruby, but they use native code for performance. I don’t need performance because I’m only using the Levenshtein function when there is a failure. Of course, pure Ruby code is more portable too!.

The other change I made in the specs was to pass all strings in a single matcher rather than one name per expectation, so we can see all names that fail, not just the first.

So now, the new spec looks more like this:

describe "Java instance method names" do
  let(:members) { MethodNames.instance_methods }

  it "should present javabean properties as attribute readers and writers" do
    members.should have_strings("getValue2",

The custom RSpec matcher #have_strings is declared like so:

RSpec::Matchers.define :have_strings do |*strings|
  match do |container|
    @included, @missing = [], []
    strings.flatten.each do |s|
      if container.include?(s)
        @included << s
        @missing << s

  failure_message_for_should do |container|
    "expected array of #{container.length} elements to include #{@missing.inspect}.\n" +
      "#{closest_match_message(@missing, container)}"

  failure_message_for_should_not do |container|
    "expected array of #{container.length} elements to not include #{@included.inspect}."

  def closest_match_message(missing, container) do |m|
      groups = container.group_by {|x| levenshtein(m, x) }
      "  closest match for #{m.inspect}: #{groups[groups.keys.min].inspect}"

I omitted the #levenshtein function here for brevity. (You can view the full source for details.) Now our failing spec output looks like:


  1) Java instance method names should present javabean properties as attribute readers and writers
     Failure/Error: members.should have_strings("getValue2",
       expected array of 185 elements to include ["get_my_value", "my_value", "set_my_value", "my_value="].
         closest match for "get_my_value": ["get_myvalue", "set_myvalue"]
         closest match for "my_value": ["myvalue"]
         closest match for "set_my_value": ["get_myvalue", "set_myvalue"]
         closest match for "my_value=": ["myvalue="]

Now the failure message is giving me exactly the information I need. Much better, don’t you think?

Tags ,

War on Perfect

Posted by Nick Sieger Mon, 22 Nov 2010 18:30:00 GMT

I intended to give this brief as a lightning talk at RubyConf 2010, but unfortunately did not get a chance. Though I kept the message simple, I think if you sympathize with being a perfectionist you can find some part of these points that rings true. I know I still have a ways to go in heeding my own advice, and not only in software but in my life as a whole.

Thanks to Hiro Asari for the Japanese translations and Jeremy Hinegardner for the numbers.

War on Perfect

I want to start a war.


A war on Perfection!




I hate this word.


I want to eliminate it from our vocabulary.


What is Perfect?


Ask 10 people, get 10 answers.


Different answers means disagreement.


Perfection cannot accept compromise.


Without compromise, we cannot get along, or get anything done.

妥協無しには、仲良くやって行ったり 何かを成し遂げる事は出来ないでしょう。

(Just look at politics in the USA.)


Perfect is lonely if you can’t agree or share with anyone else.

他人と合意や共有が出来ないので 完璧主義とは孤独でもあります。

We are human. No one wants to be alone.


Perfect is contagious


If you’re not embarrassed when you ship your first version you waited too long.


-- Matt Mullenweg マット・マレンウェグ

How many Ruby gems have never seen 1.0?


Any guesses?


17864 Rubygems 86837 versions バージョン

13496 gems without a version that does not start with “0”. 75 Percent!


I challenge you all to release 1.0 on your first push to Rubygems next time.


Perfect is impossible


If you seek it, you will never quite attain it.


You will worry it’s not perfect enough, and it will escape your grasp.


Perfect keeps you too focused on one thing.


Your mind will cripple you.


You won’t be able to finish it.


You’ll feel helpless because nothing is ever good enough.


Perfect ruins your productivity.


You’ll feel like your work is never done.


Perfect is harmful to your health.


We work too hard to achieve perfection.


We set our personal standards too high.


And rarely reach them.


So we worry about not being good enough.


This makes us ANXIOUS.


Anxiety can give you stress,


make you sick,


or even kill you.


We can’t be happy if we’re anxious or unhealthy.


We can’t be happy if we accept no compromises.


We can’t be happy if we’re alone.


We can’t be happy if we strive for perfection.


Matz knows this. He is WISE!


Ruby is not perfect.


(Matz knows this too!)


Matz made Ruby so we could be happy.


Perfection keeps us from:


making compromises,


getting things done,


enjoying each other’s company,


being happy.


And that’s why I hate it.


So you can either try to be:


Perfect [and be]








or you can be HAPPY.


I’ll choose to be happy. I hope you do too.



Tags , , , ,

New Orleans live music this weekend during RubyConf

Posted by Nick Sieger Thu, 11 Nov 2010 18:38:00 GMT

My boy Erik Jacobson from way back and also of Mama Digdown’s Brass Band is a New Orleans regular and knows the local scene well.

He graciously gave me the lowdown for this weekend. I’d like to make a few of these gigs; probably at least the Stooges at Hi Ho tonight, maybe Hot 8, Ellis and/or Cotton Mouth Kings tomorrow, and one of Shannon Powell or Wes Anderson on Saturday. Let me know if you’re interested by messaging me on Twitter.

Erik also mentioned that there might be a Second Line happening on Sunday afternoon that I might try to check out before I take off in the evening. Let me know too if you are up for that.

Ok, here’s Erik’s take:


Shamarr Allen @ Irvin Mayfields Jazz Playhouse. 8:00pm.

He’s a fantastic young trumpet player and a friend of mine. This is the nice/upscale club that is in the hotel on Bourbon Street.

Kermit Ruffins @ Vaughn’s. 8:00pm.

You probably know, but Kermit is a trumpet player and is a quintessential New Orleans character. Vaughn’s is a great local dive bar that is in the Bywater neighborhood out by the Navy Yard. You’ll want to take a cab there. There is also free beans and rice at his shows.

Stooges Brass Band @ Hi Ho Lounge probably around 10:00pm.

I got a hold of Walter from the Stooges and he said they were playing tonight. They are a fantastic brass band and it’s a great local spot to catch them. Good friends of Mama Digdown’s.

Soul Rebels Brass Band @ Le Bon Temps Roulee @ 11:00pm

This is always a good hangout. There will be a ton of people there. The Soul Rebels are awesome and always play pretty late into the night.

If you felt like being adventurous, you could hit either Vaughn’s or the Playhouse from like 9-10, then take a cab to the Hi Ho for a set until around 11:30 and then finish with the Rebels. That is a lot of music, it’s just so hard to pick which ones to leave out.


Hot 8 Brass Band @ 12Bar. 7:00pm

HOT, HOT brass band. They are good friends who have been up north many times. This is a new club that is pretty close you your hotel.

Hot Club of New Orleans @ DBA. 6:00pm

This is a great Django style band. I went to college with the violin player Matt Rhoady. He also hails from Mpls and went to Henry High/ This club is over on Frenchman Street near Snug Harbor.

Kid Chocolate Brown @ Irvin Mayfields Jazz Playhouse. 8:00pm

Cool young trumpet player and singer. He also plays in Los Hombres Calientes from time to time.

Ellis Marsalis Quartet @ Snug Harbor 8:00pm

This is certainly worth going to and I am sure he’ll have a good band with him.

New Orleans Cotton Mouth Kings @ Spotted Cat. 10:00pm

This place is really close to Snug Harbor and would be fun to hit after Ellis. Great traditional band with young cats. Good people watching too. This is a cool scene here I think it’s free too!


Soul Rebels @ DBA. 11:00pm

If you missed them on tonight, you can catch them here. This would be a good place to hear them.

Shannon Powell @ Irving Mayfields Jazz Playhouse. 8:00pm

He is so badass. You should really try to swing by if you can. He is the drummer that was on that Orchestra Hall gig I played this summer. Cool dude too. At 11:00pm there is also a brass band playing this club called the KinFolk Brass Band.

Wessell Andersen @ Snug Harbor. 8:00pm

I am sure you know him from Wynton records. He is amazing. It is a hard decision between him and Shannon Powell.

Tags ,  | 2 comments

activerecord-jdbc-adapter 1.0.0

Posted by Nick Sieger Thu, 14 Oct 2010 15:25:51 GMT

Just a quick note that activerecord-jdbc-adapter has finally hit 1.0.0. Install it today:

gem install activerecord-jdbc-adapter

Included are adapters for MySQL, PostgreSQL, SQLite3, Derby, HSQLDB, H2, and Microsoft SQL Server.

gem install activerecord-jdbcmysql-adapter
gem install activerecord-jdbcpostgresql-adapter
gem install activerecord-jdbcsqlite3-adapter
gem install activerecord-jdbcderby-adapter
gem install activerecord-jdbchsqldb-adapter
gem install activerecord-jdbch2-adapter
gem install activerecord-jdbcmssql-adapter

You can also use activerecord-jdbc-adapter with Oracle, DB2, Sybase, and Informix. Just ensure that the database JDBC driver jar files are mentioned in $CLASSPATH or require them directly in your script or application. Then, configure database.yml with adapter: set to one of oracle, db2, sybase, or informix.

This release promises superb compatibility with Rails 3. We now have the ActiveRecord test suite running in CI and the 1.0.0 release is 100% green when run on MySQL. (SQLite3 is right behind with just 13 failures, and we hope to fix those soon.)

As mentioned before, to get started with Rails 3, JRuby and activerecord-jdbc-adapter, simply run:

$ rails new app --database mysql --template
    gsub      Gemfile
    gsub      config/database.yml
$ cd app && bundle install
Using activerecord-jdbc-adapter (1.0.0) 
Using jdbc-mysql (5.0.4) 
Using rails (3.0.0) 
Your bundle is complete! Use `bundle show [gemname]` ...

One new feature in 1.0.0 is the ability to define an extension adapter for your proprietary JDBC database without needing to hack the activerecord-jdbc-adapter source code. To get you started we extracted the activerecord-cachedb-adapter and put it on Github for you to use as a template.

The 1.0.0 release had over 200 commits poured into it and lots of great help from the community. Thanks to David Kellum, Dmitry Denisov, Dwayne Litzenberger, Gregor Schmidt, James Walker, John Duff, Joshua Suggs, Nicholas J Kreucher, Peter Donald, Geoff Longman, Uwe Kubosch, Youhei Kondou, Michael Pitman, Alex B, and Ryan Bell for their contributions to this release.


Tags , , , ,  | 2 comments

Polyglot Doesn't Fix Your Messy Architecture

Posted by Nick Sieger Wed, 15 Sep 2010 20:12:00 GMT

My talk last week at JavaZone is now available. (I’ve put 1280x480- and 320x240 (iPod)-sized copies of the .mp4 files on S3 as well if you don’t have Silverlight.)

One of the problems we have as members of the JRuby team is to convince a Java-based audience that programming in a new language is worthwhile. As a result, we consider ourselves proponents of so-called “polyglot programming”. One of the opening points I made in my talk addressed arguments for and against polyglot programming.

I usually try to make a case along the lines of “learning a new language is good for you anyway”, which can come off sounding a little patronizing, like I’m reminding the audience that they should take their vitamins. While I do believe practicing multilingualism (or polyglotism) with computers is good for your programming career, I wouldn’t like to be admonished by the speaker if I was in the audience.

This time I took a different tack. I’m not sure if it’s a convincing (or even supporting) argument in favor of Ruby or polyglot, but true nonetheless.

First, I likened a software project to a physical workspace. When you use a new language in your project, you make a new space for stuff. Maybe like adding a bookshelf or some binders or a filing system.

Problem is, if your idea of organization is analogous to the cluttered desk below, adding a new language is just going to pile one more binder onto the mess.

I love clutter

On the contrary, if you have a well-organized project, adding a new language also doesn’t necessarily automatically make your project better, but it does give you capabilities that you didn’t have before.


In the end, polyglot programming won’t fix the messy architecture and organization of your project. If you think adding Ruby to the project will make things better by itself, you probably shouldn’t be thinking about it in the first place. Ruby can be used as a tool to clean up the mess, but only if you actually clean up and remove it, and not just paper over it.

Tags  | 1 comment

JRuby at JavaZone 2010

Posted by Nick Sieger Mon, 30 Aug 2010 17:12:07 GMT

I’m pleased to be able to return to Oslo for JavaZone 2010. Whether you’re checking out JRuby for the first time or a veteran JRuby user, I’ll have something for you! And if I don’t, I encourage you to come badger me after the talk is finished.

JRuby: Now With More J!

Additionally, if you’re interested in meeting up for some JRuby discussion next week in Oslo, do drop me a note at the address in the upper right.

Tags ,  | 1 comment

Deploying, Monitoring and Troubleshooting Rails on JRuby

Posted by Nick Sieger Mon, 30 Aug 2010 17:06:52 GMT

I am pleased that my Engine Yard webinar on JRuby and deployment is available for general viewing. While the JRuby deployment story is still evolving and maturing, and the 60 minute time frame is too short to cover the issues in depth, I hope you’ll find the content at least gives you some ideas or directions to look.

As always, feel free to contact me with any questions!

Deploying, Monitoring and Troubleshooting Rails on the JVM with JRuby from Engine Yard on Vimeo.

Tags ,  | 1 comment

I was Paul Gonsalves

Posted by Nick Sieger Sat, 10 Apr 2010 16:40:00 GMT

I was Paul Gonsalves in the shower this morning. Most people sing in the shower, but when I get going I play air sax. For a fleeting moment I felt like I was blowing with the Ellington band at Newport in 1956. The way obscure things flow in and out of consciousness is a weird thing.

If you haven’t checked out the 1956 Ellington at Newport live recording of Diminuendo and Crescendo in Blue, you really should. I hadn’t heard the recording for years until my lovely wife put it on a great jazz mix playlist that we listened to on the road last weekend. The recording is completely infectious; my foot was tapping within a few moments of the start of the song. The Newport concert is infamous in Jazz lore -- Gonsalves blew 27 choruses and put the crowd into a frenzy. The great thing about the recording, even though it’s a little bit scratchy, is that you can hear and feel the energy of the crowd coming through. Although it’s probably a bit hyperbolic, some Jazz writers claim that Gonsalves single-handedly revived Ellington’s career that day.

Why was my mind in that state at that moment? I wish I knew. The mystery of heightened awareness that is flow is an elusive quality. At lunch at RubyNation yesterday a discussion arose of just how rare it is to attain that awareness. Glenn Vanderburg described how only a few times in his double-digit year career as a conference speaker has he felt like he has had that hyper-aware state, where he was receiving feedback from the crowd during a talk and able to adjust mid-stream and feel completely on. The difference of timing and how that affects an audience’s response is striking. The difference between being on and having a joke or a point fall flat is incredibly sensitive, as any performance artist will tell you. Just to think about it gives me a newfound respect for stand-up comedians, where timing is so crucial.

I myself haven’t quite felt that heightened state while delivering a conference talk, but I have felt it while playing jazz. Still, it has happened only once or twice in my life. If you’ve felt that flow, you know rare it is and how you absolutely cannot manufacture it at will. The feeling is such a high that I suspect it leaves artists, performers, and creative types feeling unfulfilled and half-desperately searching for it for the rest of their careers.

I’m not very well read in this area, but I’d like to learn more. Any suggestions for reading material?

I tend to stew on these things for a while but fail to put together a coherent, digestible conclusion, I thought I’d at least write something up, get it out there, and start a conversation. When have you felt that flow, and have you noticed how you get into it?

Other tangential thoughts swirling around in my head:

  • Is flow related to a search for perfection? Instead, should we coach ourselves to cope with life’s imperfections? Dave Thomas gave his “Ruby sucks” talk last night at RubyNation and eloquently made the point that Ruby is not perfect, and that’s what makes it great. I’ve struggled with not settling for less than perfect and it ends up usually being more detrimental to my production than anything else.
  • Why Americans Don’t Like Jazz. Have we lost an appreciation for things we can’t put to words?

Tags ,  | no comments

Older posts: 1 2 3 ... 17