How to supervise a bad PhD student I am a postdoc helping in the supervision of a PhD student who is finishing his 2nd year now. This is in Europe, meaning the student came in with a MSc degree and these 2 years have been of research. "Helping in the supervision" actually means here that my professor is nominally appointed as supervisor but I am doing all of the actual supervision (my professor is not familiar with the details of our project, just the "big picture").

The project is on computational physics/chemistry, and the PhD student has a background in chemistry with no prior computational knowledge. At the time of hiring we were under pressure to get the project going and complementing my physics background with someone who actually knows chemistry seemed like a good idea back then. Also the student was very motivated.

I have been spending a large amount of time teaching this student lots of physics and programming/scripting, which is needed to carry out the project. I assumed I would need to spend a lot of time at the beginning because of the background mismatch, so that was no problem. I thought things would improve with time. Unfortunately, they have not. The student is terrible at any kind of programming and has a lot of trouble learning new concepts, but what worries me the most is his attitude.

He basically is obsessed with getting results but is overlooking learning, in the form of reading books and papers and working hard on a problem for a period of time. If I tell him to "bang his head against the wall" for a couple of weeks trying to crack a problem before seeking advice from me (like we all have done during our PhDs), he gets frustrated after one or two days and starts sending me lots of desperate emails begging for me to intervene. This is a "gimme teh codez" kind of student, looking to avoid any problem which is of any real difficulty. I spend long meeting sessions explaining the theoretical and practical details of some approach, but he only seems interested when I write code that he can copy paste and use to get results (without even understanding the code, let alone the underlying physics).

Because of this I have to do lots of debugging and finding the same little (and large) mistakes that arise now and again because the student does not understand what he's doing. I have discussed many times with him that he needs to focus on understanding theory and code, instead of just getting results. But this is to no avail. I get the impression the student wants to do a technician's job rather than a scientist's job, but still get a PhD out of it.

As a result, I find myself working personally on any part of his project which has any hint of difficulty in it, spending way too many hours a week doing supervision, and getting increasingly frustrated at the lack of progress on the project. At this point, it would be fair to say that I could myself get everything he has to do (and more) done just in the time I spent meeting with him.

I have brought some of these concerns up, but the student won't accept they need to adjust how they work, instead claiming the tasks are too complicated (believe me, they're not), the professor does not help enough, the project is not well organized, etc. I don't know what to do - this student is getting easily 10 times more help than I did during my PhD (and I had a good experience).

To complicate things, I am just a postdoc so I have not a wide experience supervising different students that would tell me whether this case is common or isolated.

Am I expecting too much from my student? Is the problem I'm having a common one? How can I improve his attitude towards learning and working? How to deal with a bad research student?
Since I have been that student at the beginning of my PhD, I think I can give you some perspective. I was very motivated when I started, but I didn't know anything about research, so I lost my motivation when I had to be on my own.

I tried the same approach as your student with my PhD adviser, and he told me he's not going to do my work or homework because I have to be able to do everything myself. Obviously, everything I did as a PhD student, I can still do now, so it worked.

But, you have to establish your boundaries. You have to set some discipline, and the first thing is to reduce the interaction with your student. Set a meeting, once a week. One day before the meeting, your student should put in writing, briefly, what progress he made, and what problems he encountered -- that should be discussed in the first half of the meeting. The rest of the meeting will be you telling him what needs to be done next. You should not talk with or help your student outside these meetings, and you should ignore those abusive "help now!!!" emails he's writing you.

If your student just wants to do his job quick, as you describe, you have to realize his output won't be something you can rely on. You need to give him two types of assignments. Some imply things he already does well, so he doesn't lose completely his courage, and the others imply him learning new stuff. The latter have to be easier. You do not help him with them beyond suggesting papers or books to look things up. In case of programming, suggest SE for him to look for help, and give him some examples to get him started and nothing else. Under no conditions you should do his work.

There are things you should demand from your student. If he has to present data to you, the data should be in the format your group is already using, if there is code that he needs to write, it should be documented, and he has to present tests that it's working. If you assigned him to read a certain paper, you have to make sure he read it. If you told him to search for literature, he needs to be able to discuss what he found and how is that relevant for the project and so on. 

Since you are a postdoc, you probably can't enforce things properly. If you were his adviser, you could tell him to follow your discipline, or find another adviser. As a postdoc, you could go to the boss, tell them about what's going on and that the student consumes too much of your time. Tell them you are thinking of setting a discipline and ask them to back you up, especially since you are doing their job. Anyway, whatever you do, once you set your new set of rules, don't let him cross them, or break them yourself.

Edit - in response to @CaffeineAddiction comment claiming that, as an adviser you need to introduce the student to the basics.

The job of the adviser is not to introduce you to the foundations of whatever field. Part of that job is to teach the student how to introduce themselves to the basics. In other words, you don't teach the man to fish, you teach the man to teach himself how to fish. The basics should have been covered in classes. If they were not, you do have to make a compromise, and intervene when the student seems to have a block and doesn't make progress. But, you do that simply because you don't want to lose the student. 

That's what I do. If my student has no background, I give him an easy test case, I suggest them a class to take, I recommend a book, or two, and give them one of the not so complex code that works. The code is a model, and might contain a few layers of complexity. My job is to make the student aware of this, and guide them to search for the knowledge they need to improve the code, or write their own. 

I took the code as an example, since that was the original question. But, when you start research in my field, you don't get a code. You get a paper with a bunch of formulas. To understand those formulas, you need a few years of reading textbooks and other research papers. It's very easy to get lost in the process, in other words, spending 6 months on trying to understand something completely irrelevant. The adviser's job is to offer limited guidance to understanding that paper, help you recognize your blocks and address them. The heavy lifting is still yours. 

As far as I understand, there are only two valuable skills that an adviser is responsible to teach a PhD student. The first is to teach the student how to learn on their own a completely new subject. The second skill an adviser must teach is how to do research. Many advisers skip the first skill because of many reasons, but mostly because of the lack of time. Then they complain about students with technician mentality. But, learning that first skill, also teaches you the right attitude towards the unknown, which is essential in research.