If you know me, then you should know that I possess no people skills. I am a developer. One of the traits of a real developer is the lack of any social skills - it is why we develop and spend our lives around it so that we can minimize 'conversations'.

I have a teammate who has done a lot of sloppy code. Not sloppy code as in me being pedantic and whipping someone with my shoelace for using inline ASP.NET or using 'var' in C#. I mean proper sloppy code. This has happened in the past and in those cases, I have either

a) made changes to his code and told him what I did so that he'd learn
b) sat with him and told him what needs to be changed so that he'd learn

OK so far. But, his latest was a bit too much. I had told him to write a control which would call a service and return the ID (details not important). He did write it, but it doesn't return the ID! It just calls the service. No properties exposed, nothing. This is in addition to other points which I've told him about before, but he has just ignored.

I am not sure how to approach this problem. Do I tell the team leader? Do I tell him? Do I tell them both?

What I fear about telling just him is that he's going to think "Oh, he's fixed my code for me, I can now move on. Whoopdeedoo," and he'll never get it right.

Should I continue cleaning up after him or be a tattle-tale?