Cleaning Up Another Mess

Code Clean Up

Today I spent all day re-writing an instrument loader because over the course of the last two weeks the junior guy on the team that I handed this project to has made a complete and total mess of it. Each day, I asked him how things were going. Each day I got the same "looking good... almost done". Each day, I fear, it got a little worse. Finally, the project was waiting on him, and I had to step in.

I should have done so much earlier. My fault.

I like this guy, I really do, but this was a train wreck, and he should have asked for help after the first few days. There was shared state in the loader methods that would have failed had even two clients tried to load anything. In the tests he wrote and used, this never came up, but it took me less than 5 minutes to see this problem, and realize the depth of the problem.

This is the second guy on the team that I needed to put on test writing duty for a while. I should not have allowed it to get this bad, but I did, and that's my fault. I don't believe I shoulder all the blame, as I asked how it was going and he didn't speak up - but that's inexperience for you: overestimating their own skills, and underestimating the problems they face.

So today I was coding like a madman trying to get something that worked for the problem at hand. Thankfully, I got it working, but it took a full 13 hour day to do it. From here on out, I'm going to keep his work to finishing the skeletons that I write for him. That way, I can limit the damage.