John Lam and Jim Hugunin on Dynamic Languages on the CLR

For more coverage, quotes, and photos, check out Ben's thoughts. The session that I was looking forward too was chatting with John Lam (RubyCLR) and Jim Hugunin (IronPython) to discuss dynamic languages on the CLR. This was the first session that reached out the crowd, so we got to shout out questions. There was an immediate warning that they won't be able to answer all questions. If it was the end of the month we would be in better shape. Come on Queensland. You know that Ruby - IL is coming soon. Jim discusses his story on how he ended up at Microsoft, and how he wasn't hired to write IronPython, but to be in the CLR team and make dynamic languages run better. Currently, he has a team that does most of the work. Questions: These were in the order that people shouted them out, and very much not in the order that they were answered. Ruby or Python, which sucks less?: Jim is not a language biggot. Python happens to fit his mind best. There are lots of people who seem the same as me but get this mind meld with Ruby. "It annoys me that I can't play around with a Rails apps without learning a new language. I want the languages to get along better together". Hopefully that means that we will see some compelling examples of this in the future (of course both on the CLR mean that you can do some things). John finds the DSL meta model that Ruby gives you superior. How are you going to lock us into your platform?: Two sides to it. IronPython's goals have been about becoming a compliant implementation of Python, and being integrated with .NET. It is a challenge to do both at once. A few examples: s = "abc" s.strip vs. s.Trim() What should they do? Allow non-python Trim? throw an exception? Use import clr to allow Trim and friends. What is the plan for PHP?: No one in the audience thought that it was really needed. What is it going to take for Rails to run on top of .NET?: The audience wants this to happen. Michael Koziarski of the Rails Core team would like to see this so support questions can be answered. Others want to be able to deploy Rails into enterprise customers who deploy on Windows. Also, the CLR could take up the weakness of Rails/Ruby deployment and make it the best platform. When is the veil of silence going to be lifted?: Jim explained how he was stuck under the veil for 8 months, and it drove him nuts. He is happy that now he is out there. IronPython 1.1 is now out, 2.0 is being talked about. We shouldn't be harsh on John as he has only been part of the company for a matter of months. "If 8 months go by without an announcement, something has gone wrong." Why dynamic languages?: I want more freedom than I can get from these languages. Unit tests are the solution. We discussed how unit tests are great, but how many developers REALLY practice this discipline. Writing unit tests is like winning in Vegas. Everyone says that they are at least even with the house. Judging by the new $7bn complex being built on the strip, someone is lying. Jim hasn't been able to persuade static folk over the years, but who cares? Lots of people love it, so let them program in it! Do we want to run the CLR in IE?: The audience wants it. Jim/John like the idea. The use would be: fast JIT'd JavaScript, Ruby and such in the browser, and the ability to tie into the blackbox that is currently the JavaScript VM on IE. Mono?: It's getting better? Should dynamic languages be an Intro CS100 language?: They have a lower barrier to entry. The concept count is lower than in a static (classes, methods, static method calls, .... to write hello world in Java, C#). This low bar means that you may see crappier code, as "non-programmers" can write it. This is a good thing. Jim spends half of his time in Python, half in C# and he likes it. Phoenix?: wrong group. Erlang? Haskell? OCAML? F#?: ..... What about IDE support?: They aren't seeing the desire for IDE support in the community. John showed off his WPF Black on Black irb world. He is a super star :) Two great guys. I wish we could have gotten in depth with what is coming up soon. Without that, it was hard to get value out of the conversation in the same way.

Continuous Integration for Rails Just Got A Whole Lot Easier

If you already have a continuous integration (ie build) server (such as Pulse, Bamboo, Hudson, or even the venerable old CruiseControl) and you've been trying to include some of your Rails applications then your life just got a whole lot easier.

Enter CI::Reporter. To quote the documentation:

...an add-on to Test::Unit and RSpec that allows you to generate XML reports of your test and/or spec runs. The resulting files can be read by a continuous integration system that understands Ant‘s JUnit report XML format, thus allowing your CI system to track test/spec successes and failures.

So, I simply installed the gem on the build-server and the plugin into my plugins project, configured the build to slurp up the generated XML files and voila! I now get build notifications letting me know how many tests passed and which ones failed.

Thanks Nick!

Installing RedHill on Rails Plugins via HTTP

After much installation pain and anguish experienced by some users of our plugins (due mostly to outages with RubyForge SVN servers and the inability of some users to access SVN from behind firewalls), I've finally managed to spend some time getting a plugin installer-friendly HTTP mirror up and running.

The root of the mirror can be found at http://www.redhillonrails.org/svn/ from which you can browse the entire repository.

If all you're after are the Rails 1.2 compatible plugins, you'll find them at http://www.redhillonrails.org/svn/trunk/vendor/plugins.

If you're after the older Rails 1.1.6 versions, they're available at http://www.redhillonrails.org/svn/tags/release-1.1.6/vendor/plugins.

The mirror is presently refreshed once a day which should be enough for most people.

As always, let me know if I've right royally screwed something up. I've manually tested all of the above but "it works on my machine" definitely applies in the case I'm sure.

Thoughts on Cruisecontrol.rb 1.0

I just downloaded and installed the Cruisecontrol.rb 1.0 release that was just put out by some of my old co-workers at Thoughtworks earlier today. It literally took about 2 minutes to get builds up and running with our project.

As far as I can tell, it seems to be exactly what you would want out of a CI tool, it's easy to install and it gets out of your way until a build fails. Good stuff.

Hpricot is great

I used to cringe at having to work with XML. These days there are nice ways to work with it... from E4X to Groovy builders, and of course with Hpricot. I wanted to take my OPML file and grep out the URLs so I could create a custom search engine that would search over my buddies (from the OPML file). It is basically a one-liner with Hpricot: require 'rubygems' require 'hpricot' filename = ARGV.first || 'mysubscriptions.opml' doc = open(filename) { |f| Hpricot(f) } (doc/"outline[@htmlurl]").each do |url| puts url.attributes['htmlurl'] end In my case the OPML file is just sitting on disk there, but I could easily have it grab the file from a URL: require 'open-uri' doc = Hpricot(open("http://almaer.com/mysubs.opml")) Not bad until we implement JsDOM ;) Oh, and here is my nice custom search engine:

Testing out Twitter

I think that I actually had one of the first batch of Twitt(e)r accounts months and months ago, but I've never really used it. It looks like Twitterrific might change that, at least for a few days, or until I get bored with it again.

Check me out at http://twitter.com/kurt.

Competitious on Rails Tech Talk

Kris Rasmussen and Andy Holt from Competitious gave a SDForum tech talk on their experience with Rails. They start out talking about their site Competitious and then jump into things. A few pseudo-quotes: "Rails actually scales quite elegantly" "Maintainability is an issue.... harder to debug" "We chose Rails as I got tired writing configuration code". The component dream didn't work out for me in Java "We built the first version of Competitious in 3 weeks" Problems: refactoring is hard, heavy processes, takes work to make production ready, does not support some complex queries, fetches all the data, all the time, so it is easy to over-query the DB. Production check list: use automatic deployment, filter_parameter_logging :password, store session in memory, cache data, make web server store the static files, security reviews (don't rely on with_scope). Acts as everything: acts_as_notable, acts_as_loggable, acts_as_securable, acts_as_taggable, acts_as_mediable Biggest performance issue: Waiting on other services: ObjectCache.cache(key, CACHE_TIME) { third_party_stuff } (Alexa goes down a lot) Timeouts: status = Timeout::timeout(3) { Net::HTTP.get(url) } Asynchronous Polling: startup a new process/thread to communicate with the third party service. Use backgroundDRb (lightweight) JavaScript Templates: define_js_template("our.tmpl") / render_js_template. Share the view. Activity Logging: model: acts_as_loggable :name. controller: Media.with_logging(:user => @current_user) { .. }

United’s Terrible Customer Service

I'm not sure what to make of my experience with United today. I've given them a good review on this blog before, but today made me remember why I hate dealing with them.

The story starts last night when I sleepily booked two tickets to Chicago from San Francisco for later this month. This morning when I woke up I realized that I used my girlfriend's nickname on the ticket instead of her proper legal name. No problem, I thought, I'll just call up and have them change the first name on the ticket.

That's when the fun began. After I spent fifteen minutes navigating the robot phone system to get to a (hard to understand, off-shored) person, I was told that I couldn't change the name on a ticket without a $100 change fee.

A $100 change fee.

To change a first name.

I wasn't aware that this is what the change fee was for. I can understand charging me if I want to change to a different flight, but why would they try to charge me $100 to change the first name of the person on the flight. The only explanation I could come up with is that they were intentionally trying to irritate me.

So i did the only sensible thing. I hung up and called back under the assumption that the first person was crazy. (But not before checking on gethuman.com before calling back to figure out how to avoid the robot phone system.)

This rep informed of the same thing that the last rep did, but luckily, I had another out. The customer service rep on the phone informed me that since I had purchased the ticket within the last 24 hours, the ticket could be canceled with a full refund and rebooked. That made sense, so I told her to go ahead and do that.

Unfortunately, due to the magical airline ticket pricing system that we all know and love, the price of the exact same flight had increased by $96 since 12 hours before. And there was a $15 fee for booking over the phone.

Wonderful.

So I had two choices, change the name and pay a $100 change fee, or cancel the ticket and pay the $96 + $15 difference.

Obviously, neither of these options appealed to me to change a first name.

So the first tact I took was to try to get them to waive the change fee. This has worked for me before on a number of airlines (Continental, Frontier, etc) and I figured it wouldn't be a big deal, since this wasn't really a big change to the ticket.

After being put on hold for 5 minutes, I was informed that that couldn't be done.

I would love to personally thank the supervisor who made that decision.

Eventually what I ended up doing was to have the original ticket refunded and book in a different time that was only $15 more expensive then the original flight that I booked.

So far this cost me $15 and an hour of my time.

To change a first name.

And I ended up with a less convenient flight.

Absurd.

The final slap in the face came just now, when I checked back on United's site. It seems that the pricing fairies have set the price of the flight that I wanted back down to the price of the flight that I booked today.

Thanks, United. I'm done flying your friendly skies.

Silly Micro-Benchmarks Part 2

Enough folks have emailed me asking for the details on the totally-unscientific and Silly Micro-Benchmarks I did that I decided to paste the last response:

> Could you share your microbenchmark test suite?

ab from httpd-2.2.4

> How did you test?

Spent about 10 minutes per server configuring it to the best of my knowledge (which is actually reasonably good for most of them) and wrote the most efficient hello world application I could for each.

> Which hardware,

An Apple PowerMac 2x dual core 2.66ghz xeon thingie with 6 gigs of ram for the server, an powerbook 2x2ghz CoreDuo with 2 gigs of ram for the client.

> networking stuff

An airport 8 port 10/100 switch

> , and so on. How your test result can be reproducible?

Pretty much cannot be reproduced in a meaningful way, which is the point :-)

-Brian

Anyway, that is that. I have been having fun with commons-math tonight while debugging some stuff, so might have to do some more, but with stats to make them look more valid!