In order to get experience as a team lead, I was recently given the task of supervising a programmer.

What I found out is that he is having a problem in writing a simple if condition. He has issues with string. And he doesn't know how to pass a variable in the addClass function of jQuery with an if condition.

And he doesn't know when to use a for loop. Or even what a for loop is used for.

How to make him understand these basic concepts quickly?

I told him to Google for how to use if condition for addClass variable. But he didn't find it, then I told him to do it quickly in the early morning, when discussing he was giving reasons that it is what that, then I told him I show you how to do that, then he told me, you should have done it before.

What should I reply to him? He is telling me that you should tell me everything or Should I do it and show him every time? It may take lot of time, and every time I have to do a task. I want him to be independent.

  • 47
    You should review your recruitment process to avoid this kind of situation.
    – Matthieu
    Commented Jan 12, 2012 at 16:42
  • @Matthieu i am getting experience as team lead , programmer assigned to me is not know how to use if and for .
    – WebDev
    Commented Jan 12, 2012 at 16:57
  • 11
    @WebDev he is NOT a programmer. He is a person who has been employed as a programmer who has no experience. IF your company is happy with that, then they need to train him as a programmer.
    – ozz
    Commented Jan 12, 2012 at 17:00
  • 4
    I don't know about the OP but the person assigned to him should probably be fired.
    – Rig
    Commented Jan 12, 2012 at 20:46
  • 1
    Even programmers hired in junior level should know what the basics are (code sequence, loops and conditions). The only thing I'd expect juniors to trip up on is using the framework (such as jQuery) in a wrong manner or getting OO wrong, which should be acceptable for a lead to help out with.
    – Spoike
    Commented Jan 12, 2012 at 22:08

8 Answers 8


Disclaimer : you may want to check with you manager and/or your Human Ressources Department before following my advice.

Plain and simple : Fire him from your team.

He does not have the basic skills needed to be a programmer. Your company is certainly not a programming school, and you cannot be a full time team leader and a school teacher at the same time.

In the future, you should get involved in the recruitment process of your company to select the people you will have in your team, and help implement best practices for programmers' recruitment. If you don't, you will have a hard time achieving your goals as a team leader. If team leaders are not involved in the recruitment process at your company, the best you can do is to remain a programmer or find a new company that gives you the responsabilities that come with your role.

If you, as a team leader, don't act by telling your manager : "This person is not a good fit for my team", you will be held responsible of losing time in unnecessary hand-holding, instead of getting involved in more constructive tasks for the company. Whatever your manager's answer is, you will have done your due diligence.

I've seen enough team leaders failing their first assignement because of this specific case.

  • 1
    -1 This doesn't solve anything. What if the programmer is versed in Cobol and has had no prior experience to jQuery or JS for that matter? The OP is searching for a scenario answer; hanging on to the skill set of this specific individual is really missing the point IMHO. Commented Jan 12, 2012 at 17:26
  • 7
    @AaronMcIver : Even Cobol has conditional expression. From what he describes there is a strong misfit between who the person is and what he has to do. If the team leader doesn't act by telling his manager : "This person is not a good fit for my team", he will be held responsible of loosing time in unnecessary holding hands, instead of getting involved in more constructive tasks for the company. Whatever the answer of the manager will be to this, he will have done his due diligence. I've seen enough team leaders failing their first assignement because of this specific case.
    – Matthieu
    Commented Jan 12, 2012 at 17:34
  • 2
    +1 For getting right to the point. You are in the business of writing software not teaching students. The programmer should be fired.
    – maple_shaft
    Commented Jan 12, 2012 at 17:47
  • 6
    The person that should be fired should really be the HR person, and anyone else involved in the hiring decision !! Commented Jan 12, 2012 at 23:52
  • 1
    I love how the Disclaimer and the Advice clash abruptly
    – ZJR
    Commented Jan 18, 2012 at 14:24

Go back to basics. Writing code is only one of several important programming skills; if he can't solve problems, teaching him language syntax won't help.

  1. Give the guy a simple problem and have him write down, in English, the steps needed to solve that problem. Make it something really simple, like FizzBuzz or the sieve of Eratosthenes.

  2. When he has come up with a solution, sit down and run through it by hand together with him. If it's correct, great. If not, try to help him identify and solve any problems. Don't do it for him -- just provide some guidance. If his sieve "program" emits an 8, you might point out that 8 isn't prime and ask how that happened. The idea here is to get him thinking like a programmer. He might have known how to do this once, so hopefully it's just a matter of getting him back on track.

  3. When the "program" is correct, ask him to translate it from English to whatever language you're using, again on paper. He may need more help from you at this point since it sounds like he really doesn't speak the language. Have him keep a list of every new language construct, what it's for, and how it's used.

  4. When the translation is done and looks correct to you, have him type it into a computer, compile, and run. It probably won't run the first time; that's fine, the idea here is to get used to working with a compiler and learn to interpret errors. Again, your help will probably be required.

  5. When the program runs, verify that it produces the correct output. If so, go back to step one with a new problem. Repeat as necessary until he's comfortable with the process and can solve simple problems, then slowly increase the complexity of the problems.

  6. At some point, one of his programs will produce incorrect results, or will fail to work at all. Show him how to use a debugger and other tools to identify and fix the problem.

  7. Don't expect miracles. Nobody learns to program in a week. Keep at it, a little at a time, and hopefully you'll soon be able to give him some simple real-world tasks on your project. Along the way, he'll have learned at least some basic skills, and you'll have gotten some experience in helping the people you manage become more effective.

  • 10
    0. Tell your manager that you will be involved in a long process of coaching, that may interfere with your regular tasks, considering how much will be teached.
    – Matthieu
    Commented Jan 12, 2012 at 18:39
  • 2
    While an excellent guide for teaching, one should not have to teach someone already employed as a programmer the rudiments of programming. Commented Jan 12, 2012 at 19:58
  • 1
    @EthanFurman Of course, but you have to play the hand you're dealt. Who knows? Maybe the guy was just a bad hire. Maybe he was originally hired into some other dept. and the company prefers to retrain him than let him go. Maybe he's the boss's nephew. It doesn't sound like the OP gets to pick, and doing a good job bringing the guy up to speed could be a feather in his cap.
    – Caleb
    Commented Jan 12, 2012 at 20:03
  • 1
    @Caleb : ... Or an arrow in his knee.
    – Matthieu
    Commented Jan 12, 2012 at 20:07
  • 1
    @Matthieu I used to be a programmer, until .... ;-)
    – maple_shaft
    Commented Jan 13, 2012 at 14:50

There are 2 problems that I see here. They are very separate, but both equally important.

As @Matthieu has suggested it appears that you have a bad employee, the type that are not only non-productive (zero impact), but are a negative impact on progress and the team (morale, fusion / gelling, friendliness). You need to understand why this employee was hired. If it is a HR error, or a competent liar during the interview, then you can most likely resolve it by recommending to your management (or their boss) the termination of this employee's employment as a programmer. Perhaps they are a competent IT system administrator and perplexed why they are being asked to do programming. -- I've had job interviews through recruitment agencies that were about as messed up (on purpose by the agency) in the past, so it may not be the employee's fault.

But there may be office politics, such as a relationship to senior staff / executives that you may need to know about before making noise. This you need to do quietly before saying anything to anyone other than your manager / supervisor. In that case you could need to develop a containment strategy which is primarily isolation (problem containment) and damage control.

Then, the second issue, if you end up keeping this employee then you need to give them their own environment where they can safely learn and progress, mistakes and all, in a healthy positive environment that can hopefully groom a potential programmer. This means they do need "real" projects eventually. An employee who clearly knows they are being isolated becomes even more disenfranchised and demotivated. You need to create a miniature "career development" strategy for this employee. What would it take to get them to become a useful employee in the future? Typically starting with education and/or training. Combined with developing a sense of basic skills in the work place (often called work ethic).

You don't mention age explicitly, but I'm going to assume that hopefully this employee is young as well as new, and thus most likely inexperienced, and can be encouraged to learn how to get along in the workplace. HR might be able to suggest "career development" training options that might be an opportunity for them to learn how they should act in the workplace. Larger employers may have some in-house options even. Human Resources can often help here.

I believe you are on the right track that something is amiss, and that you need to gather future information before taking action.

Another action I would also take, is sit down with the employee and ask them about themselves, so you know more about their background and experience. Family connections will tend to be mentioned if that is the basis of employment.

Best of luck.


what should I reply to him?

"Look, this is very basic stuff. It's not my job to teach you the basics - it's my job to assign you work and check that it's being done right. If you don't know this sort of stuff, and can't figure it out, then you're not a programmer. I'll ask about getting you sent on a training course, but if you can't do this stuff then you can't do the job."


Give him simple tasks and the tools to do what he needs to do and let him sink or swim....

If this guy is not putting in the work to at least learn then what good is he to you? It's OK to not know everything but if he expects you to walk him through everything it's just not going to work.

I think what makes us programmers is our constant desire to learn and get better. If this guy cannot or refuses to work with you then all he will do is slow you and your team down.

What this guy needs is a reality check and you my friend should give it to him asap.

  • +1 for "I think what makes us programmers is our constant desire to learn and get better."
    – billy.bob
    Commented Jan 18, 2012 at 16:10

First, I agree with @Matthieu in that he shouldn't be on your team in the first place. He's not a productive member of the team, and from your account, doesn't seem to have much interest in becoming one. He doesn't seem to have any interest in doing his job and expects you to do it for him.

Also, my direct response to him saying "you should have done it before," would be along the lines of "no, it's your responsibility. I gave you that task, it's your job to complete it to the best of your ability."

That said, if you're stuck teaching him (or you find yourself in a learning environment), here are some things I did as a tutor to help people learn about the basics of programming.

  1. Never just give them the answer. Giving them the answer, even with explaining it to them afterward does nothing to help them learn it. Remember the saying "I hear and I forget, I see and I remember, I do and I understand." Instead, show them how to come to the answer the first time, them help them figure it out for themselves. Not only do you keep them from just taking your answer blindly, you show them how to find their own answers ("give a man a fish...").
  2. Relate the concepts to real actions. Doing this makes loops and conditionals stupidly easy. Walk them through something as if they, themselves were doing it, and what actions they would take under those circumstances. FizzBuzz is a good example - you're doing a repetitive behavior (counting), and checking each item for a given conditional (multiple of 3 and/or 5).
  3. Let them fail, then show them what they did wrong. Some people learn best when they've screwed something up, as long as they know why they screwed up. Let them try to solve the problem, then walk through it with them and show them how it can be fixed/improved.

Assuming that you really want to help him learn on the job and you won't/can't fire him due to complicated reasons best known to yourself (e.g. politics such he is the CEO's son) as the issues mentioned are really basics that even a student with 1 semester of programming experience should know. I suggest the following:

  1. Arrange a meeting with your superior to let him know that he is simply not yet suitable for a basic job as a programmer. If he insist you should continue to work with him, proceed to step 2.

  2. Be honest with him and point him to websites such as http://www.codecademy.com/ or less dry introductions to programming such as 'Head First Java' and get him to struggle himself. Tell him that these resources hold the answers to his questions and that although you like to help, you are really busy during this period. Close off methods for easy contact or he will get reliant on you. Act really busy!

  3. Track his progress by making it compulsory for him to submit a daily and weekly report of his learning at the end of each working day and provide your feedback once a week to see if he is going off track and to show that you are trying to make some time for him as well.

  4. When you feel he has gotten the minimum basics, you may start to gently introduce him to small real tasks as weekly homework.

In other words, treat him like a beginning student, for he is at such a level. If he decides to quit, I believe you have done what you can as well. Meanwhile I'm afraid you would have to do his work or get an extra helper if possible to ship things on time.


Perhaps the person was assigned to you by someone who wanted to get him off their team. Beware of other teams who want to give you a person.

But if you are stuck with him then find some online how-to-program courses like MIT Opencourseware and tell him to work through it.

Or assign him to help desk/telephone tech support.

Meanwhile tell the managers if they want their project done on time to find someone else.

Not the answer you're looking for? Browse other questions tagged or ask your own question.