SSL by default, GnuPG with
February 07, 2015

SSL by default is now completely SSL by default. Because TLS is fast enough and StartSSL offers free SSL certificates, I've decided to switch this domain, as well as a few others, to SSL. I think all sites should be switched to SSL by default and that security shouldn't be a feature but a necessity. I'm particularly interested in the arrival of Let's Encrypt, a free automated certificate authority from Mozilla, the Electronic Frontier Foundation and others. Such a service should remove all barriers to entry for everyone to make the switch.

GnuPG and

In other security updates, I've recently started using to verify my social media accounts and host my GnuPG public key. While there have been some detractors from the service, I think fundamentally the founders of Keybase have done their due diligence and it feels like a very well designed system. I opted to not host my private key on their servers, so I only need to rely on my security rather than the security of a third party. This seems to be a trend in my thinking where I would prefer to rely only upon myself rather than the Cloud for hosting my data.

You can download my public key from here or here. Fingerprint: 8603 8B3C 3BE1 5587 1E31 42C7 5C54 64B0 A9E6 B2EE. Any secure communication to me should be encrypted with this key at your discretion.

website security ssl gnupg launched!
December 10, 2014

Hey everyone, I have launched a new website, It allows you to quickly convert MIDIs to MP3 using a selectable high-quality soundfont. To read more about it, visit my project page or visit the site directly! I hope you find it as useful as I do. I do a lot of my song writing in Guitar Pro, so a site like this is very useful for generating an MP3 to put on my phone for mobile listening. Competitors do exist and I have used them extensively, but I'd like to add one more to the ecosystem!

Questions or comments are appreciated! Please add them to the discussion section of Thanks and happy rendering!

website midi mp3

Job Queues Slides
November 26, 2014

Below are the slides for a presentation I gave internally at EventMobi about Job Queues. I recently used the Kue framework internally to automate a build process. This is intended to be a high level overview of job queues, with asides on Amdalh's law and a case study on multiple queues in a grocery store setting.

job queues slideshow

Interesting scientific videos with Matlab
May 16, 2013

Stellar Composition over Time (M = Msun, Metallicity = 0.02)

Modelled as a bonus project for my PHYS 375 Astrophysics class at the University of Waterloo. Here you'll see an animation of the stellar evolution of a Main Sequence star, similar to that of our own Sun. The left chart measures the mass fraction of the elements in the sun based on the distance from the center of the sun. The right chart is the star's position on an HR diagram. Data courtesy of Rich Townsend's EZ-web and annotations from Figure 13.4 in an Introduction to Modern Astrophysics by Carroll and Ostlie. The professor mentioned he would use this animation as teaching material for future years.

Simulation of a rectangular drum, with an initial position and velocity.

Modelled for my mathematical physics class. A square membrane, with L = H = 1, is stretched with an initial position of u(x, y) = x(x - 1)y(y - 1) and initial velocity v(x, y) = 2sin(pi*x)sin(2pi*y). Modeled for for t = 0...10. The video is taken using an analytical solution to the rectangular drum problem. The drum is bound on two of four edges.

math visualization

Benchmarking JavaScript and DOM Performance using the Game of Life
November 06, 2009

Conway's Game of Life AnimatedConway's Game of Life is a dead simple cellular simulation. It contains an infinite grid composed of cells, which live or die based on a few rules:

  1. Any live cell with fewer than two live neighbours dies, as if caused by underpopulation.
  2. Any live cell with more than three live neighbours dies, as if by overcrowding.
  3. Any live cell with two or three live neighbours lives on to the next generation.
  4. Any dead cell with exactly three live neighbours becomes a live cell

So I created a little open source implementation in JavaScript called ConwayJS. The demo's available on that page, and the source code is up on GitHub. It's heavily reliant on jQuery for DOM manipulation.

JavaScript and DOM speed are hot topics right now. Most major browsers have been playing catch-up ever since the release of Google Chrome and it's high performance JavaScript virtual machine V8. V8 is able to just-in-time compile JavaScript to native machine code, which has huge performance benefits over an interpreter or bytecode virtual machine used by other browsers. TraceMonkey, which also uses native code compilation was released in Mozilla 3.5. Some other JS engines:

  • Tamarin: JavaScript engine used in Flash 9.0+ which also uses JIT compilation.
  • Carakan: Opera's up-and-coming engine featuring JIT. Reportedly 2.5 times faster than the current Opera byte-code based engine Futhark.
  • JavaScriptCore: WebKit's JavaScript implementation used in Safari et al.

ConwayJS is a good use case for DOM heavy JavaScript applications, so I took ad hoc benchmarks using it's build in frame counter. Methology: I took three test samples for each browser when the frame rates appeared to stabilize, and computed the average -- nothing fancy. Some info on the test system:

  • AMD Athlon 64 X2 Dual-Core TK-55 at 1.8 GHz
  • 2048 MB DDR 2 Memory at 159.6 MHz.
  • Windows 7 Professional

Browser versions

  • Chrome
  • Firefox 3.5.5
  • Internet Explorer 8
  • Safari 4.0.3
  • Opera 10.01

Now onto the results, which are plotted on the graph below:

Conway's Game of Life Performance


  • Safari's DOM didn't appear to be able to keep up with the JavaScript engine, so while the theoretical frame rate was approximately 69 Hz, it was skipping enough such that only 1/5 frames rendered.
  • The JavaScript function setInterval() is used to loop through each cycle. It's set to timeout 1 millisecond after each run, making the maximum possible frequency 1000 Hz. The 1 ms granularity was used for this benchmark. 10 ms is used normally.


It appears that most browsers still have some catching up to do. Google Chrome was the winner in this benchmark by far, with nearly double the frame rate as Safari. I'm very surprised to see Firefox below Opera, considering Opera's JavaScript engine in 10.01 is bytecode based versus Firefox's TraceMonkey with native code compilation. IE barely even compares to most other browsers. It will be exciting to see what improvements will come with the release of Google Chrome 4.0 and Opera's new JavaScript engine.

javascript visualization game of life