Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm trying to lead a software team that is falling behind. One of the main problems is that whenever something is mildly difficult, I end up having to assign it to myself. I had one other developer with moderate skills and half an intern. Unfortunately, the other developer's skills do not include design.

So I begged my boss for one of the guys on one of the other teams, he's been working here longer than I have (5 years). He can't compete with me on design OR the language we use, but I thought he was the most competent besides myself.

Today he gave me a piece of code that did something not in the least bit dissimilar to:

object const& my_class::get_object() const 
{ 
  return *std::unique_ptr<object>(new object());
}

He asked me if that was a problem! I said the only thing I could think of, "Yes. That's a problem." Then he comes over to my desk asking me how to fix it!! I said, "Use an object that survives the call of the function." Then he starts freaking out, "Yeah, but how, the only thing I can think of is to make a member variable."

I was a bit busy at this time because I was already trying to stuff in extra work I had to take over for the other guy on the team because he couldn't figure it out...I told the guy to go away because I was busy and to go figure it out himself. Then he leaves in a huff talking about how it's not his fault if he screws things up. He's been freaking out since he came on the team and I don't think it's getting better.

I feel like I'm drowning here. WTH can I do? What was the right way to deal with that? Would it have been more reasonable to go help this guy who's been writing C++ for 7 years figure out how to correctly return a reference to an object that isn't destroyed the moment it's returned? I feel like that's just ridiculous to have to do and wonder how the hell I'd get anything done that way.

Sometimes I think they're doing it on purpose but that seems to me to just be whack...but then again, so does the question I was just asked today. This isn't some kid sitting at home trying to figure out his first program, having his brain blown by pointers.

share|improve this question

closed as not constructive by Mark Trapp Dec 17 '11 at 3:44

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

4  
SCREAM!!! And go on a rant. It makes you feel better. Oh wait, I see you've already been doing that. Try smiling. :) :D (Evil smiles are OK, too. >:D ) –  muntoo Jan 19 '11 at 0:16
    
He just sent me an email saying since I had a "strong desire not to be interrupted" he couldn't continue and was going back to the other project :p –  anon Jan 19 '11 at 0:19
7  
Why is someone who doesn't have the slightest understanding of pointers and memory management working on a C++ project? –  Charles Salvia Jan 19 '11 at 0:33
2  
One possible explanation: for many years the popular wisdom was that STL was not ready for prime time, and would produce code too bloated for production use. It used to be possible to be a relatively sophisticated C++ programmer without knowing much at all about the STL. Obviously things have changed. However, if he was trained in the late 90s, or was mentored by someone trained in the late 90s, he may grok new object() just fine, but be completely un-hinged by this new-fangled std::unique_ptr<object>() thingie. It doesn't solve your problem, but it might explain where he's coming from. –  Charles E. Grant Jan 19 '11 at 7:53
2  
@Charles: agreed, I have several years of C++ experience from the games industry, and have never touched STL nor know anything about it whatsoever. Looking at that code snippet above, all I can do is shake my head and think, "if you want to write C++, write C++, but it looks like you don't want to write C++, so why not just use a higher level language?" –  Carson63000 Jan 19 '11 at 8:47

6 Answers 6

up vote 14 down vote accepted

Would it have been more reasonable to go help this guy who's been writing C++ for 7 years figure out how to correctly return a reference to an object that isn't destroyed the moment it's returned?

I gave all my C++ books away several years ago, while swearing that I'd never touch that language ever again, and even I can tell this guy doesn't know what he's doing. I think you ought to sit down with him and find out just what his skill level is.

This sounds like maybe he's got 1 year of experience seven times - not seven years of experience. In larger companies, it is quite possible for unskilled workers to hide themselves and shuffle "around the system" whenever they get caught out.

I'm trying to lead a software team that is falling behind. One of the main problems is that whenever something is mildly difficult, I end up having to assign it to myself.

If this is the case, then you have to stop and figure out what folks skill levels are. I understand you feel overwhelmed by deadlines and such, but you can't get the work done when you can't even be sure of what your team consists of. You can't get the project completed if you keep making the same mistakes - just faster this time.

Taking all the work on yourself means you don't have a team, nor do you have any confidence in them. That has to get fixed first.

share|improve this answer
7  
+1 for "sounds like maybe he's got 1 year of experience seven times". –  Matthew Read Jan 19 '11 at 2:42
    
@Matthew: so true. –  IAbstract Jan 19 '11 at 13:13

Get a job at a better company where you can work with competent people.

share|improve this answer
6  
Or, alternatively, stop using C++. This will solve many different classes of nasty errors. –  Mason Wheeler Jan 19 '11 at 1:02
3  
@Mason: I concur. Everyone write C# and be happy. :) –  IAbstract Jan 19 '11 at 1:08
2  
C++ should only be used where C++ is appropriate. I know of no existing language that can accomplish C++'s job as well as it does. –  Matthew Read Jan 19 '11 at 1:23
2  
@Matthew read, with programmers who are as incompetent as in the OP's example, would C++ EVER be appropriate? –  Yar Jan 19 '11 at 1:33
4  
@Yar: Though a bad programmer writes bad code in every language. –  Jon Purdy Jan 19 '11 at 1:59

Well, if I had someone who has been writing code for 7 years ask something that sounds pretty basic, I would have to wonder what else is going on. I'm not a C++ programmer so I can't comment on that aspect.

What I would be wanting to know, as his supervisor I would assume, if something else is going on that is distracting him. I realize that you might not have had time right then, but the last thing you should do is push someone away like that.

Set aside a moment to talk with him and let him know right then, "I understand your urgency on this, but I don't have time for this right now. As soon as I do, I will let you know. I would expect no longer than about an hour."

This way you have conveyed your understanding of his urgency, that you don't have time, and that you will get back with him. Even so much as an expectation of when you will get back with him. He will feel much better about that than being shooed away (that is how I would take it).

What you should do now is set aside some time and let him know when you can talk with him about the issue. Back track and swallow some pride, let the person know you understand his urgency and just didn't have the time to deal with it. You should also see if he has anything in his personal areas that could be affecting his attention - i.e. what else might be distracting him. Personal lives affect us programmers, too. ;)

share|improve this answer

The right thing would have been to help him with the problem. It didn't have to be be right on the spot. You could have said, "I'm tied up right now. Go read Chapter X of the C++ STL, and let's touch base again on tomorrow at 11am.".

Shouting can work for some people and some situations if it is just a matter of motivation. But, if it is a matter of competence or knowledge, yelling at people and blowing them off doesn't help at all. It's like shouting at people who don't speak English. it doesn't help them understand what you are trying to say, and it may kill any motivation they have to try to assist you. They are where they are, and no amount of anger or frustration on your part will make them better at writing C++ in the next 48 hours. You may also have to go back to management and explain that the scope of the project is beyond the current skill of your team. Stuff like this is why being a team lead is fracking hard.

share|improve this answer
    
I didn't shout. I just said, I'm busy right now. I did blow him off though. –  Crazy Eddie Jan 19 '11 at 1:17
3  
@Noah, I wasn't there, you were, so I yield. Consider this though: people who are so frustrated that they think people are deliberately doing stupid things, rather than stupidly doing stupid things, tend to speak in a very strained voice through clenched teeth, while thinking that they are smiling and dulcet toned. The other person may also be so stressed out that they hear: "Could you come back in about 10 minutes?" as "Get the frack out of my office you dirtbag!". Being a team lead is often all about manipulating primate behavior through body language and voice tone. –  Charles E. Grant Jan 19 '11 at 1:37

This sort of issue is the bread and butter of management. One question all managers need to ask is, "Do my people have the skills needed to do the job?" If the answer is "no", a good manager doesn't scream or quit - a good manager goes about rectifying the situation.

Here's one observation - C++ is not a trivial language, so is it possible to use something that your junior developers are more competent in? If it must be in C++, then you either need to train up your existing developers, or hire new developers with the appropriate skills.

I was in a not dissimilar situation a year ago. I was brought in to lead a team of VB6 programmers working on spaghetti code, and the desire of management was to shift toward well architected, object oriented systems written in .NET. We've made some excellent progress in this area, so these sorts of shifts are possible.

One final comment. If you don't like dealing with this sort of issue, I would get out of management and move back into a purely technical role. These sorts of messy probelms are the bread and butter of a manager's life, and it doesn't suit everyone.

share|improve this answer
4  
This is a nice example of the view of management that many employees don't seem to have. –  Mark C Jan 19 '11 at 5:51
    
Yeah, I'm not management. Sometimes I wish I was so I'd have more standing to work on these issues. Other times I'm really glad I'm not because I don't have to. I'm just a tech lead. –  Crazy Eddie Jan 19 '11 at 17:20
1  
Hi Noah, I'd chat to whoever is managing the team then - they are responsible for making sure the right people are avaiable and have the right skills. –  Craig Schwarze Jan 19 '11 at 21:39

I think you need to sit down with your boss and explain it all to him. That sounds nuts - what is that guy doing even working there if he doesn't know basics?

share|improve this answer