Tuesday, November 25, 2008

Errors...

After a few days of heavy refactoring the inevitable happened; ZiTYZEN.dk had an error. The worst thing was that it stayed there for more than 2 full hours without us noticing it... And we're sorry for any inconvenience this might have caused.

The error was caused by a stupid sql-error, caused by a hasty change in the database done earlier today. This also shows that even though we employ version control of the files and test on a test-server before issuing any new releases, things can still go bad.

To prevent this from happening again, i've refactored all calls to the database, so now they go through a central function, which, in case of errors, sends an email to us, and if the error persists, sends a SMS as well. Hopefully this will prevent such errors to occur in the future...

A tip for refactoring on Windows systems is to use a tool such as Windows Grep, which mimics The Grep function found on Unix systems. Otherwise the process of refactoring can be extremely tiresome to perform if you only have windows search at your disposal.

Zummary: We're very pleased with the refactoring which has been done, although not very pleased with the unfortunate breakdown. But the refactoring lead to improvements both in speed and correctness of the search and paved the way for future extensions.

0 comments: