Archive for September, 2007

nil.blank?

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,

Ruby
[source:ruby]
nil.to_s.empty?
>> true
[/source]

Rails
[source:ruby]
nil.blank?
>> true
[/source]

Java
[source:Java]
String s = null;
return s == null;
>> true
[/source]

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:
[source:ruby]
s = rand < 0.5 ? “” : nil
!s.blank?
>> true
[/source]

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

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

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.

INSite

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

dsc_0030.JPGdsc_0061.JPG

dsc_0058.JPGdsc_0059.JPG



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!