Ahead of next week’s Hour of Code, Hadi Partovi shares how computer programming offered calm, confidence and optimism in an otherwise hopeless situation.