Mar 19

Neal Gafter on Closures

Java, Tech 3 Comments »

I am still catching up on the activities around me and just found out that Neal Gafter is giving a talk on Closures in Java at the Silicon Valley JUG, tomorrow:

Dear SVJUG Members,

I very happy to announce that SVJUG has found it’s new home, Yes new home, there are few changes to our schedule.SVJUG meetings will be held on THIRD TUESDAYs of the month,instead of second wednesday.

SVJUG meetings will be held on Google Campus, instead of Netscape.atTunis Conference Room, Building 431600 Amphitheatre Parkway, Mountain View, CA 94043Special thanks to Neal Gafter, Google Inc for helping with the sponsorship. I will update the website with further logistics.

Also at the bottom of the message special Java One discount code for JUG members Looking forward for your continued support.Thanks,Venki Seshaadri

******* Begin SVJUG Annoucement **********
Meeting….: Silicon Valley Java Users Group (SVJUG)
Time…….: March 20,2007 (THIRD TUESDAY of each month)
Cost…….: Always FREE to all!
Topic……: Closures for JavaSpeaker….: Neal Gafter, Google Inc (
Description:We propose to add Closures  to the Java Programming Language. Closures simplify the use of APIs  that rely on the use of anonymous class instances, such as the concurrency  APIs and callbacks. More importantly, closures support control abstractions,  which are APIs that act as programmer-defined control constructs. This  talk describes the proposed language extension and its design rationale,  and shows how it will affect existing and future APIs
Speaker Bio:Neal Gafter is a software engineer and Java evangelist at Google. He was previously a senior staff engineer at Sun Microsystems, where he co-designed and implemented the Java language features in releases 1.4 through 5.0. Neal is coauthor of “Java Puzzlers: Traps, Pitfalls, and Corner Cases” (Addison Wesley, 2005). He was a member of the C++ Standards Committee and led the development of C and C++ compilers at Sun Microsystems, Microtec Research, and Texas Instruments. He holds a Ph.D. in computer science from the University of Rochester.
Agenda…..:18:30-19:00 Arrive & mingle with FoodDrinks & Snacks courtesy of — Google Inc 19:00-20:30 Presentation by Neal Gafter
Location…: Google, Inc.Tunis Conference Room, (Bldg. 43) 1600 Amphitheatre Parkway,Mountain View, CAMap available at enter from the
north side of the building, in the middle of the Google campus.

Time to show up and help push the direction of closures in the Java platform.

Mar 18

The Inner Life of the Cell

Tech No Comments »

A good friend of mine is a PhD Cambridge grad. He makes my bit-twiddling look like simple addition.

His current research revolves around working out what certain proteins do (which has lead to amazing discoveries that relate directly to diseases such as epilepsy).

We are now getting to a point where we can visualize what is happening down there in micro land. The BioVisions group has put together an amazing movie that describes a bunch of interactions that are happening in our cells.

When you watch it you feel like you are in a fantasy land. It is miraculous. It is happening constantly in EACH of your cells.

It is fun to see the Perl code that runs a lot of this work… and how even the bio folk are switching to Ruby!

Mar 16

Newsgator Mobile Feed Reader

Tech 2 Comments »

I was happy to see a new mobile feed reader from Newsgator the Go!.

I currently use Google Reader’s mobile web interface, and it is OK but not perfect. I like the notion that a client can make life easier (like Gmail for Mobile did for email).

Newsgator Go! seems pretty good, but the pain point for me is that you need to click through a lot to get to a message. At first you see your folders, then you drill down and see feeds with unread, then you get to see entries, and THEN you read the entry. I want the ability to do the river of news thing, and quickly see items bubbling through.


Mar 15

Screen readers and code

Tech 2 Comments »

Imagine using a screen reader to code:

if __name__ == "__main__":

compared too:

if name == "main"

I think that if I was a blind coder I would be developing / working with a system that is smart about the languages, else I would be frustrated into using COBOL or BASIC :)

NOTE: Using $DEITY to abstract what a reader uses for a higher power is the geekiest thing I have seen today.

Mar 13

Hpricot is great

Google, Ruby, Tech 1 Comment »

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']

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(""))

Not bad until we implement JsDOM ;)

Oh, and here is my nice custom search engine:

Google Custom Search

Mar 12

Don’t pray for rain

British, Personal, Sport 3 Comments »

With the cricket world cup upon us in the Caribbean the usual classic pub-like song has come up.

It is playing on their myspace page and you can tell their genius from the lyrics.

Don’t make us pray for rain

Watch out for Monty he’s gonna make the ball bounce, Nixon’s behind you and he’s ready to pounce

Kevin Peterson is as English as the rest of us, the Aussies wont get him out for a duck billed platypus.

Michael Vaughn Is our skipper Plunkett bowls a dipper won’t try the local herbs but might smoke a kipper

The wicket might be sticky, bowling will be tricky, .

If you wanna watch the match gonna have to throw a sickie

The ground might be slippy

The Aussies might get lippy

They’re gonna need some help, they should send for Skippy

So come on now lads, time to pull on your pads

don’t’ put us through a months worth of pain

Aint won it before time to even the score

Don’t make us pray for rain

Remember hit the ball run and then we will all have tea!

Freddie flint offs a hero, he says it’s no biggie

But he can bowl and bat while rolling a ciggie

Anything’s possible if you follow your dream

Even Scotland have got a cricket team

The ball will be spinning, throughout the innings, And up in the stand Fletcher will be grinning

No heat rashes No rash dashes come on everybody let’s forget about the ashes.

You score there’s no kissing can’t argue with dismissing In the commentary box Geoffrey boycotts reminiscing

So come on now lads, time to pull on your pads

don’t’ put us through a months worth of pain

Aint won it before time to even the score

Don’t make us pray for rain

We don’t need, the rain, don’t need, the rain, don’t need, the rain, don’t need, the rain

Mar 12

Amazon Login: Flip the bit

Tech 3 Comments »

If you start typing in the password, why not flip the radio button to “I am returning….” instead of making the user make that change?

Isn’t that the normal case over the person who puts in a password for a new account even though it isn’t the right place? That person should deal with the page refresh etc.


Mar 12

Competitious on Rails Tech Talk

Ruby, Tech 2 Comments »

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) { .. }

Mar 11

Apple er Vista Wow Factor

Tech No Comments »

Ben and I had fun talking about Wow factors, and you have to give Microsoft credit for taking the WOW term from a good source:

Mar 11

Does the iPhone support Flash? If so, hello developers!

Tech 3 Comments »

Does the iPhone support Flash?:

The jury is still out on this one, so at best the answer at this point is