One my favorite wisdom on coding is the Zen of Python. There is so much experience summarized in them. Today I want to tackle: Errors should never pass silently. Let’s say you are coding a logic that expects one element in an array. Now, let’s say you found an empty array. What do you do? Do you throw an exception or do you return null since there is nothing in the array?
Errors should never pass silently
Errors should never pass silently
Errors should never pass silently
One my favorite wisdom on coding is the Zen of Python. There is so much experience summarized in them. Today I want to tackle: Errors should never pass silently. Let’s say you are coding a logic that expects one element in an array. Now, let’s say you found an empty array. What do you do? Do you throw an exception or do you return null since there is nothing in the array?