Archive for the ‘Projects’ Category

In which I stake my claim as a giant of contemporary Dadaism

Posted June 11th, 2012 on

This weekend I created art:

18:88 - a study in the ephemeral nature of time


I believe I have created a masterpiece, and staked my claim as a giant of contemporary Dadaism. It’s symbolic of the ephemeral nature of time and the fleeting incorporiality of the material objects with which we surround ourselves. The clock, the height of technology mere decades ago reminds us that we too face imminent obsolescence. The piece is called “18:88″ and will be auctioned at Sotheby’s starting at $400k.

Here’s how I did it:


Sunset Time Series

Posted September 4th, 2011 on Bespoke

Inspired by a reddit image post (which I cannot for the life of me find again), I decided to take a series of photos of the sunset from my parents’ house at Cedar-by-the-Sea, Vancouver Island. I many photos over the course of several hours using a digital camera fixed in position on a tripod.

I thought it would look good to blend the images one into the other, so I wrote a quick python script using the Python Image Library. The script blends consecutive images using linear interpolation. An artistic choice to make was how wide the blended regions should be. I tried everything from relatively thin blending regions:

To almost completely blended images:

In the end, however, I decided that what looked the best was actually to have no blending, but rather sharp boundaries between the images. This actually accentuates the effect I was going for, which was to show the changing light over time. Blending the images together actually lessens the effect, rather than enhancing it as had hoped. I plan to get the finished product printed and framed:

Here’s the code for the script I used (apologies for quick-and-dirtiness):

import sys
from PIL import Image

def imageblend(imdir, numimages = 5, blendwidth=0):
    if not blendwidth%2 == 0:
        raise Exception('blendwidth not even')

    im ="im1.jpg")
    (width, height) = im.size

    for i in range(1, numimages):
        imnum = i+1
        centre = i*width/numimages - 1

        im_i ='im%d.jpg'%(imnum))

        for x in range(blendwidth):
            col_ind = centre - (blendwidth/2) + x +1
            col_box = (col_ind, 0, col_ind+1, height-1)
            col_o = im.copy().crop(col_box)
            col_i = im_i.copy().crop(col_box)
            col = Image.blend(col_o, col_i, float(x)/blendwidth)
            im.paste(col, col_box)

        rest_box = (centre+blendwidth/2+1, 0, width-1, height-1)
        rest = im_i.copy().crop(rest_box)
        im.paste(rest, rest_box)"im_output.jpg")

def main():
    imdir = sys.argv[1]

if __name__=='__main__':

UBC Website Pwnt

Posted June 6th, 2009 on Bespoke

Visit the UBC Website right now and this is what you see:

ubc_website_pwntHacked? Hosting Fail? Alternate Reality Game? I’m confused…

Update: I think this must be a local DNS problem. Through comments and Twitter I’ve determined that is resolving to only for people within Vancouver. It is not affecting access on campus.

Proprietary Probiotic Culture Generator!

Posted March 15th, 2009 on Bespoke

Yoghurt advertisements are the funniest thing on TV. First, they are marketed almost exclusively to women – apparently those of us with a Y chromosome are not deemed by the marketing gurus to delight in fermented milk and fruit chunks with quite the same enthusiasm as the fairer sex. Second is the sheer creativity and variety that they manage to apply to marketing what is a fairly standard product.

But my favourite yoghurt marketing technique of all is the super-pseudo-scientific Patented Proprietary Probiotic Cultures – the glorious amalgamations of biological jargon and pseudo-Latin, such as Activia’s “Bifidus Actiregularis” or “L. casei Defensis”. These names, carefully crafted in the bowels of some advertising agency, are calculated to suggest that what you’re getting is the latest in Yoghurt Technology – when in actuality it is merely a proprietary strain of the same bacteria you will find in any yoghurt.

But why should big food companies be having all the fun? Why can’t you and I have our own patented organisms, too? I think we can. And in order to facilitate this, I have created the Proprietary Probiotic Culture Generator. Click the button below to get your own name – perfect for over-hyping any bacteria-based food products you may wish to market in the future!


(Warning: due to Microsoft’s terrible support for open web standards, the above link may not render properly in Internet Explorer)

Though I doubt this will be of any use to anyone, as a matter of principle the source-code for this generator is available here, under the terms of the GNU-GPL v3.

My New Website –

Posted March 11th, 2009 on Bespoke

I’ve wanted for some time to create a personal home page which would serve as my online resume and portfolio – and Lo, It is Done. I didn’t want anything complex – most of my needs are already served between this blog, and my various other Web 2.0 accounts. So I wanted something simple, but at the same time unique and personal enough to stand out. I decided to create the site from scratch with good ‘ol HTML and CSS – a good exercise in itself. For some of the fancy aesthetic things I wanted to do I would also need JavaScript, so I set about learning about these languages from online sources, most notably the w3schools, and this excellent tutorial on CSS page-layout.


For the overall design I was inspired by Luis von Ahn’s homepage (seriously, is there anything this guy does which is not totally awesome?). I purloined some elements of his design, but wanted something uniquely personal. For this I decided to incorporate my hobby of writing with fountain pens, and so all the images for the links were written out by hand, scanned, and made transparent with GIMP. I think this gives the site a unique feel.

The only problem with the approach I took is that the site works with every major browser except Internet Explorer browsers older than 8. I debated for a while whether or not I actually care about this, and concluded that I don’t. If I can find easy fixes that will make it work then fine, but I’m not going to redesign the entire site just because Microsoft refuses to properly implement standards. Besides, chances are anyone who I would wish to see the site would know better than to use IE…

All in all it has been a very valuable project, and I am happy with the result. I would welcome any suggestions as to how I could improve the design or layout of the site!

UBC Terry Project Blogging

Posted February 19th, 2009 on Bespoke

I have recently signed on as one of the collaborators on the UBC Terry Project Blog. My posts can be found here.


The Terry project is an initiative centered on using an open-minded, interdisciplinary approach to solving the world’s problems. Amongst other things, it serves to encourage sharing and openness between students from different faculties. As well as the blog, the project hosts a series of guest speakers (including Richard Dawkins last year), as well as an annual conference of student talks modelled on the TED talks. The videos from this year’s conference can be found on the site.

FitzGerald Family Artifacts

Posted January 1st, 2009 on Bespoke

Happy New Year!

I just got back from “the motherland” – Ireland – where I was visiting my grandparents for the holidays. On of my favourite things about visiting my Granny’s house (other than my Granny, of course!) is this fantastic illustrated address on the walls of one of the bedrooms. It was written to my Grandfather’s uncle by his employees (click picture for hi-rez version):


What a treasure…

The text reads:

Address of J. G. Fitzgerald
Brown Thomas and Co. Dublin

July 1887

Sir -

We the employees of the above firm feel that we cannot allow the present occasion to pass without expressing in some degree our deep sense of the kindness and consideration which we have always received at your hands, and in granting us the great boon of a Summer Holiday as a Free Gift you have but added another link to the already lengthy chain of obligations for which we are indebted to you.

The value of the privilege is greatly enhanced by the speedy response we received to our request and this assures us that in consulting the firm in your capacity of Manager you must have met with a cordial and sympathetic support in the course you proposed to adopt and it is our desire that you will convey to the firm our best thanks for their acceding so promptly and graciously to your representations.

We assure you Sir that the boon now granted conferring as it does on each and all of us an opportunity of getting a much needed rest from the turmoil of business and of acquiring renewed vigour and energy for the battle of life will but act in the future as a new incentive to us to discharge our duties faithfully and with increased zeal.

In asking you acceptance of this address we think it right to record that it represents the spontaneous and undivided expression of respect and esteem in which you are held by every employee in the firm and we sincerely trust that health an happiness may be granted you in the years to come, and that the firm of Brown Thomas and Co. may always be found foremost in recognizing the humanity of man, and that the prosperity which has ever characterized its career may alike distinguish it in the years to come.

“The friends thou hast and their adaption tried.
Grapple them to thy soul with hooks of steel.”

Signed, etc.

(Illuminated by J. Hopkins, 13 Nassau St. Dublin)

Now THAT’S a thank you note! It really is a beautiful piece of family history, and a beautiful piece of art. The man in question was my grandfather’s uncle. Here is the gentleman himself:


Interestingly, this man’s brother (another uncle of my Grandfather) emmigrated to Alberta around the same time. Here’s a map my parents have illustrating a portion of Alberta in 1882. You can see the homestead of James Fitzgerald.



P.S. I composed this post on my brand new Acer Aspire One – a great Boxing Day purchase!

From Paper-Weight to Media Server

Posted September 12th, 2008 on Bespoke

This is something I’ve always wanted to try, and now have the opportunity! My parents had an old relic of the Pentium 3 epoch, which I was able to appropriate in the name of Science. The Dell Dimension 4100 really is an old battle axe, and I’ve given the old bird a new lease on life by turning it into a Media Server. My plan is to use it for a webserver eventually as well.

Our house has not one but two high-speed cable connections, which we divide between the upstairs and downstairs people. The various routers and modems are displayed in a pleasing techno-shrine to the electro-gods in our living room:

The problem is that the shrine is downstairs, while our convenient nook-come-server-room is upstairs. Of course, being a dinosaur, the server doesn’t have a wireless card. I considered messing around with adding one, but decided it was easier to run a cable up the stairs, so after a trip to, to pick up a 500gb HD, 100ft CAT cable and network switch, the route was established. Of course, being a house not entirely designed around networking, some elegant solutions were in order:

The nook really is perfect for the job at hand, almost as if it was built for the purpose. The server looks quite at home, especially with careful cable management and hardware organization:

So I now have ‘er up and running, and it feels delicious. I am using NoMachine NX , a great piece of software which was used in the lab in Edinburgh. It makes remote desktops simple. A great feature is that sessions can remain open when you close the window, meaning you can have programs continuing to run when you log off. Running Ubuntu and having a window open displaying a session with another Ubuntu box creates delicious recursive fantasies. I’m wondering how many of these things I could next before the whole network crashed and/or the pentium 3 set on fire…

This greate guide explained how to stream videos over the LAN with VLC, so I can now enjoy my entire media collection without taking up HD space on my laptop! The best benefit is that I can leave it torrenting constantly without noise in my room!

Next step will be to get the web-serving up and running!

Letters, Dip-Pens and Elvish

Posted August 3rd, 2008 on Bespoke

I love writing letters. I love receiving letters too – a happy coincidence – but I find something especially cathartic about penning a missive. It is just one of my many contradictions that while I embrace the demise of the physical book, I find greater enjoyment in writing a letter than an e-mail. I guess it’s some sort of zen, balance-seeking, yin-yang-type thing.

To this end, it has been a Long-Term Life Goal of mine to one day own a set of dip-pens- the type with which one might scrawl an edict on vellum by the guttering light of two-score wax candles. And Lo – it is done! When in Dublin a few weeks ago I finally found what I was looking for, a nice introductory set of nibs with ink. My appetite had been whetted by the setting – for I had just seen the Book of Kells and the Long Room library – and I was in the customary gift-store. So I bought a gift. For myself…

But my journey had only just begun – for once I bore the tools safely home and brandished them to write a letter, my granny to her cabinet went, and brought forth variouse divers pens which she bestowed upon me to use. Among these were an example of the type of dip-pen she used in grade school, and a set of tiny things – scarcely needles – which my dad allegedly used for drafting in university, with which one can achieve astounding feats of miniturism.

I’ve written several letters with the pens thus far and I must say I really enjoy using them. I have been told that fountain pens and dip pens improve one’s writing. I did a comparative study, thus (click photo for higher resolution):

Its hard to be sure if one is really neater. I tend to believe the dip pens looks neater, but I am willing to put this down to confirmation bias. You decide! What I do assert, though, is that what the dip-pen writing lacks in extra neatness, it makes up for in bountiful character. That’s the good kind of character, not the type you were promised for eating your broccoli. And one certainly has to slow down and write more deliberately; lest one suffers an ink-smudge (as pictured above). I’m still getting the hang of even ink-coverage. I start a line with too much, and end up with too little, so the the lines take on a dizzying, uneven texture. But these, too, add a certain… je ne sais quoi. Or as the French would say, an “I don’t know what“.

But there is one thing which cannot be disputed by any force of FSM or earth: Dip-pens make for some seriously badass elvish:

I especially like the way “Benjamin” turned out. Let’s see you do that with a cheap biro!

Storing and Retrieving java Bitset in MySQL database

Posted July 25th, 2008 on Bespoke

I had one of those frustrating days where you spend hours and hours searching around for what should be a simple coding solution, to no avail. Finally I was able to patch together enough disparate knowledge to achieve my goal: namely, storing and retrieving a java BitSet on a MySQL database. Below is the solution, which I hope might help any other unfortunate souls looking for this answer.

I’m using the java.sql package along with jdbcConnector. Updates are done using the update functions of ResultSet. I will store the BitSets as Blobs (hehe – Blobs!), but in order to do this they have to be converted first to byte arrays, and then the byte arrays must be converted to Blobs. Once you have a Blob it can be stored on the table with resultSet.updateBlob() or some other method. Conversely, to retrieve the BitSet you must first convert the Blob to a byte array and then to a BitSet.

The methods toByteArray and fromByteArray are purloined from here.

BitSet to Blob (For writing to database):

private static Blob bitsetToBlob(BitSet myBitSet) {
    byte[] byteArray = toByteArray(myBitSet);
    Blob blob = con.createBlob(); //con is your database connection created with DriverManager.getConnection();
    blob.setBytes(1, MACCSarr);

    return blob;

private static byte[] toByteArray(BitSet bits) {
    byte[] bytes = new byte[bits.length()/8+1];
    for (int i=0; i<bits.length(); i++) {
        if (bits.get(i)) {
            bytes[bytes.length-i/8-1] |= 1<<(i%8);
    return bytes;

Now that you have a Blob you can update the table with resultSet.updateBlob() or some other method.
Blob to BitSet (for reading from database):

private static BitSet blobToBitSet(Blob myBlob) {
    byte[] bytes = blob.getBytes(1, (int)blob.length());
    BitSet bitSet = fromByteArray(bytes);

    return bitSet;

private static BitSet fromByteArray(byte[] bytes) {
    BitSet bits = new BitSet();
    for (int i=0; i<bytes.length*8; i++) {
        if ((bytes[bytes.length-i/8-1]&(1<<(i%8))) > 0) {
    return bits;

Hope that helps. If I can save just one person from the frustration I just went through, then I have done a good thing.