More Principled Design of Pervasive Computing Systems