Posts

Showing posts from March, 2010

Aloha Google!

I always said, the only way you're going to get me off of this island is if I got a job with Google. Time for me to put my life and career where my mouth is, because...

New Job with Google!
I'm stoked to announce that starting June 1st 2010 I will start a new adventure as a Developer Advocate for Google in Mountain View, California.

It's a very bittersweet moment, as this means I will have to leave my island paradise home. Hawaii has welcomed me with open arms and has grown to be my true home with all my friends and family. I have loved every minute of living here, and I believe that I shall return one day.

However, the real hot spot for emerging web systems, technologies, and companies is the San Francisco Bay Area. Silicon Valley has the momentum, the people, and the energy that can really fuel my passion for building web systems. It's extremely hard to replicate that environment, especially on Hawaii.

I made a very tough and personal decision to explore Bay Area…

Ruby on Rails and App Engine Performance Sample

Image
Statistics are always dangerous, and YMMV, but I wanted to post a set of performance tests I recently ran on a sample (and simple) Ruby on Rails application hosted on App Engine.

These numbers are after the application has warmed up, and I've tried to make this test show results under the best real life circumstances. Ruby on Rails applications do have a higher than normal start-up time on App Engine, an issue acknowledged and currently worked on. After they are warmed up, however, users shouldn't experience a difference.

The test was driven from the ab command, a simple benchmarking tool that comes with any Apache HTTPD software install. I ran the test from a Rackspace Cloud virtual machine.

The Rails code for this test can be found on Github.

Specifically, the controller and action being run in the test:

class ContactsController < ApplicationController def index @contacts = Contact.all end end
Note: the database is empty for this test.

Network latency between…

Owly is the Cutest Comic Book Perfect for Kids

Image
I have a three year old son, and like any father I think he's the bee's knees.  One of our traditions is to read three stories at bed time.  Naturally, as a big comic book and graphic novel fan myself, I am always on the lookout for graphic novels I can bring to story time.


I can say that without a doubt, I found the best comic book or graphic novel for kids of any age.  My son and I absolutely love the Owly graphic novel series of stories, and if you have a kid, know of any kid, or were ever a kid yourself, then you should fly to your nearest comic book shop and pick up a few of these books.

Owly is an adorable little Owl who lives in the forrest and loves working in his garden.  He lives up in his tree house with his best friend Wormy.  The stories center around simple morals with touching illustratives and characters.

Perhaps the best part of the Owly stories is the complete lack of words.  The entire story is told through illustrations and simple symbols like exclamation p…

Google App Engine is the Best Web Application Platform

It's a great time to be a web engineer. It's never been easier or quicker to go from idea to execution. Gone are the days when you had to provision hardware, configure operating systems, setup firewalls, or debug system components. Today it's as simple as pushing your latest code to source control or running a single command line script. I'm a software developer first, and a systems engineer second, so anything that can abstract the systems part is OK with me.

Shopping around for a cloud based web application platform can be a bit challenging, as the field itself is so new and it's sometimes difficult to compare offers as apples to apples. A vibrant and young ecosystem needs this sort of wild and varied experiments, and I hope to see more players enter the field of Web Application Platform as a Service.

I've searched for a long time, comparing offers and services, and it's my opinion that Google App Engine is the best web application platform on the ma…

Migrate from Wordpress to Blogger

I've just finished moving my blog from Wordpress to Blogger.  The domain name has even changed to http://blog.sethladd.com to reflect my continued efforts to link my digital assets to my Name as Brand.

While Wordpress is an excellent blogging platform, their free offerings at Wordpress.com left me wanting more.  You are unable to run any Javascript widgets or code at wordpress.com.  This means you can't run Google Analytics or Google AdSense.  Wordpress.com also requires you to pay to configure a custom domain name for you blog.  Granted, it's only $10 a year, but if I can get everything I want or need for free, then I'll go that route.

The Blogger platform is a natural fit.  They offer free hosting, free domain name configuration, and let you control the HTML templates and insert Javascript.  They have lots of widgets ready to go, as well.  Blogger makes it easy to monetize your blog, too.  I was sold, it's off to Blogger!

Converting a Wordpress blog to a Blogger …

Calculating the nth Term of a Cartesian Product

I recently had to calculate the nth term for a Cartesian Product. I wanted to avoid generating the entire Cartesian Product in order to jump to the nth term. I wanted a way to derive the nth term.

For example, let's say I have two arrays:

a = [ [1,2,3], [4,5] ]

The Cartesian Product of the above two arrays can be:

[[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]]

Now, when I ask for the 3rd term of the above cartesian product, I want to receive [3,4]. Again, I want to do this without calculating the entire set.

My solution is below:

def combo(arrays, num) arrays.map do |a| v = a[num % a.length] num /= a.length v end end

Example:

term = combo(a, 2) puts term.inspect # [2,4]

The next trick is to turn [2,4] back into 2.

Suggestions for how to improve this?