The thing the irritates me the most is the woman that wrote this code came in as a big shoot, ms certified and all that. We had a two week code review before she left and I asked her specifically why she wrote this function 3 times and the only difference I could see was the subject. Her answer was "I don't know, that is how I got it to work." After that, I didn't ask anymore questions.
Now after dealing with this code for a month it is even worse that I thought. Such as functions that have an object as the parameter and the first thing the function does is "query" the database using the object to retrieve the object, for example:
Code:
private void CreateWorkItem(string request_status, Employee requestor, Employee approver, DS_Request req)
{
DS_Request ds_request = _request.GetDSRequest(req.request_id);
....
}
As a note, I say "query" because she used what I call the "magic model" style where you create a model of your db with some tool that read the db information and it creates class that magically select, update and insert information into the db. Personally I really hate tools that do this. I think if you don't know SQL enough to write these kind of classes yourself you shouldn't be writing application that interact with databases.