Guiding a mentee towards greater independence I am a Master's student who is mentoring a recent graduate through a research project in the same field (of astronomy). He is a very good student, but struggles with one of the realities of being an astronomer - coding. Right now, he is just running code others have written, but despite my strong suggestion that he start learning the language, still asks for my help on even the most elementary of problems. His confidence in using computers is lacking, and if he continues in the field it will become a serious hindrance.

I did provide a very high level of assistance early on, but this was mostly due to a couple of bugs in setting my own code up on his computer. In later stages of this research project, he is going to need to write some basic code of his own, so I feel we're getting to the stage where we need to establish a greater level of independence. 

One of the key points of difference between a student and a researcher is that a researcher solves their own problems. It is the job of a mentor and supervisor to assist in that, but I feel that my mentee still feels entitled that I should solve his problems for him (I only solved "his" problems before because a bug in code that I wrote is my responsibility). It's time to start taking a more hands-off approach: I'm happy to give advice on how he might solve a problem, but it's his responsibility to sit down and implement that idea.

How should I approach this problem -  (a) with my mentee, and (b) with our supervising professor (we have the same supervisor)?
Disclaimer: I am a current PhD student and speak from personal experience as one who has guided both masters as well as undergraduate students.

Learning how to code appropriately takes skill, time and confidence (among other things). My strategy for this while mentoring students is as follows:


Develop a small project which will have some significant coding component in it but will still add to the overall project. Lay out the coding expectations and deliverables very clearly. Don't start with something too difficult.
Consider using version control tools (such as git) to manage your mentee's code. Be very clear about what languages/libraries etc. you plan to use and how this code will add to the project.
Lay out a timeline with your mentee with very specific coding expectations.
Achieve each small component with your mentee. Guide (but don't spoonfeed/handhold) your mentee. Make sure that he/she codes everything by him/herself.
Give him/her a small reward. (coffee/sugary thingy/beer) This always makes my students very happy. :)


In my experience, once a mentee has achieved a small project by him/herself, they are usually quick and eager to move onto the next objective. I use this to ramp up the difficulty level slowly but surely.

Regarding the second part of your question, I would definitely keep your supervisor/adviser in the loop regarding this. He/She may have much better suggestions than any that I have to offer here.