Jun 15

GeoSense: I wish I had this in Geography class

Tech 3 Comments »

Geography was always a let down for me in school. It was like history. It could be so interesting, but the teachers somehow managed to skirt the interesting topics, and instead have you learning inane boring content.

I wish we had tools such as GeoSense in the classroom.

It would be great to be able to “play a game” with other students. I would have really gotten into physical geography then. Also, it doesn’t stop at just “where is some place in Africa”. You can extend this to have information on all kinds of political, historical, and social issues that relate to geography.

I am sure todays teachers are wise to this and don’t get up front in class and blabber on at the kids :/


Jun 13

GSpreadsheet: JavaScript Helper for Google Spreadsheets

Google, JavaScript, Tech 10 Comments »

I am finding that more and more little applications that I have use Google Spreadsheets to store some data that I use in an Ajax app. After using the core API, you find yourself looking at fun code like foo.$t.

Most of the time I want a simple tabular view over a spreadsheet that has the first row as a header, and other rows as the data.

To do this I created GSpreadsheet which lets me do:

GSpreadsheet.load("pSYwzniwpzSFnt8Ix3ohQQA", { index: 'firstname' }, function(gs) {
// display all
document.getElementById("displayall").innerHTML = gs.displayAll();

// show one
var row = gs.select('Bob');
document.getElementById("onebyindex").innerHTML = row.email;

// show by row number
row = gs.select(1);
document.getElementById("onebyrownum").innerHTML = row.email;

// display one row
document.getElementById("displayrow").innerHTML = gs.displayRow('Bob');

You will see that you call GSpreadsheet.load(..., callback(takesAgsObject))

This is because of all of the asynchronous work going on. To get the JSON from the Spreadsheet back end you are always using the json-in-script output, and getting it by dynamically creating a script tag. The real dirty hack in this code is how to do that, and have the callback give you back the info to create the new object. To do this, I am creating a static method on the fly with eval() and calling into it passing in the right info. It’s real ugly:

GSpreadsheet.load = function(key, options, callback) {
if (!options['worksheet']) options['worksheet'] = 'od6';
var worksheet = options['worksheet'];

var callbackName = "GSpreadsheet.loader_" + key + "_" + worksheet;
eval(callbackName + " = function(json) { var gs = new GSpreadsheet(key, json, options); callback(gs); }");

var script = document.createElement('script');

script.setAttribute('src', 'http://spreadsheets.google.com/feeds/list/' + key + '/' + worksheet + '/public/values' +
'?alt=json-in-script&callback=' + callbackName);
script.setAttribute('id', 'jsonScript');
script.setAttribute('type', 'text/javascript');
Jun 13

Custom Search Engine that automatically knows what to site restrict

Tech 3 Comments »

I have been waiting for this for awhile. You can now create the list of sites for a custom search engine on the fly.

This search below should search through my blogroll on the left (which I never update but that is another issue to do with me not generating the list from my opml feed like I should).

E.g. search for something like ‘gears’. How it does this on the fly is quite impressive.

Jun 11

Safari on Windows

Tech 8 Comments »

This was an obvious step. Adobe has had to port WebKit to Windows for Apollo^H^H^H^H^H^H AIR. Apple had to port some of it for iTunes. The important piece here is WebKit (not Safari). The WebKit nightlies are insanely fast. I can’t wait to hear how they run on Windows.

I am not sure exactly which target demographic will be running Safari on Windows though….. and of course, it means that we have yet another browser to support (although I am sure the windows version won’t have any bugs different from the Mac version).

Jun 11

Sopranos: Finales are really hard but sheesh

TV / Movie 3 Comments »

It isn’t amazing directing to end that way. It is simple. It doesn’t answer any of the fun questions. Anyone can turn off the camera after a “normal” episode with some weird lighting.

Wow, I am disappointed. Tony showed that he isn’t the friendly bad guy after what he did with Ade and Christopher. He deserved worse. I really hope that a movie doesn’t come out.

Jun 10

JRuby 1.0: Congrats to the team

Tech 1 Comment »

A 1.0 release is a major decision, and you can do it too soon, or too late.

I am glad that we are at JRuby 1.0, and that the team has some exciting things for the future.

So I’ll do a little recap here. JRuby 1.0 was focused almost entirely on one goal: Ruby 1.8.x compatibility. To that end, we are now the only alternative Ruby implementation that can reasonably claim we’re “compatible”. It’s no longer a question of whether we can run Ruby applications or not…we’ve proven that again and again. The issues people run into now are those requiring minor behavioral tweaks, minor parser tweaks, and occasionally exploration of some peculiar threading or memory concerns. It’s been a long time coming, but the compatibility issue is largely answered.

I want to update my “Ruby in a Browser” to have a lean jruby 1.0 jar that works, and also show how it works with RJS which I have played with. I have also had some interesting emails, most recently from a Harvard Extension teacher combining it with Slidy to have code embedded in his slides. And there is always the potential birth of ThickR ;)

Jun 07

Google Developer Day 2007 Wrapup Video

Tech 1 Comment »

The good folks put together footage from around the world on Google Developer Day 2007.

They even put in a cameo with me in it. Bonus points to anyone who finds me. I can barely do it and I know where I was!

I am excited to see what 2008 will produce.

Jun 06

iPhone v1: Get burned like Apple TV?

Apple, Tech 6 Comments »

I am really torn on the iPhone. I do want one. It looks like they are changing their tune on an SDK (sounds like Flash) so we will see cool third party applications.

My main issue is when to bite the bullet.

Ben bought the Apple TV right away. Now the poor guy is looking at a 40GB beast, when he would definitely have spent a few more bugs to get a 160GB upgrade. Apple should really do something to help him in fact. It isn’t like this is 2 years later… it is a matter or months!

Will the same thing happen with the iPhone? If I pretend to be cool and get one on day one, will someone laugh at me in 3 months as a version with 4 times the hd space, and other new features kick in? The pressure to release this thing is so huge that you KNOW that a bunch of corners had to be cut. The date was firm, so they had to do anything to make that date…. and when it is over they can finish up what they really wanted in v1.

So, it may be wise for me to wait on this puppy. Too much $ and the 2 yr contract piece kicks in too.


Jun 05

Rails on IronRuby == Rails on Windows Server

Tech 11 Comments »

I disagree with Charlie on one point:

This is a good friend’s belief, but he’s won me over: we don’t believe Microsoft would ever willingly allow IronRuby to get to the point of running Rails, since that would directly compete with their ASP.NET server, software, and tool offerings. What would be the benefit to them of a free runtime running a free language implementation that runs a free web framework? Probably zero. And as Martin Fowler and others have blogged about NUnit, Microsoft hasn’t exactly been lovey-dovey with OSS projects that impact (or are perceived to impact) their bottom line.

Microsoft cares about the Windows platform. If they can sell more Windows by having a fantastic IronRuby implementation that can run Rails, then that is a net win for them.

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.