The lessons a young developer learned from a $10,000 mistake that almost cost him his job