We've probably all been in a situation where you let someone do something, and when it's done, it doesn't even meet the simplest requirements.
The code in question this time was some server side scripting of a website. The objective was very simple: let the user enter data, and save the data in a database, and let the user be able to query it via pre-set queries. The result was a working website, and some beta testing users entered over a hundred of entries. It has been online for a week, and today, I requested login information so I could get some statistics out of the database. I logged in, fired up mysql, requested a list of tables, let mysql describe them, and when I found the table I was looking for, I looked for the field of which I wanted statistics. The field was not there. I checked the source code of the scripts, and the field was not there.
The information was supposed to be one of the fields in a unique index. The user has to fill it in, but after checking that, the data was never saved or even parsed!
I'm not sure what to do. My first reaction involved cursing and yelling (fortunately, nobody could hear me), but I don't think I should do the same when I talk to the guy who coded it. However, if I'm going to be too friendly, he might not realise he's done something terribly wrong.
How would you handle this?
Thank you all for your detailed responses. I like the solutions that involve standard procedures, and we are going to set up some. For this particular incident, more faults were made than the database issue - a big mistake was not beta-testing the results of the entries. The beta testing was done completely web-based, and no-one realised essential data was never used. The database design should have been tested against the requirements.
As for fireing, that's not an option. This programmer tends to be lazy at times, but in the end is a good one. I have spoken with him on the phone and over irc today, and the problem will be fixed soon (I hope). All of his code is going to be reviewed, and from now on, every implementation has to be tested on the server too, not just web-based.
Thanks again for participating in this meditation. It has helped me to re-arrange my thoughts and to take action in an appropriate manner.