Monday, October 03, 2005

Trick: "Report a problem" button

Today, I think, is a good time to stop being grumpy for a while. I want to share a trick I found very useful when I was working on a small application.

So, here is the problem: there is a small application, which works like a “wizard” – i.e. the users fill in some data on several pages, and, at the end, the application does something quite complex with the data (writes it to the database, creates some content – it doesn’t matter). The requirements are poorly specified, the business logic is changing often, and there are not enough QA resources to thoroughly test the application. As a result, the application sometimes behaves strangely – sometimes because of a bug, sometimes as a result of user actions. The question is – how to troubleshoot the application? The users being mostly non-technical people, it became a tough problem for me, how to find out what exactly caused the application to misbehave? I was getting several calls per week– and quite often I had to spend a lot of time trying to re-create the bug and interrogating the user – what exactly did she entered on all pages before the problem became evident.

Then I came with a solution. On the top of each page I’ve placed a button “Report a problem”. When clicked, the button opened a pop-up with a textbox for the description of the problem and a “Send report” button. The users were instructed, that in case of trouble they should click on the button, type in the description of the problem and submit the form. Behind the scenes this small pop-up did a very useful job: it dumped all the relevant data (session variables, URL, request data etc.) and appended the data to the problem description. I’ve also added a small piece of code to every page, which recorded the visit of the page in a session variable, so I could get a trace of which pages were visited in this session and in which order. The message was then e-mailed to me.

This little hack – as simple as it is – made the troubleshooting a lot easier. The users were also happy – they liked the simple way to submit a bug report and the speed at which the issues were resolved. Of course this solution will not, probably, work so well for huge applications (too much data to dump), but for small-to-medium applications it’s definitely worth trying.

1 comment:

Berlin said...

Good idea, I'm developing an application for real estate agents, so I will probably end up using this idea because I will need all the help I can get. I'll let you know how I used the idea and how it worked out.