Wednesday, April 23, 2014


A little late, but here's what I've been working on at Twitter for the last couple of months.

“This a big step for media sharing on the platform — particularly because it allows multiple pieces of rich media into a single tweet that is both visible and embeddable from mobile and desktop”

It's a good way to blast out your favorite pictures from a trip, party or show without spamming your stream with photo tweet after photo tweet — your followers will thank you.”

Calculating Water

I came across this interesting programming challenge and couldn't help but dig in and solve it for myself. The solution below is a re-write of the approach I found in this book. My first (less efficient) solution involved a breadth first traversal of a histogram "graph" storing visited & filled cells in a HashSet. 

The follow up question to this is even more interesting:
"Solve this problem with an algorithm that accesses A's elements in order and can read an element only once. Use minimal additional space."

Wednesday, March 19, 2014

Prism for Android

Prism for Android is now in alpha:
Feedback, feature requests & bugs welcome :)

Github link to code:

Monday, December 30, 2013

Beautifying personal & professional public links using your own domain

In an attempt to make links to my public persona A) easier to remember and B) easier to share, I cooked up a 25 line Sinatra app that can be used to do just this. I love Sinatra since the DSL makes writing simple apps like these so easy.

You can find the code here on github.

I hosted the app on a digital ocean instance and cooked up these links:

Sunday, October 6, 2013

Getting started with animations on Android

Want to get started with animations on Android? It turns out, things are surprisingly easy.

There are two ways to create animations:
  1. Using OpenGL --- See documentation here
  2. Using built-in View animations --- More here and here.
I explored the later. Basically the code boils down to the following:

1- Create an animation template. For example the following can be used to rotate an imageview back and forth:
2- You can then apply the animation to the view using the following code:
I created the following app to demonstrate various animations on arbitrary images:
Read the for more details.

Twitter is Hiring! A tech talk @ McGill University

Check out the (much nicer) keynote version here.

Saturday, September 7, 2013

Developing Trackpad: An 18 second Vine documentary

My goal was simple. I wanted to be able to control my Mac's mouse from my Nexus 7. These following Vines document an evening's attempt at that.

Phase 1 - Basic Android application. Just getting set up.

Phase 2 - Server setup. My mouse now speaks http.

Phase 3 - Hook server up to application. World's hackiest wireless mouse.

Check out the android app here
Accompanying scala Play service here.