Archive for September, 2007


Friday, September 28th, 2007

C2 Wiki discusses how nil.to_s.empty? is available in rails and nil.blank? is provided for Ruby On Rails,

>> true

>> true

String s = null;
return s == null;
>> true

Let’s say we want to check that s is non-blank string. The danger is that s could be null. We will use random to seed s (Or just think of it as the invisible hand typing a form value). In ruby we can do:
s = rand < 0.5 ? “” : nil
>> true

And in java?
String s = Math.random() < 0.5? “” : null;
return !s.equals(“”); //Playing roulette
>> NullPointerException?!

if (s!=null) {
return !s.equals(“”);
} else {
return false;
>> true

Verbosity, or simplicity? I feel that in web development where checking for blanks occur on a frequent basis, ruby has the better syntax. Not just in length, but it fits with my mental context as well.


Thursday, September 27th, 2007

IntensCITY week, the celebration of Wellington’s urban spaces, is just about to kick off. A key part of the week is the INSite exhibition, which consists of eight shipping containers distributed around the city as artists’ spaces and installations. Here’s a ZoomIn group to show their locations (or you can go directly to the group map on ZoomIn).

As these are ZoomIn places, you can of course add your own photos and comments and edit the descriptions. I’ve kicked that process off, but if you manage to get some good photos or have some responses you want to share, please go ahead and do so.

ZoomIn and Summer of Code Open Source Awards finalists

Wednesday, September 26th, 2007

We’ve just been notified that ZoomIn has been nominated in the Open source in Business category and Summer of Code has been nominated in the Open source in Education. Woo Hoo ! Thanks to the NZ Open Source Association

Thanks for the recognition for ZoomIn and Summer of Code. We’re not resting with what’ve got. We’re working really hard on some major  improvements to ZoomIn and launching Summer of Code 2.0.

Kudo’s to our CHQ cousins Silverstripe in making the final selection also!

Congrats to PlanHQ and Ponoko on being techcrunched

Wednesday, September 26th, 2007

Hot off the heels of Ponoko being at the techcrunch 40 , PlanHQ have just been techcrunched.

Congrats to Dave, Tim and the teams at Ponoko and PlanHQ

Silicon Welly represent !

Gearing up for the start of Summer of Code 2.0

Tuesday, September 25th, 2007



We’ve been busy working on Summer of Code 2.0. In the past couple months, we’ve been planning, recruiting, presenting, testing and marking . Phew ! Lot’s of cool stuff in the pipeline. Plenty of awesome seminars in the works. Stay tuned for more announcements.

We have a few events this week. John and Peter will at Victoria University’s ICT evening at Rutherford House on Wednesday and at the Summer of Code 2.0 Info Evening on Thursday.

Roll on Summer ! Roll on Summer of Code 2.0!

Call for Summer of Code topics

Sunday, September 23rd, 2007

We’re starting to organise the Summer of Code seminar series, and we’re looking for speakers to talk to our students.

We’re looking for speakers and topics to help create a kick ass seminar series. We have 15 seminars that run over the summer (Nov 07 – Feb 08) and we’re looking for any topics that you can benefit the next generation of ICT graduates. All the seminars are based in Wellington, but they’ll be video’d and put up on youtube.

We’re looking at three different categories: Inspirational People, Technology ideas & concepts and new thinking.

If you think that you or your company have a speaker or topic that you think will be a hit with the Summer of Code students then let us know.

Here’s the list of speakers from last year’s programme to give you a taste of what we’re looking for:

  • Michael Koziarski – Ruby on Rails Workshop
  • Milton Ngan (CTO – Weta) on Distributed computing
  • Rowan Simpson (Trade Me) on developing high level web systems
  • Mark Robotham (CHQ) on NZ start-ups and what incubators can provide
  • Nat Torkington (O’Reilly) on US start-up culture.
  • Paul Gould (Trade Me) on Database systems.
  • Tomek Piatek (ProjectX) on code management practices.
  • Rod Drury (Aftermail) on Entrepreneurship in NZ.
  • Hayden Vink (Hansel) on Interactive Design.
  • Stephen Cheng (Innaworks) on Mobile phone development
  • Chris Di Bona (Google) Opensource and life at Google
  • Mark Robotham (Creative HQ) Entreneurship and Incubators
  • John Clegg (ProjectX) on how to improve your resume.

Monit – clever monitoring of your unix services

Wednesday, September 19th, 2007


I’ve just discovered this amazingly simple process monitoring tool Monit, that will monitor, alert and restart processes if sees any trouble. We’re currently in the process of adding monit to all our production servers. I’ve been testing how sturdy is it and it seems really good, ie. I can kill a process and it will recover and it will even restart it if the process gets too big!

The configuration is in a psuedo text format. Pretty easy to understand. Here’s an edited version of our config.

check process rails_app_4000 with pidfile /path/to/rails_app/tmp/pids/
group mongrel
start program = “/usr/bin/mongrel_rails start -d -e production -a -c /path/to/rails_app –user www –group www -p 4000 -P tmp/pids/ -l /path/to/rails_app/log/mongrel.4000.log”
stop program = “/usr/bin/mongrel_rails stop -c /path/to/rails_app/ -P tmp/pids/”

if failed host port 4000 protocol http
with timeout 20 seconds
then restart

if totalmem > 100 Mb then restart
if cpu is greater than 60% for 2 cycles then alert
#if cpu > 90% for 5 cycles then restart
#if loadavg(5min) greater than 10 for 8 cycles then restart
if 3 restarts within 5 cycles then timeout
group rails_app

Monit is “mongrel friendly” thanks to Peter Jones who has developed a tool called Bowtie to generate mongrel_cluster + apache + monit configs. Its pretty use to use.

We’re now looking at Seesaw as another tool to help with the redundancy of our rails stack . (Its cool to see an app coming out of Australia !)

Application scaling and memcache

Monday, September 17th, 2007

We’ve known about the secret scaling powers of memcache for some time (Here’s a list of sites using it) , BUT … I have just read some slides from a presentation which provides an overview of how facebook is using memcache. (Slide 21)

Facebook uses

  • 200 dedicated memcache servers
  • Each server is 16GB quad core AMD64
  • Over 3Tb of memcache

Wow 3 Terabytes of memcache ! – It looks like memcache is the application stack for facebook. Memcache and equivalent tools will change the way that people think about design and structure of their application. Just because you’ve got a blazingly fast memory doesn’t mean that you shouldn’t tune your database !

We’ve just noticed that there is an pgmemcache API for memcache and Postgresql. Now we have to think about where do you put your cache ? at the application level or the database level ?

FYI: The facebook team have been contributing to the memcache source and they recommend that you use v 1.2.x rather than 1.1.x . (Note Debian and ubuntu has 1.1.3 by default, you’ll need to manually install the new package)

Barcamp slides

Monday, September 17th, 2007

Here are the slides from our talks at Bar camp.

John & Paul on “Why your website is SLOW and how you can make it fast!” – John’s slides in PDF (2.2Mb) and Paul’s slides in PDF (87K )

Tom on “Space, Place and the meaning of Where” – (Powerpoint 7.5Mb and Openoffice 7Mb)

We had a great time talking to everyone and putting faces to some famous bloggers.

Kudos to both Mike’s, Nat and Fronde staff for putting on a fantastic event!

Big Ideas are OK, action is better

Wednesday, September 12th, 2007

Talk is cheap, because supply exceeds demand.” – Anonymous

Seth Godin, has just posted an answer to a question he ask was asked on “Why do you give away your ideas so freely ?”.

Here’s what he said….

I responded that ideas are easy, doing stuff is hard.

My feeling is that the more often you create and share ideas, the better you get at it. The process of manipulating and ultimately spreading ideas improves both the quality and the quantity of what you create, at least it does for me.

And the clincher for me …

History is littered with inventors who had “great” ideas but kept them quiet and then poorly executed them. And history is lit up with do-ers who took ideas that were floating around in the ether and actually made something happen. In fact, just about every successful venture is based on an unoriginal idea, beautifully executed.

There are a lot of really smart people with great ideas and a lot of talk. It takes a lot of balls to ante up and do the hard yards to make things happen. Trade Me is clear example of an unoriginal idea, superbly executed!