Code Fable: The Philosophy of Error Handling
Code Fable: The Philosophy of Error Handling The Fable Chapter 1: The Trap of Perfectionism Once upon a time, there was a programmer who pursued perfect code. His functions were always correct. His algorithms were always optimal. His programs never threw errors. Until one day, when the user’s network went down. # His code def send_data(data): if network.is_connected(): send(data) # else? Nothing done The user waited ten minutes, and nothing happened. ...