Code for Wang and Patterson's 2014 UBICOMP paper