I have team leader (in a 2 man team, of him and me) that claims 7 years of .NET/C# experience (same as me), and another number of years before that with other languages (which I do not have).
I dont know under what rock this guy been sleeping, but when you see code like:
public byte[] ReadBytes(string filename)
{
FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fs);
FileInfo fi = new FileInfo(filename);
byte[] buffer = new byte[fi.Length];
for (int i = 0; i < buffer.Length; i++)
{
// optimize this
buffer[i] = br.ReadByte();
}
return buffer;
}
And then he still wastes time on writing unit tests on this trivial stuff (we have a an impossible deadline looming already) that any 1-2 year experienced person should know.
Besides not knowing how to properly use a FileStream (whats up with the BinaryReader? ;p ), he didn't realize there was File.ReadAllBytes
.
Anyways, when I saw this code he 'contributed', I told him to you the above mentioned function. I even sent him the MSDN link via email, which he did not get due to Outlook being closed. I then went outside for smoke for 10 odd minutes to pick up my jaw from the floor. When I came back, he still could not find the method. He trying something like 'new File().Rea...' saying the method does not exist.
I should have probably kept my mouth shut and waited for him to checkin his code, but that could be weeks from now...
I have also addressed various issues about him to the manager, and we have had group discussions to resolve other issues.
I still work as hard as I can, regardless. It does get frustrating knowing you are the only person in 2 man team, contributing any code (I dont think I have seen him write more than 200 odd lines of code by hand), putting in 60+ hours a week.
My current situation. :|
Note: The code isn't exactly as I remember seeing it, it was longer, and perhaps had more checking for an existing file and/or closing the streams.