This title is a little broad but I may need to give a little background before I can ask my question properly.

I know that similar questions have been asked here already. But in my case I'm not asking if I should be mentoring someone or if the person is a good fit for being a software developer. That is not my place to judge. I have not been asked outright, but it is apparent that myself and other fellow senior developers are to mentor the new developers that start here. I have no problem with this whatsoever and, in many cases, it lends me a fresh perspective on things and I end up learning in the process. Also, I remember how beneficial it was in the beginning of my career when someone would take some time to teach me something.

When I say "new developer" they could be anywhere from fresh out of college to having a year or two of experience.

Recently we've had people start here who seem to have an attitude toward development/programming which is different from my own and hard for me to reconcile; they extract just enough information to get the task done but not really learn from it. I find myself going over and over the same issues with them. I understand that part of this could be a personality thing, but I feel it's my job to do my best and push them out of the nest while they're under my wing, so to speak.

How can I impart just enough information so that they will learn but not give so much as to solve the problem for them?

Or perhaps:

What's the proper response to questions that are designed to take the path of least resistance and, in essence, force them to learn instead of take the easy way out?

These questions are probably more general teaching questions and don't have that much to do specifically with software development.

Note: I do not get a say in what tasks they are working on. Management doles the task out and it could be anything from a very simple bug fix to starting an entire application by themselves. While this is not ideal by any means and obviously presents its own gauntlet of challenges, I feel it's a topic best left for another question. So the best I can do is help them with the problem at hand and try to help them break it down into simpler problems and also check their commit logs and point out mistakes that they made.

My main objectives are to:


Help them out and give them the tools they need to start becoming more self-reliant.
Steer them in the right direction and break bad development habits early on.
Lessen the amount of time I spend with them (the personality type described above tends to need much more one-on-one time and does not do well over IM or email. While that's generally fine, I can't always stop what I'm working on, break my stride, and help them debug an error on a moments notice; I have my own projects that need to get done).


There was once a question around here that contained this kind of information, and the piece that stuck with me the most was don't touch their keyboard

In short, tell your junior how to accomplish what they are trying to do, but do not do it for them.

But in addition to that, here are some other tips:


Encourage Google (or any other search tool). If you know the answer can be found online easily, tell them to look it up instead of telling them the answer. Ultimately you want to teach them how to teach themselves, and not have them become dependent on you.
Make yourself available to answer questions. If you are ever not available or do not wish to be interrupted, make it clear to them that they should hold their questions until a specified time.
Do code reviews regularly to tell them what they are doing right/wrong. Use this as an opportunity to point out best practices
Begin early with best practices. It's better to take extra time to teach them the right way, than to try and change their methods later on.
Get them started early with planning/documentating what they are going to be doing instead of letting them begin by writing code.
Be open to learning from them. They probably spend more time than you learning, and it's possible that they learn something that you didn't know.
Help them learn from their mistakes. There are going to be mistakes, so be sure you show them that mistakes are part of learning, and that they should use them as an opportunity to learn.
(From RuneFS below) Instead of telling them how to do something, try to help them figure it out themself. This will help improve their ability to logically work through a problem, and increases their learning ability
(From RuneFS below) Instead of telling them what they did wrong, tell them of ways they can improve it. Be sure to include why your way is better than theirs. This will boost their confidence instead of weaken it. Of course, if they aren't listening to you then don't be afraid to just tell them to do it the right way :)

