Hope for the Best! and Prepare for the Worst!
Hi Folks, In this post I'll be keeping it short and simple; title says it all. Not only for major decisions in life, if you make it a habit of hoping for the best and preparing for the worst; believe me when i say this There is no force in the world that can disrupt your inner peace Technically speaking, when we write server-side code; before getting into what is to be done we do what unexpected can come! For example; if I have to create an API which calculates factorial (yeah! I get it why would you create an API to calculate a factorial; just keep your noisy brain stick to this concept, factorial is just an example :P ), before I write calculation logic for factorial I'll think of these scenarios! 1. What if null or empty data is passed!! 2. What if instead of number someone passes aplhanumeric data!! So you see; it may seem like nothing and probably overboard initially but like in software designing, the amount of time you spend in development is barely 10% of softw...