Oct 15

Ruby support in IntelliJ 7

IDE, Java, Ruby, Tech No Comments »

IntelliJ 7 has now shipped and I am most excited to see the non-Java support. If you take a peak at the Ruby features, it looks pretty good and thorough:

  • Smart, scope based JRuby-aware Ruby code completion
  • Automatic completion of built-in methods
  • Smart Ruby statements completion
  • Completion and automatic resolution in require and load calls
  • Ruby code syntax and error highlighting, with brace matching and folding
  • Code style support with automatic formatting, indentation and TODO marks
  • On-the-fly Ruby code analysis with quick-fixes
  • JRuby and Ruby-aware intention actions
  • Advanced Ruby code and project navigation
  • Ruby-aware structure view, quick structure popup
  • Go to Ruby class, file, symbol and declaration actions
  • Quick declaration view, context and method parameter info
  • Quick overriding of classes, modules and methods with active navigation gutters
  • Multiple ruby-aware refactorings
  • Ruby code usage search for local variables, method parameters, class fields and constants
  • Dedicated Ruby run configuration and quick script execution
  • JRuby support for running Ruby applications, with cross-resolution of classes between Ruby and Java
  • Unit testing support with quick tests launching for a specified method, class or set of tests
  • Stack trace analysis with one-click Ruby code navigation
  • Ruby code documentation lookup with hyperlinks and navigation
  • More than 50 Ruby and RSpec live templates
  • Shortcuts settings for rake tasks, generators, RSpec, etc

I like Textmate and all, but it is far from being IntelliJ. Textmate is fast, clean, and simple. IntelliJ is smart. Netbeans has done a great job with Ruby support, and it is fantastic to see IntelliJ put its hat in the ring. I am looking forward to putting it through its paces. As much as I like IntelliJ, I have to admit that sometimes I wish that I still have version 3 around…. which was lean and mean. Hopefully the performance improvements are real in v7.

Oct 13

SWeb 3.0: Paul Hammant goes from Thicky to Swiby

Groovy, Java, Ruby, Tech No Comments »

Paul Hammant has been involved in a ton of fantastic open source projects, and some cool toys too. Thicky was a toy that I would often show off when I was doing the Groovy thing. Building prototypes of Swing apps with a nice builder API was great.

Now he is having a bash on the web, and has written up his thoughts on SWeb 3.0 which gratuitously joins the Web 3.0 debate although it isn’t some drivel about how “Web 3.0 will include even MORE participation ….”.

Paul has joined up to make Swiby happen:

With Swiby the pages, should be shipped from the server side web frameworks like those today (Ruby on Rails, or Waffle), and executed in the browser via that plugin. All of these will be possible:

  • AJAX-like behavior
  • lazy loading of hidden tabs, or sections of a page
  • threaded / timed events
  • client side object storage more sophistcated that the current browser cookie
  • amazingly rich interfaces (YouTube, GMail, Writely should be easy to do)
  • equivalent of CSS for properties of widgets
  • server side decoration a la Sitemesh or PhpMesh
  • tiny pages, quick loading, and quick transitions from one page to another

The philosophy is that Swing has a nice component model and the cool side of the Web is the REST stuff, and a page centric world.

Paul is trying to take the best of both worlds to make it easier to build very rich apps on the Web platform.

It is a bold play, and is obviously an up hill battle against the incumbants, but I am all for more projects pushing the edges here, and I can’t wait to see more.

Oct 04

Identity Matcher: Import social graphes

Facebook, Ruby, Tech No Comments »

My favourite talk at the FOWA was Matt Biddulph talking about his experience with Dopplr which is a fantastic little service (and I was shown today that the colors change EVEN on the favicon.ico when you are in a different location!!!).

Matt’s talk was high level, but he managed to keep it interesting and it wasn’t about pimping Dopplr.

He also released identity matcher, a new open source project that allows you to import social graphs! Now we can all work together on this instead of reinventing the wheel:

This code, extracted from the Rails codebase of dopplr.com, extends your User model with methods to pull in social network information from sites such as GMail, Twitter, Flickr, Facebook and any site supporting appropriate Microformats.

This is an alpha-quality plugin. It was extracted from our codebase at the start of October 2007 and may still contain dopplr-specific code (although we tried to avoid that).

The code is just one file with a few includes and you can now matches_identities in your Rails model. Of course, you can abstract out the Rails stuff and just have a library to do the matching. Very nice indeed.

Now I just want the option to say “if someone shares their stuff with me on Dopplr, and they are friends with me via another service (e.g. Facebook, Twitter) just go ahead and share back automatically!”


Sep 19

Sun changes its ticker to RUBY

Java, Ruby, Tech 2 Comments »

Is it just me that finds it a touch ironic that Sun is doing a better job impressing the Ruby community, that it has ever done on the Java side?

Having DHH sit back and wax lyrically about you is about as rare as getting Hani onto your governing body. Oh, wait.

The biggest surprise at RailsConf Europe 2007 was hearing Craig McClanahan from Sun speak. Craig is the creator of Struts, the original blockbuster web framework for Java, and more recently Java Server Faces. Not exactly an obvious advocate for Ruby on Rails, but he sure played the part well.

And not just on a superficial level because Sun was a diamond sponsor of the conference, but from months of experience developing Rails applications using the latest techniques and frameworks (like pushing the envelope with Active Resource). He even went as far as to say that developing web applications in Java after working with Rails would probably not be a particularly pleasant experience for him. Wow.

Yet there’s still that nagging doomsday image of a mystery man sitting somewhere inside of Sun petting a black cat with a hollow laugh just waiting to reveal his evil master plan as the reason for all this. But the exceptional work and high character of people like Tim Bray, Nick Sieger, Thomas Enebo, Charles Nutter, and now even Craig McClanahan championing Ruby and Rails inside Sun, I think I’ll have to waive goodbye to the last sliver of that suspicion very soon.

Wow. Finally, Tim Bray may be pushing them towards a world where their ticker should be JVM not JAVA as their realize where the power of the platform truly lies.

Aug 21

Is Zombies the biggest Rails app? :)

Caching, Ruby, Tech No Comments »

Blake Commagere: “As you

Jun 20

GData for Ruby 0.0.4 Released

Ruby, Tech 1 Comment »

Steve Jenson has joined me over at GData-Ruby, and has added support to create entries in blogger, and fixed a few bugs.

Thanks for the help Steve. Some others are working on adding services. Working with the Ruby library feels quite natural to me, and it is nice to not be writing millions of services and factories and ….

Jun 05

TIBCO on Rails

Ruby, Tech 7 Comments »

I got into another “chat” with someone who was mocking Rails due to the fact that he keeps seeing a cat when he tries to use Twitter.

“This app is slow, therefore Rails can’t scale”

This is an old argument of course.

The problem is that Twitter doesn’t scale in the same way as many Rails applications.

I talked about how Scaling out 37 Signal-style applications is convenient. In many ways, Twitter is more similar to a real-time stock exchange than a simple CRUD application. Tweets may not be quite as important or timely as $$$ (stock info), but there are some similar issues.

This is why, for Twitter to scale nicely, it probably makes sense to use a message bus that can scale out nicely. Pull versus Push / the loose coupling can really help you out, and you can copy what NASDAQ does instead of Basecamp.

The message bus could be Ruby, could be ActiveMQ, could be TIBCO Rendezvous.

This architecture change would surely do a lot more for you than “re-write it in Java”, which may give you a slight boost (e.g. more out of less machines), but is like adding lanes to 101 instead of using public transport.

May 23

Ruby on Rails: To Scale or Not to Scale? Still don’t know!

Ruby, Tech 5 Comments »

I got to go to the Geek Sessions event on scaling Rails tonight.

There were many good people there, and it was nice to put a face to some of the names.

Fortunately, Nick Sieger was writing copious notes, so I will just link to what he blogs from the event.

I only have some meta thoughts:

The format seemed really off. The panel had people from Twitter, Joyent. That makes you think “lots of real world stuff to learn here boys”. Each panel member had five minutes to chat about scaling Rails, and what we got from that was:

  • Measure your app (genius!)
  • RDBMS isn’t the only way
  • Scaling Rails is just like scaling everything else

Fair enough. Nothing earth shattering, but onto the Q & A…. which seemed like it last for 5 minutes and then we were done.

We got to hear some good information about finding bugs via dtrace and such, but when it was done I asked myself: “What do I now know about scaling a Rails app that I didn’t before” and the answer was naught.

I can’t blame the panelists here. The time was short, and all talks about scalability and performance tend to be full with “It depends on your app….”. I would have loved to hear about how Twitter has changed its architecture over the growth (eBay has rewritten theirs 4 times?).

There was a lot of love thrown at JRuby. For a minute there I thought that 1.0 had been released! ;) In all seriousness, it is really interesting to see how much people are looking to JRuby. Very cool indeed.

To reiterate the advice to make your Rails app scale:

  • Patch GC a la Railsbench
  • Rewrite any bottleneck in C
  • Have Rails gen pages and use Apache to serve them
  • Don’t use a RDBMS
  • Sit around watching dtrace
  • Find a P4 1.8Ghz with FreeBSD 3.2
  • Make sure your CRC doesn’t take 20 milliseconds to do a check sum

Or, wait for JRuby 1.0. Or, go even further and check out the upcoming “Ass on Rails” that uses Assembler for that extra bump in performance.

May 18

RubyFX Script Announced at RailsConf

Java, Ruby, Tech 18 Comments »

It has been a great couple of weeks for FX script lovers. First we have JavaFX Script at JavaOne, and then we have the new RubyFX Script announcement at RailsConf.

What is RubyFX Script?

Think of a declarative Ruby that will let you build rich UIs on top of Swing or Tk.


title_tracks = select :indexof => track + 1,  :from => album, :in => albums, track in album.tracks where track >< album.title

def factors(n)
select :from => i, :in => [1..n/2], :where => n % i >< 0;

x = %w{1 2 3}
insert :number => 10, :as => :first, :into => x; // yields [10,1,2,3]
insert :number => 6 :after x[. >< 2]; // yields [10,1,2,6,3]

This is just an alpha version. There is talk that the new version will add in python-like whitespace characteristics.

Congrats! :)

May 15

Ruby on Rails: To Scale or Not to Scale

Ruby, Tech 1 Comment »

Ruby on Rails: To Scale or Not to Scale is the first geekSessions event, happening in SF on May 22nd, 6:30pm at the City Club.

I am looking forward to a pragmatic conversation with Jeremy LaTrasse, Ian McFarland, Jason Hoffman, and Bryan Cantrill where we can look at the issues with scaling web apps, and Rails in general, and how to solve them.

If you are in the area, I hope to meet you there.