Computers & Internet

27th January
written by simplelight

Facebook isn’t often cited as a cloud computing company since the ‘Social’ moniker has proven to be stickier. It does, however, meet the common definition of ‘Cloud’ i.e. the management of the hardware is highly abstracted from its users, the infrastructure is highly elastic, a variety of services (billing, authentication etc.) are bundled, and the underlying hardware is geographically dispersed.

What is fascinating is that Facebook, more than other cloud companies, gives us a glimpse into a future where computing and storage are virtually free and ubiquitous. With $2 billion in revenue for 2010 and about 500M users, Facebook has revenue of roughly $4 per user. With some back of the envelope math, it seems likely that the variable cost for each additional user is about $1 per year. Think of the services that Facebook is providing its users for $1. Unlimited photo storage and sharing. A contact database. Email. Instant messaging. A gaming platform.

The economics in the consumer cloud are compelling. They will become more so over time and as large enterprises realize that there is no strategic value in common IT, there will be a similar shift for businesses.

24th October
written by simplelight

Everything you need to know about HTML5 and video codec support. And a chunk of html code that embeds a video into a website using the HTML5 <video> element, falling back to Flash automatically, without the use of JavaScript or browser-sniffing. It therefore works in RSS readers (no JavaScript), on the iPhone / iPad (don’t support Flash) and on many browser platforms.

11th August
written by simplelight

collect {|item|block} and map{|item|block} do the same thing – return an array of things returned by the block.  This is different from returning specific items in the collection being iterated over.

Which leads to select.

select{|item|block} will return actual collection items being iterated over if, for each item, the block condition evaluates to true. Not the same as returning what the block, itself, may return.  In the case of select, the block would always return an instance of class TrueClass or FalseClass.  Typically, [true, false, ..., true] is not what you’re looking for in your resulting array.

Slightly modifying the core RDoc example:

a = ["a", "b", "c", "d"]      #=> ["a", "b", "c", "d"] {|item|"a" == item}     #=> [true, false, false, false] {|item|"a" == item}  #=> ["a"]

6th November
written by simplelight

After downloading the latest Ubuntu desktop appliance from VMware, the following steps are required to get a Rails environment up and running:

Create a new user and add all the required access

Get Ubuntu up to date

sudo apt-get update
sudo apt-get dist-upgrade

Install compile packages

sudo apt-get install build-essential

Install Ruby, MySQL and the Open SSL library

sudo apt-get install ruby ri rdoc mysql-server libmysqlclient15-dev libopenssl-ruby ruby1.8-dev

Install Sun Java

sudo apt-get install sun-java6-jre sun-java6-plugin

Get the latest ruby gems from RubyForge

tar xvzf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb

Remove the .tgz file and erase the rubygems-1.3.5 directory too.

Create the following symbolic links

sudo ln -s /usr/bin/gem1.8 /usr/local/bin/gem
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb

Install Rails

sudo gem install rails

Add Github for legacy gems

gem sources -a

Switch to Gemcutter for primary gem repository

sudo gem install gemcutter
gem tumble
18th August
written by simplelight

One of the promises of the internet has always been the collapsing of the pipeline between content creators and content consumers. We have already witnessed this phenomonen in the newspaper industry as the cost of distributing news fell from over $100 per subscriber per year to fractions of a penny.

As internet technology improves the same will happen to movies and television. Vuze, formerly Azureus, is a Silicon Valley startup that is at the forefront of this trend. By utilitizing peer-to-peer Bittorrent technology, Vuze has inverted the usual relationship in video streaming between scale and performance. Most internet streaming video degrades less than gracefully as more users watch a given stream. With peer-to-peer technology, the more people who watch the same show as you, the better your quality will be. Not only that, as more viewers join the network, the cost of delivering a high definition video stream to your TV, iPod or laptop declines to zero. With millions of concurrent users at any one time on the Vuze HD network (as of July 2009), you can be sure that someone will be watching what you are.

Just as the newspaper empires took over a decade to crumble, it’s likely that the large production studios will defend their fortresses for as long as possible. But in the long run, creative producers and quality content will gravitate to the cheapest distribution network. Consumers will pay less for their television shows, and the people who create the shows we watch will keep more of the profit.

16th August
written by simplelight

If you’ve always found using floats in CSS to be mostly trial and error then this Floatorial might clear up matters a little.

29th July
written by simplelight

There is a fairly lengthy list of tasks when first starting a website. This is a compilation for my future sanity:

  1. Choose a website name (do this first because you need it for all subsequent steps. Don’t continue until you’ve done this because it’s almost impossible to change later.
  2. Register the URL. I recommend hosting with Dreamhost. They’re great value for money and the support is excellent. In general, it’s easier to register your URL through your hosting provider.
  3. Submit the URL to all the search engines as soon as possible. The crawlers will take a while to getting around to your site.
  4. Download the Aptana IDE. It’s a great, free editor.
  5. Download and install Firefox. Install the Firebug plugin.
  6. Make sure you have 301 redirects to ensure that Google sees your website as a single URL and not two different websites (one for and another for If you’re using Dreamhost this is easily achieved by selecting your preferred URL format under the ‘Manage Domains’ section of the Dreamhost panel. There is no need for a .htaccess file if you’re using Phusion Passenger.
  7. Sign up for Google Analytics, Google Webmaster and (if you plan on advertising) Google Adwords
  8. When designing your initial web layout, leave space for ads if you plan to add them later.
  9. Good link for embedding video
  10. After a month or so, use Hubspot to check your search engine hygiene.

I’ll add more to this list over time.

1st July
written by simplelight

It’s a pity that Yahoo is still maintaining the 5000 query limit per IP address. 5000 stock quotes is the equivalent of 10 years of daily data for two companies only.

18th June
written by simplelight

jQuery Tools is a great UI javascript library for web designers

16th June
written by simplelight

Twubs is a great website for tracking a specific Twitter hashtag. For instance, you can follow the post-election chaos in Iran in real time. The window below shows the current activity surrounding the election in Iran. It was getting over 1000 messages per minute on June 16, 2009.