May 17

Tech Talk Showcase: Black and White

Tech 1 Comment »

I have updated the Google Tech Talk showcase to show the tight white version that mirrows the dark side.

I also cleaned it up, put in subscribe links, a link to open the video on Google Video itself, and more.

The code for this is hosted on Google Code: google-techtalk-showcase for anyone to play with.

I have to admit to preferring the black. Somehow I don’t think I will be able to persuade Google to change to an all black layout on their products.

May 16

A Few Weeks Before JavaOne

Java, Tech 7 Comments »

… picture a room in Santa Clara, a few weeks before JavaOne …

  • Jonathan: “JavaOne is coming up. What do we have to announce?”
  • Rich: “Well, the open source piece is almost complete.”
  • J: “Ok, but that is a bit of an anti-climax.. ‘hey… we kinda did it’. What else?”
  • R: “Well, we should probably come out with something that puts forth our platform as a real competitor to Silverlight, Apollo, and the open Web”
  • J: “What do we have?”
  • R: “Hmm. This one guy has an interesting pet project”
  • J: “jMaki? Yeah, we can brand that as the Sun Ajax Framework. I mean, we ship the JDK with Rhino now, so JavaScript is finally… kinda JavaScript”
  • R: “I was actually thinking of another toy…. F3″
  • J: “Ah yeah, that is interesting tech. I like how <> is used instead of != which is so predictable and boring”
  • R: “We can combine it with SavaJe and make it seem like we have a single brand vision”
  • J: “Can we come up with a brand that fluffy and confusing?”
  • R: “Our lawyers thought JavaFX Script would be really confused with JavaScript”
  • J: “Ok, what can we demo?”
  • R: “How about porting a Flash example in 3 days, showing that you can do mouseovers?”
  • J: “Compelling. And noone will notice how slow the full J2SE is on the phones right?”
  • R: “I will make sure I stay on script and don’t make the poor girl in charge of the demo sweat”
  • J: “Great! We shouldn’t think about how JRuby and others can fit in with this should we?”
  • R: “Nah. It is better to send the message that although we have hired core JRuby members, and ship Rhino, we want to push a brand new language on people.”
  • J: “You have done a great job for the last year”
  • R: “You two. And so has the UN”
May 16

Google Search: Unified toolbar and more

Google, Tech 2 Comments »

The small things matter. When you hit Google, you will see that the results look a little different.

New dynamically generated navigation links have been added above the search results to suggest additional information that is relevant to a user’s query. For example, a search for “python” will now generate links to Google Blog Search

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.

May 15

I’m a Ruby on Rails

Java, Ruby, Tech 5 Comments »

You know that the Mac ad campaign is doing well when you get parodies left right and center.

The latest is Rails vs. Java.

It is of course gratuitous and silly…. but it’s fun :)

May 14

Google Developer Podcast: First Episode on Guice

Google, Tech No Comments »

It is great to kick off a new set of Google Developer Podcasts.

It is a lot of fun to be working with Dick Wall and Carl Quinn (both of the Java Posse and fellow Googlers), and getting to chat with the talent inside of Google.

We have started off with a Guicey conversation with Bob Lee, and will soon be talking about our other products, apis, and cool open source work that we get to do.

Expect to see content on GData, GWT, Ajax APIs, and much more. If there is something you would like to hear about, let us know.

May 14

Hiding your Ruby behind Java interfaces

Java, Ruby, Tech 6 Comments »

I often get side tracked seeing JRuby as just a cure for Rails deployment issues. Although it is huge to think of a fast Ruby container, and having access to JVM internals for management and such, JRuby also has a fantastic set of Java integration features.

This means that while you are in Java-land, you can actually hide Ruby implementations of features behind nice Java interfaces. Rob Harrop showed off some of this at his JRuby DSL talk at JavaOne last Friday.

Here is a simple example of having Java code doing some kind of calculation, and behind the scenes the implementation is in Ruby.

The pieces are:

  • Java client code that does the calculation
  • Factory to return the object that can do the calculation
  • Calculation interface
  • The Ruby object that does the work
  • The Ruby file that makes the object implement the interface

Java Client Code

Calculator c = CalculatorFactory.getCalculator();
String calculation = "1 + 3";
System.out.println("Calculate(" + calculation + ") = " +  c.calculate(calculation));

Calculation interface

public interface Calculator {
public String calculate(String calculation);

Calculator Factory

The factory loads up the Ruby code, and then munges the Ruby object to return it back to Java-land as the Calculator interface:

public static Calculator getCalculator() {
Ruby runtime = Ruby.getDefaultInstance();

try {
} catch (Exception e) {

Object c = runtime.evalScript("");
c = JavaEmbedUtils.rubyToJava(runtime, (IRubyObject) c, Calculator.class);
return (Calculator) c;

The magic is done in JavaEmbedUtils.rubyToJava(runtime, (IRubyObject) c, Calculator.class);.

Ruby implementation of Calculator

The Ruby implementation is simple:

class RCalculator
def calculate(s)
return eval(s).to_s

To make it implement Calculator we monkey patch it by also loading the makejcalculator.rb file:

require 'java'

class RCalculator
include Java::Calculator

You could obviously do this all at once, but this pattern can allow you to share the Ruby code, and you may have other Ruby that you can’t just hack on.

This pattern will be common, so having a java_implement RCalculator, Java::Calculator simple piece of meta-code is useful.

All in all, JRuby gives you everything you need to do as much of your business logic in Ruby, and never expose it. This gives me thoughts of working on a Java team and telling my team mates about the interfaces they can use, and writing the entire app in Ruby behind the scenes ;)

May 13

Spring brings in the Money

Tech 1 Comment »

Interface 21 has announced $10 million in funding fronted by Benchmark.

Congrats guys. I hope you finally bring The Stack, that I have been shouting about for a long time, to fruition. The Java community really needs it.

Remember the little guys ;)

May 13

Finally a fast JRE download?

Tech 6 Comments »

If Java could a) startup quickly, and b) download and install as well as Flash, well, the world would be a very different place.

The experience in both startup and JRE browser install is still quite painful. Going to Iris and having to click through 3 “Do you trusst this applet” dialogs, only to get a ClassDefNotFound error says it all.

Maybe Sun has finally listened and realized that you CAN just download a microkernel and have it pull in what it needs to enhance perceived speed:

One concern about JavaFX on the desktop is the deployment story. The JRE is a huge download for a user that doesn’t already have it installed and the current user experience for on-demand installation from the browser is not very good. Brewin fleshed out remarks made during the keynote to the effect that Java 6 Update 2 will introduce a new deployment model for the JRE where the initial download is very small and additional JRE components are lazily downloaded only as needed. He said that the concept is very similar to the Java Kernel project proposed for Java 7. Asked if a similar deployment scenario might be implemented for Java ME, he said it was certainly possible and that naturally this would be driven by the Java Community Process.

I hope so. Java has some serious advantages, and maybe there is still a hope?

May 11

The Anti-Jobs: iPhone vs. jPhone

Tech 2 Comments »

Classic quote from JavaOne day one keynote:

Rich Green: “If I was holding it up in my hand, how many of you would want this”

[insert crickets]

“That’s a start… we will get it in your hands and then we will see what you have to say”