Onwards and Upwards

I’m about 8 days away from finishing my last final exam at the University of Waterloo. Over the past few weeks I’ve often been asked, “what do you plan on doing after graduation?” I usually respond with some combination of “travelling, living in Toronto for a while, doing my own thing,” but nothing really concrete. I guess that’s because I don’t really know myself. While many of my friends have found and accepted full-time jobs, I have not. I’m not really sure what I want to do yet, or where I want to work. Besides, I’ve been alternating between studying and working for the past 5 years or so of my life. I’m not ready to just jump into something new and start working.

Read on →

Using Simulated Annealing to Solve Logic Puzzles

The other day, I was watching Ted Ed’s collection of YouTube videos on riddles and came across this interesting logic puzzle described as “Einstein’s Riddle”. Einstein probably didn’t make up the riddle, but the problem itself is kind of interesting for a few reasons. You can either watch the video or keep reading for a retelling of the problem below.

Read on →

Short Interval Updating in Angular

Let’s take a look at a problem. We have a webapp to track build times for a continuous integration (CI) server. The main page has an HTML table with dozens of rows (one row for each build) and each row has an entry for the creation time of the build and the length of time it took for the build to be deployed, tested, or whatever else you’re doing with your CI server.

For most rows in your table, the duration can be populated with information from the server. The server sends back a creation time, and if the build is finished, a finishing time. Both the creation time and finishing time are specified in a milliseconds version of Unix time. The duration is easy enough to calculate. Firstly, in Angular we would opt to use the ng-repeat directive to display the data in a table:

Read on →

When StackOverflow Isn’t the Answer

I spent the better half of today debugging one of my current projects, an Android app designed to help users do things on their phone faster. Vague, I know.

The issue at hand was a java.lang.IllegalStateException resulting from a fragment not being attached to its activity. Reproducing the bug was easy. Launch the app, search for a YouTube video, back out of the app, and search for another YouTube video. The app crashes. An easy ‘solution’ was to check fragment.isAdded() in the onVideosRetrieved callback. Of course, the real problem is that the fragment still wasn’t attached to an activity.

Read on →

On 2048

This week on Hacker News, a game called 2048 rose to the top of the front page. Subsequently, productivity at software companies everywhere dropped tremendously.

The game itself is quite simple. Use the arrow keys and get the numbered tiles to combine over and over again until you get a ‘2048’ tile.

The game is partially (read: very) luck-based. When the board is getting tight, a single wrong number, or a number popping up in the wrong place, can mess you up for the rest of the game.

Read on →

How to Do X in Octopress

So I spent the last couple days tweaking my Octopress themes and relearning how to do things since not blogging for a while and getting a new MBP. Navigating the Octopress file hierarchy isn’t easy, but hopefully this post will help you (and be a useful reference for myself).

Read on →

A Masterpiece of Music

Originally posted June 23rd, 2013

I was at a grocery store a couple weeks back, and over the PA system, I heard the lyrics “we are, we are we are, we are we are”, and for some reason, I thought it was catchy. It sounded like Kesha, so I had a starting point for searching (and I was too embarrassed to use Soundhound/Shazam in public to recognize the song).

Read on →

Software Engineering at the University of Waterloo

This post was inspired by a fellow software engineering student at UW. If you want even more detail than I’m providing here, check it out.

Last updated December 29th, 2013

The Courses

Here’s a quick list of the courses I’ve taken (the full curriculum can be found here):

Read on →


So after only a few months of using WordPress, I decided to switch to Octopress. I decided to make that obligatory post that every new Octopress user writes. It’s some sort of rite of passage, I think.

Read on →