3 ms·
Regardless of the platform you’re using, defensive programming is a good way to improve the quality of your software, deal with expected and unexpected failures
by iampims 16y ago
Regardless of the platform you’re using, defensive programming is a good way to improve the quality of your software, deal with expected and unexpected failures.
It is no different from sanitizing user inputs. You wouldn’t expect sane people to type alpha chars in a phone number field, yet they do. So you write code to deal with it. If you expect the datastore to fail every now and then, it helps wrapping it in an error handler.
Should it be that way? Certainly not, but software breaks, whether it’s designed by Google or by anyone else, and it’s our job to make it as smooth as possible for our users.
note: the datastore issues are not as common as they used to be a few months ago. And latency is low now.