-3

My friend is very frustrated, he realized recently that his supervisor never read the code he was working on for the last year for his PhD.

As he described the situation, his supervisor doesn't seem to see a problem in that fact, and says that it was always hard for him to read any of his students' codes. However, he continues asking him 'stupid' questions about how the code is implemented and asks him to include those answers in his thesis. When my friend mentioned that the thesis already has these answers in such section or paragraph, the supervisor quickly pretends that he means to describe it in more detail, and my friend is afraid that he never read the thesis at all, except for some major sections.

So my question: Is this a common practice in academia? Are supervisors required to read their students' work or not; and if not, how do they ensure that the work is correct?

8
  • 3
    Is the question about whether supervisors should read code, or about how to deal with advisors who save all their feedback until the last minute? We try to separate to one question per post, so that others who have the same problem in future can find this post and benefit from it.
    – cag51
    Jan 4 at 3:00
  • 2
    The question posted here doesn't seem internally consistent, perhaps in part because you're posting on someone else's behalf, which doesn't seem to make a very coherent story. For example, you say both that the professor and student meet weekly and provides him regular feedback, and then suggest the supervisor isn't involved until the thesis is almost done.
    – Bryan Krause
    Jan 4 at 3:05
  • I tried to relay the story as I heard it, the meetings are held and the only thing that happen in those meetings is my friend is talking and the supervisor is taking notes. My friend isn't learning anything from his supervisor. Just giving him tools to be used against him later.
    – metaUser
    Jan 4 at 3:09
  • 5
    What's your friend's field? "asking him 'stupid' questions about how the code is implemented" Why is "how the code is implemented" is a stupid question?
    – Nobody
    Jan 4 at 3:40
  • 3
    Is it possible there is a disconnect in communication styles, and the supervisor is using the Socratic method to get the student to think more deeply about what they've coded and written?
    – shoover
    Jan 4 at 16:38

2 Answers 2

8

It is common for supervisors to not read their students' code. That is because code is hard to read if it's not written by you. You can note this effect yourself if you try reading the code of open source projects (e.g. Stockfish). The last time I tried to read someone else's code from scratch, it took several days to get a sense of what the code was doing, and I still didn't understand every line.

How do the supervisors know the code is correct then? Well, how does anyone know the code is correct? You test the code on simpler cases and make sure it works. For example, take a program that takes five points and calculates the area of the resulting polygon. In that case, if you give the program the same point five times, it should return 0. Similarly, if you give it only three points (if the program requires five inputs, give one input three times), it should return the area of the corresponding triangle. You can verify this case easily with pen & paper, since the formula for a triangle's area is known.

And then there are other checks. For the pentagon-area program above, if you give very large numbers, you should also get a very large area. Does that happen? If you give five points in the 1st quadrant (i.e., positive x-value, positive y-value), you should get the same area with the five mirrored points in the 3rd quadrant (negative x-value, negative y-value). Does that happen? For each test that the program passes, the more confident you can be that it is working correctly.

The last line doesn't mean that it is working correctly. Example of papers getting retracted because of a bug in the code. But that's typical of science - just because Relativity has passed every experimental test it has faced doesn't mean it is correct.

1
  • 2
    The other thing to understand, along with the fact that it takes several days to read someone's code properly is that universities don't allocate supervisors much time to supervise each student. I am given 1.5 hrs a week per student. Jan 4 at 16:27
1

The question:

Are supervisors required to read their students' work or not; and if not, how do they ensure that the work is correct?

Certainly not the entirety of it, especially for PhD students. By the end of a PhD, the student should be a better expert in their narrow topic than their supervisor. Moreover, in science, we do not repeat every single bit of others' work to be able to judge whether the result is correct or not.

And that is especially true for coding-heavy PhDs of late. My own advisor does not write or read code at all, that does not mean I should not have written any or that I should have forced them to pick up coding just to supervise me. This is just absurd.

Instead, they would have questions (usually) representative of those people in the field would generally have. In some aspects, the roles easily get reversed: advisor-student relationship is not strictly hierarchical, the advisor is not supposed to be better, faster, stronger than the student in every aspect. They are also not supposed to follow the student at every single small step. A PhD student by their graduation should be able to be independent, and they should be able to clearly demonstrate to the thesis committee why their results are correct. The less the advisor's seal of approval matters at that point, the better.

The problem:

My friend is very frustrated

I would advise approaching it similarly to reviewers' comments. If they did not understand everything you said and are asking "stupid" questions, they are usually in the right. Do not look up to the advisor as some kind of an Übermensch: if they did not understand something, what odds are there that the thesis committee will understand it? It is one's job to communicate their work clearly, not readers' job to thoroughly reexamine every nook and cranny. If I read your paper and you did not convince me that your results are sound, presenting arguments understandable by me, I would likely not even get to open your code. And all the hard work that went into it would not matter at all if you did not bother to answer "stupid" questions or thought it is my responsibility to ascend to your level of understanding to be able to bask in your infinite wisdom. Sorry.

This is not the only approach to advising possible. And there are truly stupid questions. But from your post, I got a different impression: very likely, there is value in what your friend's advisor does. If your friend leans towards offering their work only to a select few who will put enough effort in understanding it, they have gotten it backwards. If they overemphasize the role of their advisor in a PhD (as in, results are only valid iff an advisor says so, they then say so to the committee and the work gets a greenlight), that is also problematic.

So there you have it. There is a big gap between "does not even read the code" and "completely clueless about the experiments, methodology, and results". The former is definitely normal, the latter is not. Some in-betweens are also common (e.g. an advisor might not understand some specific parts of the methodology, and that is also fine).

You must log in to answer this question.

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