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)?

  • 3
    I am surprised that MA students are tasked to supervise undergrads. Is that a common practice? This should be a professor's job, not the students' job. This is unheard of in my disciplines (statistics and economics).
    – StasK
    Dec 8, 2013 at 19:58
  • 1
    @StasK I'm not the official supervisor, per se. Just the guy who sits at the desk next to the new guy who is working on the same stuff for a 3-month project. I have no official position or obligation. At my University, at least, it is relatively common that the more experienced postgrads, rather than the professors, show the new guys how things work.
    – Moriarty
    Dec 8, 2013 at 22:52
  • 5
    You're right that I am within my rights to do that, but I won't. I do have a responsibility to pass on my experience to others, even if it's not contractual. My time is limited, however, and so is my motivation to teach things that other resources can - hence the question.
    – Moriarty
    Dec 11, 2013 at 4:54
  • 5
    @StasK Completely normal (and healthy!) in my field. As soon as you know something you are supposed to teach and mentor those that know less. I find this practice highly valuable to both sides.
    – xLeitix
    Feb 26, 2014 at 18:10
  • 1
    @mmh could you explain what you're looking for that is not covered in the current set of answers ?
    – Suresh
    Feb 26, 2014 at 18:42

6 Answers 6


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:

  1. 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.

  2. 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.

  3. Lay out a timeline with your mentee with very specific coding expectations.

  4. 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.

  5. 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.


One of the more difficult tasks of the mentor is to assess current skill levels, set milestones accordingly, and ensure that the student has the necessary resources (and capabilities) to improve his skills.

At your admission, he is a novice coder, if that. Are you setting expectations too high? Does he have the right resources to learn how to code? There are lots of books/websites/youtube videos/whatever that teach coding; is he aware of these tools? Does he know how to use his IDE? Having watched my wife learn to code as a graduate student, I learned that the ability to represent a theoretical solution in software is a skill that takes a lot of time to develop. He may just need time.

Having said that, if you've done all that and he's still not making any progress (after sufficient time... say, two to four months), then you may have to recommend that he take time off from working on your research until he becomes a more proficient coder.

  • 5
    I understand your points, but I have major issues with people who can't find resources on their own, especially for something so readily available. I understand people getting stuck, but there's no excuse for not being able to at least attempt to learn for yourself. For whatever reason, so many novice programmers think that the solution is just to ask someone else how to do something, or look at someone else's code. That's quite frustrating and unfair to themselves and whomever is attempting to help them. I don't think it's the OP's responsibility to spoon-feed his student.
    – Steve P.
    Dec 6, 2013 at 8:03
  • 3
    @SteveP. - I agree it's that finding the balance between appropriate assistance and spoonfeeding is tough, that's why I said it's difficult. Do realize that "spoonfeeding", "proper training", and "absentee advisor" exist on a continuum, and you'd be hard pressed to find anyone agree on definitions for those terms.
    – eykanal
    Dec 6, 2013 at 17:41

The other answers assume that the mentoring relationship can be saved, and that there are specific actions you can take to help the mentee. I want to add that sometimes, that isn't the case.

As a PhD student who is the main "experimentalist" in my group, I mentor many other students (grad, undergrad, even high school summer research students). Some are very good, some are very bad.

Also, like mmh, I mentored 6 or 7 grad students when I myself was an undergrad (because I was more experienced with the particular project).

Mentoring students is hard when you are yourself a student, especially when your mentees are officially at a "higher level" (of study) than you.

Unlike the official faculty advisor, you don't have the ability to enforce consequences for the student's poor performance. Sometimes you feel that the mentee isn't putting as much effort into the mentoring relationship as they would if the mentor was a professor. A student mentor is more approachable than a faculty mentor, which can be good (mentee feels more comfortable asking questions and admitting weaknesses!) or bad (mentee doesn't respect and value mentor's time because he's "only" a student!) depending on the mentor and mentee personalities.

On the other hand, unlike a faculty mentor, you have the distinct advantage that the student is really not your responsibility. If you feel the mentoring relationship is not working out, you can always say the following to the faculty member who is responsible for the student:

"I've been spending a lot of time working with X and I feel like it's not really a productive mentoring relationship. He is taking up a lot of my time, without putting in the effort that he would need to learn what I can teach him, and then become more independent. Please find someone else to work with him to get him up to speed."


Some relevant questions. What is the computational background of your student? Has he ever done any coding before? If so, what languages? What is his general computer literacy? What language are you trying to get him to use? You just write "learning the language". Programming languages vary greatly in their difficulty for someone without experience.

The first programming language I ever tried to learn was C, in the middle of an already busy semester as a grad student, for a course in numerical analysis, in 1997. I used the famous book by Kernighan and Ritchie. I had zero experience of programming at that time, and in hindsight it was a crazy thing to try to do. The instructor didn't offer any programming help; neither did anyone else. I think the instructor was a fan of Fortran. :-) At that time online forums were probably in their infancy. In any case, it never occurred to me to try and use them. There were easier languages to use even in 1997. For example Python 1 existed at the time, though I don't know how usable it was. Anyway, I think I came last in the programming assignments - I think I didn't hand the last one or two assignments out of sheer exhaustion.

Unfortunately the culture in academia with respect to programming and related computer work is very much - toss people in at the deep end and let them sink or swim. This is caused by several factors - often the instructors/senior people are very ignorant. Second, there is a feeling that programming languages are too trivial to teach people and they should just pick it up themselves.

Anyway, I think, depending on what language you are trying to get your student to learn - consider having him learn something easier and more user friendly. I recommend Python. Have him do some simple exercises and gradually warm up to something more difficult. A language like C/C++/Fortran is probably easier to learn once one has learnt some programming in a language that does not require things like compilation and manual memory management. These days there are many resources online to help the novice programmer - point him to some of them. E.g. Stack Overflow. Also, tell him to give high priority to learning version control. I recommend Mercurial. Git is probably fine, but it gives even experienced people a headache. It might be quite scary for an inexperienced person.

  • Could you expand on what you mean by "ignorant"? In what respect? Dec 6, 2013 at 16:35
  • @PeterJansson Ignorant about programming. And more generally software engineering issues. Design and so forth. Sorry if that was not clear. This is not true of everyone, obviously. For example, Daniel Bernstein is a professor but is also a computing expert. But in my experience it is a common state of affairs. Disclaimer: I've not had much experience with computer science people - maybe the situtation is different there. Dec 6, 2013 at 16:50
  • 2
    Your third paragraph contains a lot of editorializing. You should definitely not assume that your experience represents the general case.
    – eykanal
    Dec 6, 2013 at 17:38
  • 2
    I was totally thrown into one of those sink or swim situations at the beginning of my grad studies. People around me consider it normal, but, four years later, I'm convinced that some formal introduction to programming would have saved me a lot of time.
    – Ana
    Dec 6, 2013 at 19:23
  • 1
    @eykanal It is true that it is all too easy to generalize from particular examples. However, I've been in similar situations in different places and also observed them happening to other people. Also, I've compared notes with other people who have said the same thing. However, this was in the context of a few universities, mostly in a specific geographic area, so maybe it is not typical. I would like to believe that. If people don't agree, feel free to comment. Dec 6, 2013 at 20:51

Since you are not a professional programmer yourself, it is a poor idea to have you teach programming to your mentee. He should take a real programming course with Python or Ruby or Java, be that online (EdX is offering a computer science course starting Jan 1, 2014), or with a real instructor at your home school. That way, he won't learn your errors (which you admit you make), and will learn the professional tools like the revision control which I think Faheem Mitha mentioned.

Poor programming skills among scientists is an unseen, but a real impediment to reproducibility of research, its soundness, and eventually scientific progress.

  • 1
    In addition to EdX, I'd add the likes of MIT OpenCourseWare and Coursera . No one will become a good programmer on their own; it really does require good training and (real or virtual) mentoring.
    – mal
    Jul 9, 2014 at 10:06

Since your supervisor put you in this mentoring position, you need to let her/him know that you've run into this issue with the mentee. Then have the conversation with the mentee that "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." (your words are perfect!)

I supervise Higher Ed grad students - some are eager to work independently, others not so much. Be consistent with your expectations with all mentees you supervise. Help him by directing him to resources that will help him and set a weekly time to meet where you both go over progress made. You're not the one learning here, the effort is required from the one doing the learning. Be nice, but be firm.

Good luck!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .