Sunday, September 4, 2011

BUG HUNTING


Software would fail in unexpected ways at anytime. Nobody can develop an application without bugs. Too err is human. But don’t always assume that the bug is in the application itself. Here I would like to share one of my experiences; I have come across the issue in my application which went live on previous day of Christmas 2010.

One of my users called me on 2nd week of January. He told me that he was not able to submit the data in the application. While submitting data, it shows the error message “Transaction aborted with internal errors”. When he mentioned the error message, I assumed that the Java DES (Data Encryption Standard) algorithm, which is used in the application to encrypt the data before storing into the database and decrypt the data while retrieving from the database, would be a culprit. I have already checked my code many times especially that algorithm too before moving into the production. Once again I opened the development code and checked two times. Everything was correct. All the exception mechanisms were used properly. Once again I tested the application with one dummy user with all possible inputs and all the special characters. It was working well for me and also for all the users except that particular one.

And then in order to check any references are misplaced or not, I have checked the entire applications code which took one day to me. But all were correct. Next day, in order to know the user’s inputs, I sent him a mail to send the screen shot of the error message and inputs screen. Usually I never asked this to any user. But some of my colleagues are there, they often asks their users to send a screen shot even for a simple problem. I think, if somebody calls them, like my pc is not starting or not able to login into my pc user account then also they will ask them for a screen shot. If the user is clever, they can ask a camera to take a photo of their pc for each and every problem.

Within one hour, I got the screen shot of the inputs and entered all the data which was entered by the user and tested in the development. Huh… everything is working well. I don’t know what was the problem? I called the user and asked him, how he is entering data into the application? He told me that, he is not directly keying all the inputs, he is copy the data from excel which he prepared some time back and pasting into the browser application. mmmm…I was too worried… How I missed this? It never strikes my mind while developing application. How the users will give inputs to all the seven big text boxes each can contain 10 rows of data. It will take much time to fill all the inputs, since the server session is also for only 5 mins! Yeah, that’s the correct idea for the users, always prepare some excel sheets or word document before entering data in the application. Now only I thought that, nobody will sit and fill the online application for an hour.

Later I found what was the error and the solutions too. The Java DES algorithm will accept only multiples of 8 character length inputs. I have already done some jimmicks in the code, if the user input is not multiple of 8, then adding some extra spaces in the last before encrypting and removing them after decrypted. Here the problem was when the user gives triple dot (...) continuously (to mention that the sentence is continuous), in the Microsoft products(word/excel/powerpoint), they are automatically converting those dots as a single character which was not able to encrypt by the DES algorithm. All the special characters ©,®, ™ are also coming under the same category which we cannot directly enter into the web application input box. Those characters have no meaning (means no ascii) when coping to other than office suits. Thanks to my valuable user who extend my vision in the application development. I learned one good thing here not only in technology point of view, from application development point of view too. Application users are always clever, so we have to ask them about required user input methods too before developing it and considering their suggestions completely. Because developing application is not like a film. If it’s not good, some audience can avoid watching it. But, even the applications are bad; the users must use it.
With love,
Arul.

2 comments:

Johnson said...

I am very much impressed for the last 2 lines...:-):-)

kutiarul said...

Good narration.