Earth Hour
At 8pm Saturday March 29th, people around the world turned out the lights in support of Earth Hour. Earth Hour is a campaign organized by the WWF to raise awareness of the connection between energy use and global climate change. The event encourages people to take action by turning off their lights and power to any non-essential devices for the 60 minutes between 8pm and 9pm.
This year’s Earth Hour was a very busy event for me and my new company Small Energy Group. In partnership with the University of British Columbia, Vancouver City Hall, and the Village of Hartley Bay, we monitored the energy use over the day for each site to quantify and make visible the energy savings impact of their actions. UBC had committed to powering down non-essential services over the entire day; City Hall shut off the floodlights lighting the art deco facade for the building; and in Hartley Bay, they turned off the diesel generator that supplies power to the whole community plunging the village into darkness.
You can see the results of the savings achieved by each site by checking out the web site: http://earthhour.smallenergygroup.com/.
Tags: earth hour, energy, small energy group
Filed under environment, life, technology :
Comments (0) :
Apr 10th, 2008
Agile Vancouver Tech Talk #2 - TDD vs BDD
Last Monday night, Skye and I hosted the second Agile Vancouver tech talk. This month’s topic was test-driven development (TDD) vs. behaviour-driven development (BDD). The goal of the session was to give participants some hands-on experience with TDD and a bit of exposure to BDD. Participants were encouraged to bring laptops to the session if they had them or pair/partner up with others if they didn’t.
About 50 participants showed up for the session. Most people worked in Java using JUnit (with one pair using TestNG), another handful used C# (using NUnit) and one group worked in Perl and Python. I wrote my tests using JBehave and showed my solution on the projector to give beginners a bit of a jump start.
For the problem, I built some scenarios from my weekend’s trip to the grocery store. Participants were encouraged to write a solution for calculating the total of a shopping receipt from a list of items. I presented the following 10 scenarios:
- 1 x EnviroKidz Waffles - $3.79
- 2 x Unsalted Rice Cakes - $2.99
- 1.16kg Broccoli @ 2.82/kg
- 1 x Happy Planet Strawberry Banana Juice - $3.50 + $0.20 Deposit +
$0.03 Enviro fee -
- 1. 1 x EnviroKidz Waffles - $3.79
- 2 x Unsalted Rice Cakes - $2.99
- 1.16kg Broccoli @ 2.82/kg
- Same as 5. but with a $0.05 No plastic bag discount
- 2 x Amy’s Organic Soup - $2.99 / $2.79 for Club members (Club #000104991)
- Calculate frequent shopper points for previous order, where new points = floor(total * 3)
- Calculate new total of frequent shopper points for the previous scenario. Customer Club #000104991 currently has 933 points.
- Non-groceries have 5% GST applied. Calculate the total for:
- 1 x EnviroKidz Waffles - $3.79
- 1 x Economist - $7.50
We spent an hour working on coding up the scenarios, where most participants made it up to scenario #5. This was followed by 30 minutes of discussion where participants presented their code. The most interesting solution IMO was produced by the Perl group who wrote a simple Regex parser for the items and started implementing a wiki-style DSL for specifying test scenarios.
On the whole, I think that the session went quite well, and most participants enjoyed having the opportunity to sit down and directly try out TDD. I think that we will try to do more hands-on sessions for subsequent tech-talk gatherings, potentially building on what we worked on in this session.
If you attended Monday night’s session and would like to post your solution to the scenarios, please feel free to leave a comment on this post linking to your code. I intend to post my solution for these scenarios at some point soon.
Tags: agile, agile vancouver, BDD, TDD, tech talk
Filed under agile :
Comments (0) :
Mar 14th, 2008
Exxon Valdez: Where’s the justice?
18 years later and Exxon Mobil is still in court appealing payment for damages caused by the Valdez oil spill. It’s one of the longest running US court cases ever, and the inhabitants of the towns affected by the spill have yet to receive compensation. The only people getting richer are Exxon and the lawyers. With 18 years separating the disaster and a resolution, any compensation would be so disconnected from the actual event as to be an almost meaningless windfall. As one of the town’s inhabitants says: ” I’d rather have had a few dollars in my pocket all my life, than have a heap of money just as I’m about to check into the old folks’ home.” Where’s the justice in that?
Tags: environment
Filed under environment :
Comments (0) :
Mar 13th, 2008
Beyond ThoughtWorks
I had my last day at ThoughtWorks about 3 weeks ago. In my 5.5 years with the company I had the chance to live in 4 countries (Canada, China, India and England) and to work with and learn from some really amazing people. I think that ThoughtWorks is a great company with a great depth of talent and knowledge, a solid global culture, passionate leadership and a progressive perspective on the IT industry and the world. And I still find Roy to be an inspiring leader.
However, having recently returned from 6 months in China, I wasn’t really looking forward to the prospect of more travel. China was a great experience, but it sure made it feel nice to be back home. As there’s nothing happening for ThoughtWorks in Vancouver these days, work would mean spending a considerable amount of time on the road or moving elsewhere. Considering that I live in Vancouver because I love being in Vancouver, spending most of my waking hours away defeats the purpose. I also wasn’t looking forward to being an absentee father to my amazing one year-old daughter. So, it was time to part ways with the company.
For my last day, ThoughtWorks graciously offered to fly me out to Calgary to say farewell to some of my colleagues. Serendipitously it coincided with the office’s annual ski trip to the Rockies, so I got 3 days of fabulous skiing at Fernie in the bargain. It had been snowing heavily before we arrived, so there was tonnes of fresh powder. JJ and I had a once-in-a-lifetime run down the saddles into Lizard Bowl just as the ski patrol dropped the ropes.
In considering what to do next, I was pretty confident in finding local Agile consulting engagements in the city by leveraging my growing network here. I also had a burning product idea that I was thinking about tackling. But what I really wanted to do, and have wanted to do for the last 6 years, is to align my skills and experience delivering enterprise systems with the issue that matters most to me — namely, addressing the problem of global warming. Fortuitously, just as I started looking around, an opportunity came into my inbox via the Web of Change mailing list. The opportunity was with a local start up called Small Energy Group that is helping large buildings and institutions to monitoring their energy usage and significantly improve their energy efficiency. Several sets of interviews later and I’m the newest member of their team.
I can’t talk too much about what we’re working on right now. But we have a public release coming up quite soon, so I’ll post information about it then.
The company is located in (unassuming) Dundarave, West Van. I’m commuting back at forth to work by bicycle (one of these days I’ll post pictures). This is what my route looks like:
Tags: life, smallenergygroup, thoughtworks
Filed under life :
Comments (1) :
Mar 13th, 2008
More MacBook Pros and Cons
Now that I’ve had my MacBook Pro for a little over a month, I have some additional observations on its merits and demerits. Overall, I’m still extremely happy with the product and consider it to be the best laptop I’ve owned to-date.
I still do quite a bit of work in Windows (both development and work with MS Office). I purchased a copy of VMWare Fusion to virtualize my Windows Bootcamp partition. Fusion makes it easy to operate concurrently on both Windows and OSX without any noticeable performance hit. I can drag files or copy and paste text back and forth from one environment to the other. Unlike Parallels, it provides a performant virtualized environment that I would actually do development in. That said, I have noticed some strangeness when trying to access a DVD drive or USB devices while running Fusion. I haven’t investigated enough to figure out what the issue is, but these problems seemed to disappear after shutting down the virtualized environment.
Another thing about the MacBook that is quite nice is the little remote that it comes with. It works well for driving presentations, pausing movies and shuffling songs. I’ve previously owned a USB-enabled remote for presentations, which I’ve now happily passed on to my wife.
Speaking of movies, I’ve been quite impressed with the quality of the MacBook Superdrive. I have a few DVD movies that I picked up in China that I haven’t been able to play on a PC. But the Superdrive can read them.
My one big annoyance is the lack of support for a direct VGA connection. I hate having to carry around the DVI-VGA dongle. It’s easy to forget or leave behind attached to the projector. I understand why Apple would provide support for the higher-quality, more future-proof DVI, but the majority of projectors and external monitors out there still require a VGA connection. Would providing VGA support really been such a big effort?
Tags: macbook
Filed under technology :
Comments (0) :
Mar 10th, 2008
Agile Vancouver Tech Talk
Last night, we ran Agile Vancouver’s first Tech Talk session. The session was co-organized with Skye Cove at Sophos. The tech talk idea came out of our desire to get more technical content into the regular Agile Vancouver meet ups. We also wanted a different format from the regular monthly talking head presentations. Our goal was to create something that was more participatory, that would provide an opportunity for local Agile practitioners and techies to meet and share their knowledge and experience.
When planning the session we really didn’t know how many people would turn up. The previous attempt to do something similar ended up with very few attendees. So I was surprised to arrive at 5.45 and find that about 30 people were already there and more were trickling in. We probably ended up with about 50 people all told. I quickly realized that my idea of having an open discussion would not work — so we turned it into a fish bowl instead. I think that the fish bowl worked quite well and we had a pretty good variety of people opting to come up and speak.
The topic was “Branching and Merging on Agile projects”. Remarkably we managed to stay pretty much on topic throughout. I was especially happy to see some people come forward and posit unconventional positions like:
- source control is not necessary on Agile projects because it is an impediment to communication
- using file locking to control access to different parts of the repository
- distributed vs centralised source control systems
Now that more people are familiar with the fishbowl format, I hope that even more people will participate next time. A few things that we will change for next time:
- Greg Young suggested distributing cards at the start of the session to collect suggestions for the next session’s topic. We can post these on the wall and people can vote on them on the way out.
- Shorten the length of the fish bowl so that there is more opportunity for small group interaction after the session. I think restricting the fishbowl to 1 hour is sufficient.
- Greg also suggested collecting feedback on the session that can be collected at the point when people vote on the session.
I’d like to try some small group sessions or micro-open space sessions, but for now I think that it will be good to try to keep the format consistent as more people get the chance to become familiar with it. If you have other feedback or ideas for the event please let me know!
Tags: agile vancouver, source control
Filed under agile, life :
Comments (3) :
Feb 13th, 2008
Speaking at DevTeach, Toronto
I have been selected as a speaker at the Toronto DevTeach event on May 12-16th. I’m running 3 session:
- Automated Database Evolution and Deployment
- Recommended practices for Continuous Integration
- Home-grown Production System Monitoring and Report
Let me know if you’re planning to attend the event and if there’s anything in particular that you would like to see covered in this event.
Tags: devteach, speaking
Filed under technology :
Comments (2) :
Feb 11th, 2008
Syntax highlighting Ruby code
Since setting up this blog, I have been experimenting with various ways to display code on this blog. I started out trying some of the Wordpress plugins like SyntaxHighlighter that used the Google code javascript library, but I wasn’t very happy with the result.
Looking around, it seems like the Ruby community generally just handles code formatting using the Syntax module. Here’s the code that I have put together to handle formatting code for this blog:
#!/usr/bin/ruby require ‘rubygems‘ require ‘syntax/convertors/html‘ def convert(code) convertor = Syntax::Convertors::HTML.for_syntax "ruby" ‘<pre class="ruby">‘ + convertor.convert(code, false) + ‘</pre>‘ end if ARGV.size > 0 code = convert(ARGF.read) File.open(ARGF.path + ".html", "w").write(code) else # use clipboard if no file is specified code = convert(`pbpaste`) IO.popen("pbcopy", "w") { |clipboard| clipboard.print code } end
One thing that I found that I had to be careful with, however, when pasting code into the WordPress editor is that it has a tendency to remove all carriage returns from pasted markup. Obviously this isn’t a problem normally, but when dealing with preformatted <pre> tags, it tends to break the formatting. It looks like most WordPress users who are comfortable with HTML just disable the visual editor.
Tags: blog, code, ruby
Filed under technology :
Comments (0) :
Feb 11th, 2008
MacBook Pro: first impressions
I’ve had my MacBook Pro now for just over a week and I have to say that I’m very impressed so far. It performs well, it’s well designed, it has great battery life and it is light and portable. I have to admit that I was a bit worried about adapting to OSX, but the learning curve was gentle and most things were quite intuitive. Now that I have a WindowsXP Bootcamp partition set up, it makes for a great .NET development laptop as well. One of my colleagues mentioned that you can use OSX disk utility to create an additional FAT32 partition that you can use to share common files between Windows and OSX. If I had thought of that then I could have set the Bootcamp partition up as NTFS. Anyway, all of that aside, there are still some things about the Mac that bug me:
- Why does Apple still insist on designing mice and trackpads with only one button? I know it’s a design thing, but honestly. Having to do crtl-click or have two fingers on the trackpad + click just seems to be poor usability.
- Once you minimize a window, it is very hard to find again. The only way that I’ve found it is to go to the Window menu and select the window’s title. Minimized windows don’t show up when you cmd+`. This seems to be a usability flaw to me, especially as in MS Windows minimized windows are easily visible in the task bar. Also as a Windows user, I’m accustomed to double-clicking on a window’s title bar to maximize it — in OSX, the window is minimized instead.
- In OSX, closing windows does not close the application. It is pretty easy to end up in a situation where you have a lot of applications running without realizing it because there are no open windows associated with that application. Coming from a Windows background, it seems pretty intuitive that closing the last open window would close the application, but apparently the designers of OSX don’t think so.
- The keyboard layout seems a bit bizarre to me. For example, why not have a separate delete and backspace key. If I want to do a Windows-style delete, I have to type fn+delete. This is a pretty common operation — why not dedicate a key to it instead of making it a combination key click. They could use the superfluous enter key which, at least on the MacBook Pros, is on the bottom right side of the keyboard. And while we’re at it, why not dedicated page up, page down, home and end keys instead of having to do ctrl+arrow key or cmd+arrow key.
Tags: apple, macbook
Filed under technology :
Comments (1) :
Feb 11th, 2008
NetSquared Vancouver
Last night I attended the first NetSquared meet-up. NetSquared is a forum for people interested in the intersection between IT and social change. This local event has spun out of the Web of Change community as a more regular place to keep in touch and share ideas. The session was kicked off by Tom Williams at GiveMeaning.com, self-professed Obama fan-boy. I was interested to hear Tom speak as I recently used the GiveMeaning site as part of Josie’s charity. Unfortunately, relatively little of his talk was about the site, so there wasn’t much new there.
The highlight presentation of the evening was by Igor Faletski from Handi Mobility talking about their new project livevote.ca. This simple Flash-driven site allows you to set up SMS-driven polls in seconds. Handi Mobility is behind the Translink SMS schedule system and they have set the livevote.ca site up as a free service. The poll results are easily embeddable within a web site as you should be able to see below:
At the session I also had the chance to catch up with Trevor Bowden, who I haven’t seen since high school, about his new venture EcoLabelling.org. This site provides a great service by helping consumers and businesses sort through the array of professed ecolabels out there, sorting the good from the greenwash.
Tags: livevote.ca, netsquared
Filed under technology :
Comments (0) :
Feb 7th, 2008