Alexandria: Integrated Library System

Technical Projects Nov 18, 2012

This is one of my first large scale projects. I learnt C#, SQL...etc to do it after middle school. I didn't know OOP back then, so I ended up doing it in a painful way.

Code: github.com/abarajithan11/alexandria

This software was tested in a three step process for possible errors and bugs in the application. Occasionally it was interesting to understand these errors and bugs and to figure out a way to solve them, which was similar to solving a puzzle. But, on the other hand, when struggling with bugs for several hours, debugging was a frustrating process that slowed down the development of the project.Firstly, as soon as each piece of coding were successfully written, without raising any syntax errors at Visual Studio, that piece of coding was tested by quickly comparing the test data and the output. New types of coding were first tested on a Test form (which is then deleted) and then brought into the main coding.

While writing some codes, I met with several frustrating SQL errors which are very hard to be understood and to be solved. For example, when writing a really long SQL command to add members to database, an SQL exception was raised again and again. I had to struggle with it more than three hours to discover that referring to a column named ‘Work’ was the problem. I never understood why, but just changed the column name to ‘MWork’ to make it work. Once again when writing an SQL query as COUNT (DISTINCT…), although the query was perfect, an exception was raised. From C# support sites I could find that MS Access does not support COUNT (DISTINCT…) queries which are supported in MYSQL, on which I learnt the SQL.


After completing the coding session, for the second step of the testing process, I initially used a set of informal diagrams, drawn similar to flowcharts which display each and every possible combination of user inputs and the messages to be shown at each instance to test Alexandria for possible application errors and bugs,. When an action is successfully completed, database was checked for entries and made sure the system processed the user inputs in a right manner and each piece of correct or corrected coding were ticked away.

Third step testing was unintentionally done after completing the design process, when entering some decent data into the system in order to submit with the software. Few interesting, but very dangerous bugs and errors were discovered here for my surprise. Some of them are explained below.When trying to pay the book fines of 40/- in the receive form, the software cleared all the unpaid account fines of the Member which was more than Rs. 2000! Then when adding a new book under the title of “Aesop’s Fables” and when adding a member with school’s name: “St. Sylvester’s College, Kandy” the system quickly crashed with an SQL error. I then realized that it was due to the single quotes in the text and had to include a command to remove single and double quotes from controls such as textbox, rich text and combo box whenever an action is performed! When I emptied the database and started adding new books to it, I met an error with the method which was used to calculate the new Book ID from the highest Book ID present in the database. I had to struggle with it for few hours to figure out and solve the problem.

Therefore, from time to time, countless bugs and errors were found and were cleared in the application. Since this project was being developed individually, I had to do the testing myself, which was less effective and a time-consuming task. I believe that there could be many bugs and errors still left in the program which were, unfortunately, not yet found and fixed. If, in case, this project is implemented on a real library, in a few days of practical testing and feedback from the users, more bugs can be eliminated.

Tags