@firstname.lastname@example.org I agree, error handling often takes up much more than the happy path. My first work mate hammered that into me right at the beginning of my work life. Even if you don’t think that something can fail, chances are it still might. So always be safe than sorry. This attitude quickly proofed to be correct. Sure enough, I ran into – and luckily handled – errors that were initially thought to be impossible. I’m very grateful for these valuable lessons.
↳ In-reply-to » Good hint: > Don’t write fragile programs. The core logic for this example is relatively short. Of the 22 lines inside the for loop, 6 of them implement the actual algorithm and the other 16 are error checking and data validation. You might be tempted to not validate incoming data or check errors, but doing so produces unstable, unmaintainable code. Error handling is what separates the professionals from the amateurs.⤋ Read More