May 31

Waking up to the green, red, and the throbbing

Google, Tech 2 Comments »

It was really cool to wake up and check the site to see where we are in dev day:

throbbing.png

livestream.png

May 31

Google Developer Day: The website using our tech

Google, Tech 4 Comments »

I have been very much heads down for Google Developer Day.

We finally got to launch the website, which uses:

  • Google Maps API: Of course
  • Google AJAX Feed API: Showing blog entries on the location home page, and in a lightbox on the main page
  • Google Picasa API: Showing photos on the location pages
  • Google Spreadsheet Data API: We are using this as a pseudo database that people at the various locations use to control their site

There are fun hacks galore, such as using cron to update a google spreadsheet with the current time in various locations, and then accessing that spreadsheet from JavaScript to get the data.

The best part though, is the throbbing:

I want to say thanks to my partner in crime on this. Pamela Fox. She may be scared of PacMan, but she can sure hack JS :)

May 23

Bob Brewin, CTO at Sun, on Spring

Java, Tech 6 Comments »

James Governor of RedMonk interviewed Bob Brewin at JavaOne on a bunch of topics.

I found it interesting that Bob seemed to sweat a little when James said that Spring Wins and that Sun needs to step it up (as BEA and Oracle have).

Bob didn’t really answer the question, but instead likened the situation to Hibernate “in the spirit of how things worked with Java persistence”.

That sounds like pushing Spring down a JPA / standards path… which would definitely be a win for Sun, on many ways. It doesn’t seem as easy a fit as JPA, since Spring is overarching and gets into so many APIs… to fix them.

May 23

Google Maps says “Take That” to Powerpoint

Google, Tech 3 Comments »

A few of us were laughing at the powerpoint gurus that had fun with animating Google Maps markers for a presentation.

Then I realised that we can of course do animations with the Maps API itself!

I pinged Pamela Fox, who is my goto person for anything Google Map-ish, and with a couple lines of code she made the locations for Google Developer Day spread out.

The tweak took:

Setup the points

The createMarker function now sets up some meta data:

var tempPoint = new GLatLng(37, -122);
var marker = new GMarker(tempPoint, markerOpts);
marker.pt = point;
var latAway = point.lat() - tempPoint.lat();
var lngAway = point.lng() - tempPoint.lng();
marker.latTravel = latAway/50.0;
marker.lngTravel = lngAway/50.0;

Animate the beasts

animateMarkers does the work of moving the marker a little and then calls itself via a setTimeout.

function animateMarkers() {
for (var i=0; i < cm_mapMarkers.length; i++) {
var curMarker = cm_mapMarkers[i];
var curPoint = curMarker.getPoint();
var newPoint = new GLatLng(curPoint.lat() + curMarker.latTravel, curPoint.lng() + curMarker.lngTravel);
cm_mapMarkers[i].setPoint(newPoint);
}

cm_frameNumber++;
if (cm_frameNumber < 50) {
setTimeout(animateMarkers, 20);
}
}

Kick is all off

Then we kick it all off from a simple:

setTimeout(animateMarkers, 1000);

Tweaking the animation

You can mess with the variables for when it starts, how often to redraw (to set the frame-rate), and the amount to move to get different effects. Sometimes on Firefox it stutters. I guess this shows that we don't have a nice concurrent GC as Java 6 does.

Next, we will have hello kitty float randomly around the screen singing in the language of the country.... but in all seriousness, you can do some interesting things on top of the maps. You can even use canvas or SVG.

GDD Animation

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 21

Guitar Hero Karaoke Band 2.0

Tech 6 Comments »

I ended up at the BBC in Menlo Park the other day, and was surprised to see karaoke.

The brave folk who went on stage were stereotypes of the art. We had the biker girl who kept going up with Annie Lennox songs…. and you got the feeling that she would look at the song and think “Oh yeah I totally know that one” and then on stage would find out “Oh, I really only know the chorus”.

Then we had the Sarah Jessica Parker character from The Jerk, who kept reaching back to grab her leg. All is forgiven though, as she was the one person who could actually sing, and she worked the crowd well too.

Others followed, such as the guy with the wedding ring, who we had bets on either:

  • He is a consulting geek here by himself
  • His wife is a nurse and is working nights

Karaoke is fun. Some people really enjoy it. As I sat there watching it I realised that someone is going to make some money when they create Guitar Hero Karaoke Band 2.0 which will be a mashup of (yes I used mashup in a normal sentence… doesn’t that feel as bad as “no-brainer”?):

  • Karaoke: Let people sing
  • Guitar Hero: Let someone jam on the guitar
  • The Entire Band: Add drums, keyboards, and hell…. the tambourine, triangle, and recorder too if people want it
  • Let people at the bar vote on the people
  • Network the bars, and have a pyramid scheme
  • The top of the pyramid scheme is an american idol like tv show. But, you are the judges, not Simon (for the entire process, not just the final 32)
  • Add Japanese style rooms where you can do this with mates, and choose to go public
  • Upload it all to YouTube
May 21

Sun and Ajax

Ajax, Java, Tech 2 Comments »

After seeing the Gosling Outlines the Trouble With Ajax in a Sun feed, I glanced and found it funny to see NetNewsWire showing me:

  • Sample Ajax Components in Java Studio Creator
  • Using Ajax With Non-HTML Markup in JavaServer Faces
  • Gosling Outlines the Trouble With Ajax
  • Screencast Demo of the Java BluePrints Ajax Components
  • All About Ajax and Java Studio Creator
  • What Is Project jMaki?
  • Java Petstore 2.0 Reference Application
  • Ajax Impact News: Mix and match JavaScript widgets from different Ajax frameworks with jMaki
  • W3C Works on API Spec for HTTP Functionality
  • Giving jMaki a Whirl
  • Build Ajax-based Web Apps with Java Studio Creator (zip)
  • jMaki Google Ajax Search Component
  • jMaki Demo Screencast
  • Sun’s Tim Bray Discusses "AjaxBehaving Badly" and Other Misconceptions
  • Sun Joins the OpenAjax Alliance and Dojo Foundation
May 18

Google Developer Day: Schedule Released, 2 Weeks Out

Google, Tech 9 Comments »

Google Developer Day 2007 is two weeks away.

We have published the schedule for most of the countries, and I am excited for the event.

We have great talks around the world (and some of which will be available live on the web) such as:

  • Keynote by Jeff Huber, Vice President, Engineering
  • Building Better Ajax Applications
  • Extending Google SketchUp: A Developer’s View
  • Google Maps API Introduction
  • Intro to Google Data APIs: Mashing up Google Calendar, Spreadsheets and More
  • YouTube APIs: Where We Are and Where We’re Going
  • Google and the Geoweb
  • Enterprise Search APIs: Making Information Accessible at Work
  • The Google AJAX APIs
  • A Computing System for the World’s Information: A Look Behind the Scenes at Google
  • Mashups the Easy Way
  • KML on Earth – Advanced Topics
  • New Features in the Google Maps API
  • Fast, Beautiful, Easy: Pick Three — Building Web User Interfaces in the Java Programming Language with Google Web Toolkit
  • Testing Distributed Systems with AJAX, XML – Lessons Learned from Google Checkout
  • Making Maps Mashups Discoverable
  • Advanced Topics in Gdata
  • Google Desktop Gadgets – Access, Share and Personalize Information
  • Python Design Patterns
  • KML Search and Developing Maps Mashups Using KML/GeoRSS
  • Custom Search Engine – Google Search in Your Hands
  • Distribute Your Content With Universal Gadgets
  • Building Better AJAX Applications: Nuts & Bolts
  • Open Source Development
  • BBC Backstage
  • The GWT Bet: Google Web Toolkit
  • From Mashup to Business (Nestoria.co.uk)

And this is just the half of it. The registration turn out has blown us all away, and now we just want May 31st to come around so we can get this community together.

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.

Examples

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;
end

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 17

Extreme GUI Makeover 2008: Ajax vs. Swing

Tech 6 Comments »

Romain and team did a good job with their Extreme GUI makeover talk.

Ben and I were wondering if it would be fun to have a competition next year. A Swing team, and an Ajax team get the same spec, and have to come up with a great application.

Now, at first we thought that we would have no chance. We have an XHR, and the Swing team has JOGL and Java2D!

How can we even the playing field? How about this. We keep track of the hours that we spend on the project, and at the JavaOne talk, we give the other team an envelope with the number of hours spent on the project.

What do you think guys?