Error Checking Does Take Time

It's been a few days since I blogged anything on this site. I had been busy and a bit upset at certain things. I'm not completely over it, but life is like that. You have to move on and also there is no 100% happiness or perfectness in life all the time.

Anyways, I have some comments regarding the time it takes to code any task assignment. If you have to code a very simple task such as find the average of five numbers that was entered and then find the maximum and minimum of those numbers, it should take no more than five minutes for a proficient programmer in their preferred, proficient language.

But if I added that it much make sure the user enters in a valid data and make sure it met its boundary conditions, it will take a little bit more time.

Error checking is what will turn this 5 minutes of work into maybe 15 to 30 minutes. The reason is that you might not do what an insane user will do when they input the data or you might just miss some loopholes. Then you have to test it in any insane way possible to make sure it is 'water proof' so to speak. This means it took 10-25 minutes of your time to code and test your program to be error proof.

For example, for the above mentioned task, you immediately will think only numerial values are allowed. More experience coders will also take into consideration that they will not enter in a number that has 100 digits. Now what about if the user enters in a number,space and then a number, or a number with commas like 1,000. Also, the user can press space 10 times before entering in a number. Still moreover, what if the person decide to user 1E6 for 1 million.

You get the point. Thinking about all the loopholes will take up your time.

This is what happened at work today. I wrote a script which if I careless about other user using it, it will be done in 10 minutes. But because I intend to let other programmer use it, I have to think of all possible ways that they might misunderstood and input in the wrong stuff. Overall it took like 1 or 2 hours because I want to make sure they will enter in with the correct prefix and suffix word for the commandline argument and also don't enter in numbers, etc.

Now I can say this bash script is error proof in a way. Of course, if I want it to make it complete automatic as in run anywhere and set back to where they are, that will take a more time since I have to consider where and how and what they will be doing before running this script.

Also I have to mention that even though there seems to be error proof to a few people, only time will tell if it really is that error proof since more people will use it and therefore come across different scenarios. So you see, a simple thing will still take time if you error checking comes to play.

No comments: