Speaking at DevTeach, Toronto

11 Feb 2008 In: technology

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.

Syntax highlighting Ruby code

11 Feb 2008 In: technology

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.

MacBook Pro: first impressions

11 Feb 2008 In: technology

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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.

NetSquared Vancouver

7 Feb 2008 In: technology

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.

RubyCamp Vancouver

30 Jan 2008 In: Uncategorized

Last weekend I attended RubyCamp in Vancouver. The sessions were high quality and, as a ruby n00b, it was a great opportunity to learn from the community.

I started the morning by attending Alexey’s JRuby overview. It was interesting to get some insight into the problems the JRuby team has faced mapping between Ruby types and Java types. This certainly seems to be better addressed by the .NET DLR which should simplify matters for dynamic language implementations in .NET.

I also spent some time chatting some guys working on Rubinius. They had some pretty strong opinions about ZenTest and AutoTest over Test::Unit and CruiseControl.rb respectively. Of course, they were slightly biased, but it deserves a closer look.

I talked with Marc Mayo about Git, distributed teams and his company Joyent. He ran an insightful session on the trials and tribulations of hosting high traffic Rails applications.

The last two sessions that I attended were one on Merb (an alternative web framework to Rails) and Scott Patten’s Rubyize This!

Shopping around for domain names

23 Jan 2008 In: technology

Yesterday, I spent some time purchasing a few new domain names. I’ve been using Network Solutions for something like 10 years, and I’ve always used them to manage my domains. I had assumed, naively I guess, that the cost of domain name registration was more or less fixed. But after looking around at other providers, I found there can be a pretty large discrepancy in price. Network Solutions charges over $30 for a 1-year registration, but other providers that I looked at were charging $7 or les

Supporting medical clinics in the Congo

23 Jan 2008 In: life, technology

My friend Josie Leung recently returned from Lubumbashi in the Democratic Republic of Congo where she was helping to support a rural medical clinic there. She has set up a charity on GiveMeaning.com to try to raise the funds to support the continued operation of the clinic. The charity needs a certain number of votes to get the project supported, so if you feel so inspired head over to her project and add your vote in support.

GiveMeaning.com is the brainchild of Vancouver-based philanthropist Tom Williams, who I met a couple of years ago at Web Of Change. He gave a few demos of the site at the conference, but Josie’s charity is the first time that I’ve had the chance to use it. It’s nice to see people using ASP.NET for a good cause :)

Self-hosted: Reloaded

23 Jan 2008 In: technology

I’ve recently moved my long neglected blog from dotnetjunkies.com onto a shared host at hostgator.com. My old blog site had been running a pretty old and crappy version of Community Server and had started serving up ads. All the more reason to move. So I’ve started over with a recent version of WordPress which so far is superior in every way to Community Server.

Well, except one. This is actually my second attempt at this blog entry. I had previously made this post and about 5 others when my blog was reset, ostensibly due to a security exploit in WordPress which has (hopefully) subsequently been patched. HostGator’s scheduled backup hadn’t kicked in before the reset, so I sadly ended up losing the posts that I written. So this is a second start with a new theme and a more conservative backup policy. Hopefully things will look up from here.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes