Expect the unexpected

We are developing software here at Rowisoft and after someone changes anything in our source codes the changes needs to be tested by an other testing person here.

Our golden rule is that no function gets published to our customers until someone other than the developer itself has tested it.

Unfortunatelly software can be very complex and the software we develop definitelly is complex. Even complexer a software becomes even harder to test it under all possible circumstates.

Because of this its absolutelly important that the developer is thinking about any possible situation while he develops the software. The tester only tries things out and tests if the function is working correctly according to the requirements. The tester “stupidly” clicks every button and tries out everything especially those things doesn’t make sense. But responsible for the working function never is the tester. Responsible for the working code is only the developer here at Rowisoft.

Today I was the developer and I’ve added a new feature to pinnery which allows to structure the boards within categories. Therefor I needed to create a new table in the database which has a relation to the boards itself.

My tester, today it was Daniela, was testing my newly created function then. First she told me that, in general, everything works as expected. She was able to create new categories and to drag and drop boards within a treeview to categorize them.

Later she came and told me that I don’t delete the boards connection in the newly created database table when she deletes a board. After she deleted a board the link in the board administration dialog still appears as an empty entry.

I realized that I’ve forgotten something. So I changed my code. When a board gets deleted the associated records in the new table needs to be deleted too. No big deal – I got this changed within a minute.

Then I told Daniela that I’ve resolved the bug and she can test again. Then, she told me that it works as expected now: Whenever a board gets deleted the associated records in the view-table gets deleted, too.

It’s perfect, isn’t it? It’s not! After a while Daniela came again to me to tell me that now the drag&drop feature of the boards administration dialog doesn’t work anymore. I was wondering about that because I didn’t change anything here and this was even in a very different file than I’ve changed while resolving the delete-bug.

Then I’ve tried to reproduce the error and logged in to pinnery. But I couldn’t. Everything works as expected here on my computer.

I went over to Danielas office to get a live demonstration of the problem. Maybe I just missunderstood what the problem was. But I understood what the problem was and here on Danielas Computer I was able to reproduce the problem.

After playing around a while I realized that one dead record in the boards-view still existed. It was the one record which didn’t got deleted after Daniela deleted a board. I saw in the user interface that there’s still an empty item in the tree view. First I didnt pay an attention to it because I knew why it was there and I knew that this can never happen again because when a board gets deleted in the future the corresponding records in the table gets deleted as well.

After inspecting the problem more and more I realized that the empty item really causes the problem. Indeed!

Now I’ve changed my code to handle dead records in the view table even if there’s theoretically no way such records can be generated again.