ten years ago , jack had just begun the ph.d. program in electrical engineering at stanford university when he 'd woken up in the middle of the night with a crystal-clear vision of a portable electronic device that would help people keep track of their appointments and to-do lists .