text:
How to respond to a professor who was insulted by an email detailing mistakes in the exercise?
I am an undergraduate student. Preparing the solution to an exercise regarding computer assembly language programming I discovered an error in the program skeleton that was given to us to base our solution on (one of the instructions was illegal, because its immediate operand was outside the permitted range).
I sent an email to the professor's address for "questions and clarifications" regarding the exercise, explaining in detail (about 5 paragraphs) and citing a textbook, why the skeleton program would not compile (assemble) and finally commenting that it seems surprising that this error would make it to the question text, since simply running the assembler on the skeleton program would reveal it.
I got the reply that indeed there was an error in the program skeleton but it was put there on purpose and one of the objectives of the exercise was to see if we (students) would spot it and correct it.
There was no mention of this in the question text. The exact wording of the question text was "complete the program below so that it performs the desired function".
Now the professor wants me to apologize because my comment implied that there was carelessness on their part. I am not convinced about their answer, and worse, even if I were convinced, I believe deliberately misleading the student to be worse than simply being careless. I cannot give an honest apology. What should I reply, if anything?

Comments are not for extended discussion; this conversation has been moved to chat.

Nothing to worry about. I doubt this will impact your final grade too much.

To me, this is such a non-issue that it doesn't warrant much of a response. So let me add a response :)

I didn't mean to imply carelessness, and I am sorry if that's how my email came across. I was a bit overzealous in my email. I will address the errors in the skeleton program in my solution, as you have indicated. Thank you for your detailed response!

I think you should take this (very minor) “incident” as a learning experience about how people might perceive your communications. Professors are people; they sometimes make mistakes, they sometimes make pedagogical choices that students don't agree with, and they all take criticism differently.

Much better answer than the most upvoted one. Communicates no ill-will without backing down. +1

I was recently in a bit similar situation as OP, except I have pointed out what I considered to be a mistake when grading, but the person who was grading also perceived my email as patronizing. The road I took was to write a reply similar to this one, and this took me back onto good grounds with them.

"and they all take criticism differently." Yes, and this answer does a good job of addressing a part of this question that I haven't seen discussed yet - how is this apology being requested? From a professional point of view, it seems petty to demand an apology unless the email was explicitly condescending. This was a misunderstanding, and the issue should be considered resolved on both ends after the initial reply...but people do take criticism differently, and if the professor continues to push for an apology after a response like this one, I'd be worried about more than programming errors.

The prof demanding an apology is unwise. If indeed OP was rude, either they realise it themselves, and apology would be forthcoming, or they insist on being right in taking the tone they did, and are beyond redemption. If OP didn't intend to be rude, it would be good for them to indicate that this was the case and a misunderstanding - but it seems OP doesn't want to do that either. The interaction between the two protagonists in this matter is all but impressive, but it would be nice if it were at least a matter of the OP giving respect to the role of the prof if not to the person.

I'd also add that this is a lesson in real world power politics. Professor > student. It doesn't matter who's right if you don't have the power to push your narrative.

From this incident, I like to remind me that (1) Disregarding whether you are right or wrong, this benefits no one. (from the answer of user3644640) (2)Do NOT Email Much. Email Do Not Have Emotion. You write it in one tone, the recipient will receive it in another tone

A 5-paragraph email with citations for a possible mistake in an undergraduate exercise sounds, if anything, patronizing.
Apologize and move on.

Comments are not for extended discussion; this conversation has been moved to chat.

I wonder a bit whether the OP should say "I apologize for assuming you might ever err as mere humans do" or "I apologize for doing extensive research to confirm that what looks like an error on first sight is actually an error before daring to ask for clarification" ...

@HagenvonEitzen this is likely to greatly offend the professor, and possibly damage the OP's future prospects in this class

@HagenvonEitzen Please note that all this has been extensively discussed in the comments now moved to chat, as notified by the moderator. Comments cannot be moved to chat a second time, and further comments that repeat the same arguments will be likely deleted.

Now the professor wants me to apologize [...] I cannot give an honest apology. What should I reply, if anything?

If you cannot give an honest apology, I suggest giving a dishonest one. This will satisfy the professor's requirement (you do not mention him insisting that your apology be sincere :-)), and, while I am one of the biggest fans of honesty that you will find, it seems to me that both you and the professor have backed yourselves into corners by each thinking that you are behaving reasonably and the other is not, and expecting the world to conform to that belief. Regardless of who is right -- I have no opinion about that, and don't find the discussion on this question to be very interesting, frankly -- your insistence is leading both of you to be stuck in a rather unpleasant infinite loop. It is in your best interests to break the loop, and the only way to do that is by apologizing. Is it just? Maybe not, but there are much worse injustices that actually affect people's lives happening all the time, so I suggest saving your time, energy and outrage for those. Good luck!

-1 Indeed, you have to choose your battles wisely and not fuss over every little thing.

The apology might be appropriate for the tone, rather than the content. One reason why I never ask for apologies is that the ones who would give it, give it anyway freely without being prompted, and the others, in my experience, do not even consider the possibility of themselves being wrong and so any apology, if at all, would be worthless. Vice versa, I believe that an apology should be full, complete and without hidden reservations. A reservation separating form from content is fine. But I am not a fan of dishonesty in that matter.

@CaptainEmacs it's very noble of you to not ask for apologies, but OP's professor has not been as noble, and is essentially coercing OP to apologize. So I think an insincere apology is the most reasonable option here (assuming OP can't muster a sincere one). Again, although I'm a huge fan of honesty myself, the apology would be nothing more than a small white lie over a completely trivial matter. The alternative of insisting on not apologizing may be more honorable in some idealistic sense but ultimately a huge risk and waste of time and energy. It's simply not worth it.

@DanRomik I am afraid that, from a practical point, you are probably right here; although I sense that OP may not want to concede this point (and I sympathise with that - with the apology having to be honest, not with OP's statement with which I probably - extrapolating the details - would be at odds), and the prof might see through it, anyway.

I am surprised some deem this student's actions as "patronizing". I think a detailed e-mail with evidence that the student tried to consult other resources before contacting the professor could just as easily be interpreted as "studious" and "respectful" of the professor's time. I would have appreciated the student not contacting me - in the way many undergraduate students do - with vague and lazy questions about the homework that make me wonder if they even tried! By including citations, the student is showing a mature approach to solving the problem by means of consulting course-related material.
We must remember that tone makes a difference - and that tone is often lost in e-mails. I would recommend for the student to meet with the professor and exchange information in a respectful tone. This might allow the student determine whether they missed certain information about course assignments, and might allow the professor to better understand the perspective of the student in their motivation to clarify the problem statement. Of course, this recommendation is much easier said than done, especially because the professor went so far as to request an apology in such a preemptive and biased manner without even bothering to meet with the student in person first to ensure they fully assessed the situation.

Welcome to the site. Please bear in mind that we're a question and answer site, not a discussion forum. I don't see anything in your post that attempts to answer the question at the top of the page; rather, it just seems to be a general discussion of the situation and the other responders' answers.

Also, note that nobody said that this was patronising but just that it sounds or could be perceived as patronising.

How is it the newcomer gives a better answer than several long-timers who answered before?

@DavidRicherby Thank you. The OP asked how to reply. I suggested to speak in person with the professor to avoid piling on any misunderstood tones in future e-mails. I may have missed it, but I didn't think another responder had suggested that.

@Wrzlprmft As commented by a responder: "Based on numerous similar interactions with undergrads, I would bet good money that the mail indeed was, or could easily be perceived as, patronizing. Apologising, in that case, means taking the smart high road"

Having seen sample code in books by "respected authorities" that I could see would not compile, if I were teaching such a class, I would intentionally include such errors. If a student sent me an short "is the value of ___ in line ___ intentional?" I would respond "yes, finding and fixing it was part of the lesson.  Don't deprive your classmates of that opportunity."  But if I received five paragraphs lecturing me on the allowed range and on how to teach, I would try to figure out the nicest way to teach a little humility.

@ZeroTheHero: sorry to hear that they think that way, because I suspect my field isn't the only one where garbage gets past reviewers and into print.  I wouldn't do it until I thought they had learned enough to handle it, and after the first time, I would tell them why.

Cannot upvote. If I first had to deal with a 5-paragraph student email, which was then followed by needing to schedule time in person to talk about it, I would be even more irritated.

@Zerothehero There are some lessons you can't teach properly if you warn students first.  In this case, you teach them that you can't blindly assume everything provided will work perfectly.  It's nice when it does, but it's also realistic that sometimes there are errors.  This lesson holds equally well regardless of the professors intention.  If he made a mistake it just proves how easy it is to make small mistakes.

@WGroleau “lecturing me on the allowed range and on how to teach” You are interpreting the question under a strong bias: that OP wanted to "lecture how to teach". The question doesn't say that. It says the email was documenting the fact that OP researched before daring to state the teacher has put an error in the code. Also, OP documented the fact that he double checked before wasting a professor's time.

@WGroleau " But if I received five paragraphs lecturing me on the allowed range and on how to teach, I would try to figure out the nicest way to teach a little humility."  Not supported by OP's description, nowhere was OP talking about "how to teach".

@Daniel R. Collins " If I first had to deal with a 5-paragraph student email, which was then followed by needing to schedule time in person to talk about it, I would be even more irritated."  Maybe you shouldn't be a teacher?  Students have questions, and it is literally a teacher's job to answer those questions.  If you get irritated at having to do your job, maybe that isn't the right job for you.

@AndreaLazzarotto I disagree, quoting from the textbook (as the student says) is not documenting that the student researched on the subject. Quoting from the textbook is implying that the teacher doesn't know material he should be teaching.

@NickS, compare these two messages. A) "I checked the literature but found that you did a mistake" B) "I checked the literature but I think it says something different from the provided code, in fact page 5 of Yada, Y says ' yada yada yada' so I believe there is an error in the code".

@AndreaLazzarotto What about " I think that there is a mistake or typo in problem X, can you double check?" .... As for option B, if Yada Yada is the textbook, as the OP seems to say, and one of my students send me that message, I would definitely wonder why he feels he needs to quote material I am teaching....Many instructors will find that condescending.

@NickS probably because you are unlikely to recall every sentence in the book by heart, I guess. Also, the fact a book is the textbook doesn't mean you are basing every lecture on it and only on it.

@AndreaLazzarotto For every class I am teaching (I am teaching mathematics, and this is probably true for most of the science classes) there is nothing in the textbook which I don't know. And the phrasing of a certain result is irrelevant. I can see how this could be different in arts, but for undergraduate mathematics classes, if a student thinks I don't know something from the textbook, especially stuff which is tested in assignments, that is insulting.

@NickS English is not my native language so I might not be very clear, but what I wanted to say is that recalling something immediately and knowing something are not always the same thing. I am not doubting what you know or your ability to teach. But I can tell you that when I was a student I was often asked "what page/section/formula are you referring to?" when asking clarification or suggesting there was an error somewhere. FWIW I studied computer science.

To crystallize

finally commenting that it seems surprising that this error would make it to the question text

Never do this. You are either rubbing salt to the wounds (in case you are right) or being an idiot (in case you are wrong). Disregarding whether you are right or wrong, this benefits no one.
EDIT: The point is that there is no way: "I am shocked, how could you do a mistake this bad", is not going to offend.

"Never do this" - unless you want to pick a fight with them...

@einpoklum exactly my point. The person feeling insulted is in this case a tautology. Driving a person to corner is the best way to start a fight.

+1 and as a former student, TA and Teacher experience says that 95%+ if you're the student you're being an idiot. Sure you get super bright students and sure you get stuffy, full of themselves professors who can't admit making a mistake, but if I had to bet I'd go for the professor being right every time. (Though insisting on an apology seems petty even if the professor is 100% in the right. I mean it's just a student being a know-it-all shrug and move on.)

@DRF "Though insisting on an apology seems petty even if the professor is 100% in the right."  How is the professor in the right in this case?  There was an error in the assignment.  A confused student wrote to their teacher asking about the error, and the student had the decency to do their research and double check their work first.  How does that justify the teacher's response?

@industry7 I did say if. The student (and we only have his account of the facts) says he spent 5 paragraphs "explaining in detail why the program would not run and citing a textbook" and he finished the email up by "commenting that it seems surprising that this error would make it to the question text". 5 paragraphs for an error that results in a "does not compile" is (likely) to be at least perceived as patronizing. If you then finish up by what amounts to "looks like you're doing a shitty job" and your reaction to "This was intentional apologize" is "No way I'm right!" then... yeah.

@industry7 I would not go to whether OP is right or wrong. The point is that there is no way: "I am shocked, how could you do a mistake this bad", is not going to offend. The explaining only magnifies the effect. An offended person will not take those 5 paragraphs as: "I understand this error, and this is how it happens" The interpretation will be more like: "See, this is what happens in this program, ha-ve you un-der-stood" As if a professor would not actually get it from a you are using a value out of range.

Great answer and to the point. The student is fine in insisting that a question/solution is wrong (if it is; for a simple mistake, without an counterargument by the prof, a 5 paragraph mail is total overkill). They can only speculate about the prof's intention of introducing (or not) an error and cannot know it for sure. And insinuating that the prof is lying adds another layer to the offence.

I actually remembered a time similar to this case when I was a TA, and an extremely arrogant business student contacted me by email: "I have not gotten full points. I have done all the necessary steps. Or is it really that I have done something wrong?" And Indeed he had done a grave mistake I had warned them not to do. Because of that last sentence it took me a lot of time to invent something political to answer.

Apologize sincerely to the professor.
As you have pointed out at apparently tedious length, students attempting to assemble the skeleton would have found an assembly error.  Even if the student first modified the skeleton, the error should have been revealed by the assembler.  At that point, it is incumbent upon each student to correct that error.  The student did not even have to know how to detect the error, only how to correct it once it was identified.

Not if one uses the skeleton to make an assumption about the permitted range of immediates and then writes the rest of the of the program based on that assumption. Then there are 20 errors to correct by the time the error is discovered. It is usual to use existing code to lookup the syntax for new code, much faster. Please don't say I need to learn to the permitted range of immediates by heart unless you can e.g. give me the value of C's MAX_INT without looking it up.

@BobBrown Do you know assembly language and how an programming error there is (according to you) "revealed by the assembler" ?

@denormal "It is usual to use existing code to lookup the syntax for new code" The computing world is full of self-styled "programmers" whose knowledge barely extends beyond how to use Ctrl-C and Ctrl-V. (And the comment about MAX_INT is quite revealing about how much you really know, as compared with what you think you know.)

@ThorstenS. Yes, I do know assembly language and wrote the (very short) book we used to teach assembly language for many years.  OP's description of the error was an immediate constant greater than allowed, i.e. for which there aren't enough bits in the instruction word.  Any reasonable assembler would produce a message like "Max size of immediate constant is XXX."  The only way the student could present such a message is to have changed the constant to something less than the maximum before the first attempt at assembly.

@denormal Allow me to make an assumption and assume that maxima and minima for various values were covered in class or assigned reading prior to this assignment.  INT_MAX is defined in limits.h and can vary depending on compiler and architecture.  A guess without knowing the environment is 2^31-1, or a little more than two billion.  A competant assembly language programmer should understand twos complement and recognize a number greater than two billion as being "near enough" to the limit to check.  It should not be necessary to memorize 2,147,483,647.

I suposse this teacher will grade with 10 an answer like "it is not possible to complete this program to reach the requeriments because ..."

@BobBrown What reasonable assembler are you using ?

@ThorstenS. I pick the one OP was assigned to use, and let him post the message.  He's told us the skeleton will not assemble.

@alephzero It was just an example for the purpose of communication, based on the (apparently false) premise it will be read in good will. I am perfectly well-aware that that the value of MAX_INT depends on the architecture. Please do no assume my level of expertise, I have in fact been congratulated by another professor for "going far beyond what the course demanded of me" in writing a complete compiler (all 5 stages on my own) for a high-level language. The Dragon Book is my favorite book and I have read it back-to-end in both the 2nd and recent 3rd edition.

@alephzero I do not "know" compilers, I understand them. It's sad I have to say all this just be recognized as a legitimate speaker by you.

@alephzero Regarding the comment about "self-styled programmers", please keep in mind that the world's best C compiler, GCC, is written be a group of enthusiasts, who take pride in being enthusiasts.

I do not see the relation among apologizing, your follow-up answer, and the question itself.

@denormal: Most of them are also professionals, and among the world's best, at that.

Summary

"YES" to:

Apologize. Life is rarely about absolutes; it's about grey area which requires compromise. There are many facets to examine here, but the main issue is not a technical one; it is interpersonal. If someone says that they are insulted, then they are insulted. Deal with that separately from the technical issue that precipitated the rest of it.
Take a step back and reflect on the situation as a whole, to learn as much as you can as this is a golden opportunity to learn about a lot more than just coding. What was your ultimate goal when you wrote your email? Merely to point out the mistake? To get to the bottom of why the mistake was there? How important is it to know the ultimate truth of why the mistake was there? Was your communication (e.g. wording, tone, content, etc) relevant to that goal? How would you feel if someone pointed out a mistake you made in coding by saying, "You've been coding for years. How could you make such a simple mistake?". What's more important: having a good working relationship with the professor, or being "right"? Would you have sent that exact same email to a manager, or would you feel that tone might reflect negatively on your next review?

"NO" to:

Continuing this conversation with the professor over email. Terse, written communication provided an environment that lends itself to easy misinterpretation, so while it is possible to fix things over email, you will stand a much better chance of fixing the issue by actually speaking to the person. Besides, speaking with someone is more personal and hence reflects a more genuine attempt at resolution.
Viewing the assignment as either a mistake or deception. There are always angles that we do not consider, which is why communication is vital to success (for pretty much any interaction with other people, whether it be professional, friendly, romantic, etc). Hence, asking, "Was this error in the given code part of the assignment?" allows the professor to say either, "No, actually it was a mistake that I didn't catch because I made a change late at night and didn't have time to test. Thanks for mentioning it and I will get a corrected version out to everyone ASAP", or, "Yes, the goal is for each student to identify it and fix it, and it is even more promising when a student inquires about it rather than just assuming the intention as there could be something else going on. Good job!". You still have the opportunity to assess that response and trust it or think they are lying, but they will be less likely to view you as yet one more person making their job harder when it was just as easy to be helpful.

{ sorry if this is a bit long, but there are several nuances to go over here }
Sometimes a test or exercise in one area leads to learning lessons in one or more other areas. This seems to be one of those moments.

I sent an email to the professor's address for "questions and clarifications" regarding the exercise

Communication is difficult enough when speaking with the other person, and written communication is even harder. Without tone-of-voice, facial expressions, body language, etc it is very easy for a simple message to be taken as rude. No matter how much effort you put into the crafting of the words in a written communication, you can't control how the reader hears it in their head.
It is possible that the exact same words you put into the email, had they been spoken by you either in person or over the phone, would have been received differently. Either way, even if you can't understand how someone would take those words offensively, often enough it just happens. And it will happen again.

explaining in detail (about 5 paragraphs) and citing a textbook, why the skeleton program would not compile (assemble)

If the skeleton program (as given) would not compile, and if it was stated (or implied) that it should, then does it really take 5 paragraphs to explain it? A few sentences to state that it does not and a general sense of why is all that it would take, right? Assuming it is a simple mistake, the professor would understand without needing to explain the theory behind it. And if it wasn't a mistake, if it was part of the intent of the exercise, then you would have shown a firm enough understanding of the issue so as to not be sending a lazy "why doesn't it work?" email. If the professor asks for more detail or how you figured it out, then by all means do the 5 paragraphs with citations.

and finally commenting that it seems surprising that this error would make it to the question text, since simply running the assembler on the skeleton program would reveal it.

Stop for a moment and think about what you just stated: it was surprising that such an error made it into the question, because it was simply a matter of trying to assemble it. Now, everyone makes mistakes. And perhaps this assignment was thrown together hastily because one or more things took up the time that the professor had to create it (yes, they do have lives outside of where they teach) and there was no time to test. Or, perhaps the professor has been teaching for years and has used this exercise before. With it being so simple to discover, I would give the professor the benefit of the doubt that this was intentional.

I got the reply that indeed there was an error in the program skeleton but it was put there on purpose and one of the objectives of the exercise was to see if we (students) would spot it and correct it. ... There was no mention of this in the question text.

If part of the purpose of the exercise was to see if students can spot the problem, then why does it need to be mentioned in the directions? I understand that it sometimes is mentioned in textbooks, but the fact that it has been mentioned up front before doesn't imply that it will always be that way. And in fact, outside of textbook exercises, you will rarely, if ever, be told up front that a problem exists. It makes sense enough for a textbook to mention it because you cannot ask the book any questions (well, you can, but you will likely be ignored ;-) so it would almost certainly appear as a printing error. But professors are a bit more interactive, and so should not be expected to be constrained in the same manner as a textbook.
Side note: please get used to a) not being told upfront of there being any problems, even if it is reasonable to expect that there aren't any, and b) things in the current situation working differently than they ever have previously, before attempting children (especially more than 1) ;-).

I believe deliberately misleading the student to be worse than simply being careless.

Seriously? Why? Do you think that life somehow works any differently? You mention in a comment on the question that you have been in the workforce for 4 years now and have never been given non-working code. Well, congrats! But, all that really shows is that you haven't worked long enough, or at enough places, to have inherited truly bad code. Stick around long enough and you will. And usually, it is not as simple as "not compiling". Usually, the non-working code you will inherit will work, but not exactly correctly. It might make bad assumptions and miscalculate something, or work correctly sometimes but under certain conditions do something that you will swear could never be attempted by anyone who even just passed 2 programming classes but never graduated. Bad code is everywhere. Personally, I have more respect for the professor assuming that this was intentional, because it is more reflective of reality.
Besides, there are three non-technical lessons here:

The mistakes being made aren't always in the code being given. I have found that mistakes often enter in the initial meetings and requirements gathering. Sometimes a Product Owner / Product Manager / etc making a request for functionality doesn't understand all of the intricacies of the system, or sometimes doesn't know how certain technology works and attempts to misapply it, or any other of a myriad of ways that bad assumptions get introduced. And the sooner problems are detected the easier they are to fix (or work around, if need be). And being able to identify when you are being told in a meeting to do something that won't work (assuming that you can also propose a solution), makes for a more valuable employee than someone who is just great at coding.
Many people spot mistakes but are too afraid to say anything for fear of being wrong (that they misunderstood the code) or due to not wanting to come across as "negative". And sadly, sometimes people do get dinged on reviews for pointing out when things won't work since managers are also humans who make mistakes. But being an effective member of a team requires confidence and knowing how to identify when something is wrong (hint: make sure to have a proposed solution).
Not everyone reads directions. Given how simple it was to find that the code wouldn't compile (i.e. just attempt to compile it), you would think that everyone would find the problem, right? I am willing to bet that there are some students who turn in code that includes the original error (because they never tried to compile it), or who turn in a "correct" version but don't know that it didn't originally compile because they simply copied from someone else who failed to mention that part. The professor can learn a lot about his/her students via such an exercise, while also teaching more than mere coding.

Now the professor wants me to apologize because my comment implied that there was carelessness on their part.

Yes, your comment certainly did imply that, quite heavily. And, while it does seem as though the professor shouldn't be demanding an apology -- do they really care what you think?, and are you the first student to say something "inappropriate" to them? -- the simple fact is that they are asking for one. Two lessons here:

You can't control the reactions of others to you, nor will you always understand their reactions (and it goes both ways!). You don't know what else is going on this person's life, maybe a lot of stress, maybe you phrased something in just the right way to trigger an emotion in them, maybe they are just "thin skinned", or who knows. What you do know is that you have upset someone that you have a working relationship with, and you need to make it right, even if they mistook the tone or intent of your message.
Pick your battles. You don't always need to be "right" in every situation. It is far better to give a "dishonest" apology than to continue a petty feud. And if your tone did insult them, then you can't say that you are correct because you did not intend for the email to be taken that way. You don't have to apologize for pointing out the mistake. You mainly need to apologize for making this person feel bad. And even if you (or anyone else) roll your eyes at saying sorry for insulting them, just consider how you want people to treat you: if you were insulted by someone and no matter how much you explain why they just don't understand, do you want them walking off saying, "well, I didn't say anything wrong so you shouldn't be feeling hurt" or would you prefer they just accept that you were insulted and they just acknowledge that they did it (even if they don't understand how) and that they didn't intend it.

What this all comes down to is:

Yes, you should apologize for insulting them, and explain that you really did not mean to.
This can only be done either over the phone or in person. Do not send another email, unless it is to simply say, "I'm sorry for insulting you. Can we please discuss this over the phone, after class, or during your office hours?". Office hour would be preferred since it is in person and can be a little more private than after class.
Take this opportunity to reflect on how you would handle being tasked by a Product Manager or Manager to do something that won't work (or at least shouldn't be done in the manner requested). They won't be giving you a "test" to see if you will correct them. They might seriously be asking you to do something that will adversely affect the system (i.e. customers) or at least profits (e.g. a horribly inefficient process and/or one requiring additional hardware, etc). It is your job (well, everyone's job really) to identify the issue, raise the concern, and engage the requester and the rest of the team on how to solve it. Are you going to say, in a meeting with everyone, that the P.M. or manager should have realized what they were asking for because they had been there for years? Everyone notices how everyone else presents their ideas, especially if they are condescending about it. You generally don't ever need to ask someone how they can make such a silly mistake, because you are really just telling them that they are stupid and you are smart.

"Take this opportunity to reflect on how you would handle being tasked by a Product Manager or Manager to do something that won't work" - Yes I would expect something like the OP's email in this case.  If your manager wants the impossible,  you can't just say "Well I'm not sure if we can do this, or you sure this is what you want?"  You have to give an actual well reasoned explanation for why your managers idea won't work.  Doing so leads to the possibility of finding a solution that can work.

One thing I disagree about this answer (and others) is the believability of the "intentional error" claim. Re: "If part of the purpose of the exercise was to see if students can spot the problem, then why on earth would that be mentioned in the directions? That is an unfair (and unrealistic) expectation on your part." This is in fact a common direction in many textbooks; e,g., Gaddis, Starting Out With C++ (7E), at the end of every chapter: "Find the Errors. Each of the following programs has some errors. Locate as many as you can..."

@DanielR.Collins I have updated my answer to clarify what I was meaning. While it may have been unfair of me to ask "why on earth would you expect that it be mentioned in the directions?", since text books mentioning it up front does allow for such an expectation, my overall point still stands that the fact that text books do mention it up front doesn't necessitate that it always be mentioned up front in all situations. That is an unrealistic expectation.

It's clear you put a lot of thought into this answer, but I downvoted it for simply being too long. Sometimes less is more.

@DanRomik I am aware of it being long, which is why I stated as much at the very top and included a summary (i.e. the TL; DR section). Nobody has to read the entire thing. If it seems too long, then just read the top TL;DR section, above the line, which is certainly a reasonable length. But the details below the line cover things that by all means should be covered; sometimes brevity, while convenient, ignores important details. And "the devil is in the details". Also, I adjusted where the top line was placed to be less confusing. Still, I appreciate you stating your reason here.

@srutzky sorry, your TLDR section is also (ironically) too long. Just my humble opinion, of course... Anyway, looking forward to reading your future answers.

The Get It Done Guy has some great tips about writing email. Before you send it, read it in the most sarcastic snarky tone of voice possible. If you can read it that way without it sounding like you're giving offense, congrats! You may now send the email. Otherwise, don't send the email.

Except for the part on apologizing, I agree with this answer. There's zero need to apologize.

@Dan Romik LOL!!!  Agreed, if you think the OP is wrong, "does it really take ..." a giant wall of text "... to explain it? A few sentences to state that it does not and a general sense of why is all that it would take, right?"  Down-voted.  Also, you should clearly apologize to the OP!!!!

For the problem itself: Are you 100% sure that the program cannot be run? I am a bit rusty for x86 assembly, but often very old programs are still used in exercise und if you are not careful and run them in compatibility mode (simulating old processors in 16/32-bit protected mode), the increased pointer and operand size moves instructions out of range or leads to access violations.
Now to the reply. It is really hard to advise on that because we don't know the exact mail exchange, the tone you have used and how the professor ticks.
So I recommend that you read out the e-mail exchange to one of your friends / acquaintances whom you can trust and who is socially adept. Ask him how your mail sounds if he/she were the recipient. If the face grows longer and longer, I would strongly advise to apologize. If on the other hand your acquaintance does not find anything offensive apart from exposing an error, it is most likely an embarassed professor who feels exposed.
In both cases ask what parts could be considered inquisitive and refer to them in your answer apologetically. There are some formats which look like apologies which allow both parties to save face.

I am sorry if I have offended you/this mail comes off offensive...(This does not imply that your mail was incorrect or even intersubjectively offensive. But it allows the conclusion that the professor was offended and the reason for that may be out of your reach).
If it was your intention that we find this error, I am sorry....(Yes, if. Couple the apology on a fact which you believe is false and the professor believes/pretends to be true).

Read the answer e-mail to your acquaintance, correct it to his/her suggestions and send it back.

Ugh. In my assembly class, the number of times the instructor picked invalid indexing registers on the board was pretty bad. x86 16 bit has a lot of gotcha rules if you aren't really careful.

The OP never said it was x86.  Since x86 can take immediate values the size of the register, I’m thinking it’s not.

@JDługosz Correct, but what else is available now? Sun and Motorola are essentially dead, PowerPC was even given up by Mac. I also interpreted "immediate" not only as argument, but also as possible displacement of a pointer.

Well, I studied IBM 360/370 assembler even though it was already a museum piece. There’s numerous microcontrollers (where writing asm is really relevent!), various virtual machines like Java, and an “open” microarchitecture (I can’t recall the name) that is indeed subject to this issue, as the number of bits in the instruction for immediate values is less than the word size.

@JDługosz Whoa, and I thought I am already old :o). Given that the OP did an undergraduate exercise and compiled the assembly code, I am quite confident that it must be an x86; I don't think it probable that his group (he said "base our solution on")  would have access to another processor or assembler. So no microcontroller and Java bytecode has no displacement. If I could, I would bet some money that it is a x86.

@ThorstenS. There are virtual CPUs not just for things like Java, and microcontroller development, but expressly for teaching both machine language and systems programming like writing a linker.  I had to go to a lab to assemble my 360 code; a couple years later my friend was able to run an emulator on his ’386 desktop PC.  You don’t want a student’s PC with differences from the exemplar but a perfect (simplified) system that continues to match the textbook even as PCs evolve.  So don’t presume it’s native to his own PC or even using his own.

@ThorstenS. It also might well be (one of the incantations of) ARM assembly language.

Even if I thought I had done nothing wrong, I would be okay with writing something like "I'm sorry I've offended you", since it just means "I'm sorry about offending", which doesn't seem to have been your intent.
This will usually be the smart move, and actually cost you nothing, so you have little to lose from it.
Usually, it is a sensible strategy to apologise when you have given offense without meaning to, even if you don't think you're in the wrong. It doesn't mean you did something wrong, it just means you're sorry about the fact that there has been any offense. If I step on someone's toes, I'll apologise, even if the other guy's toes shouldn't have been there in the first place.

Comments are not for extended discussion; this conversation has been moved to chat.

The professor goofed by providing broken code while implying that it was to be used without modification1, and then you made matters worse by trying to educate the professor on something he already knows, when the most likely cause isn't that the professor doesn't know what he's doing, it's that the bulk of his energy goes into his area of interest which does not include your undergraduate class.
So step back from all the things that went wrong, and focus on what you need.  Here's the reply I recommend writing.

Thank you for clarifying that I should have modified the provided code as necessary.
In other classes, the skeleton code provided for an assignment has defined an interface to which the solution must adhere; changing the code is not permitted because the interface is no longer compatible.
In this class, how may I know when a partial program code provided in the assignment forms a mandatory interface and must be used verbatim in the solution, and when I am allowed to improve it?  Is adaptation of skeleton allowed for all assignments in this class?

A reasonable professor will make an announcement to the class that there is no requirement to use the partial code as-is. If the professor persists in demanding an apology after the miscommunication is explained, then you know he's only interested in feeding his ego.
It has a side effect of closing any loophole allowing the professor to retroactively pretend that mistakes were intentional, if you suspected that was what happened here.

1 Having students find and fix unannounced errors is a useful and acceptable teaching tool, but the instructions need to clearly indicate that modification of the provided code is permitted, because the norm in computer science classes is that it is not.

Unfortunately for OP, s/he does not seem to be dealing with a reasonable professor.

@einpoklum The politic thing to do is almost always to behave as if the professor is reasonable, even in the face of compelling evidence that they aren't.

Tact, is the art of making a point without making an enemy - Sir Isaac
  Newton

Let us examine your choices:
1) Your professor made a mistake and can not admit it, he is a jerk.
Unlikely, but not impossible.
Best response: Apologize, you never, ever, want to antagonize a jerk who has power over you. You can not win this fight. Apologize and mean it.
2) Your professor is being honest with you and you have hurt his feelings with your accusations.
More likely.
Best response: Apologize and mean it.
Same decision for both possibilities, do it.
A bit of clarification on "and mean it." Emotions are the key to life. You must always ask, what is the other person feeling. Feelings, that is what motivates human beings. Calm down and really feel with your heart that you have made a mistake. Now, the correct words for your response will flow naturally. No one can find insincerity where it does not exist. Good luck.

Despite how large egos are in academe, they are very fragile.  Pointing out a professor's mistake can be taken in a variety of ways.  The tone, and even completeness of your explanation, could be considered offensive.
I will say that the professor's explanation was pretty poor -stating the question was designed that way is a bit odd when the questions does not suggest troubleshooting in the answer.  To me, this suggests you hurt the professors feelings while they simultaneously try to convince you there was no mistake.  Denial is a common human response.  Likewise, a demand for an apology suggests your inquiry damaged their ego more than it should have.
I would evaluate the tone of your inquiry, and base your apology off of the presence of some imprudent remark.  That said, if you were polite in your inquiry, I would not apologize.  Just remember that professors are masters of your grade in their course.  Based on what you said, retaliation from someone of such fragile disposition could occur.

If you believe the Professor has misled students by providing the incorrect program, and that several, or many, of them got lower grades because this prevented them from properly solving the exercise, you should perhaps turn to your student association, or more specifically to your faculty representatives within the student union, to bring this up. More useful to do this with at one or two people who actually suffered because of it.
If that's what you're planning, you need to be extremely careful in what you say or write the Professor. It would probably be a good idea to give the semi-honest apology about your tone and your not meaning to offend, which other answers here suggest - but don't walk back your actual claims or legitimize what had happened.
By the way, do you know if that professor has a reputation for mistreating students? Try asking around with people who took his/her courses earlier. It's often a repeating pattern.
At any rate, if you move this from an individual altercation to some form of organized action, that would prevent your being exposed to hostile retaliation on the professor's part and will increase the chance of him/her having to answer for his apparent sloppy work and refusal to apologize/clarify.
All this assumes, of course, that you were actually right about the facts and the context - something which is hard to judge by the description from your side only.

This is a great advice for how to have an extremely difficult academic career followed by an even more difficult professional career.

@CareyGregory: (1) It's the right thing to do; it serves the public good; it's rewarding; and letting wrongs stand is something worse to regret than having not taken it easy. (2) If the academic career is limited to undergraduate studies, it is not likely to be difficult; grudges get repaid easily when you're in grad school and depend on the university more (speaking from experience of course). (cont...)

(3) If OP does not try to "spearhead" this struggle him/herself, then for sure it'll not be hard for him/her. Although in that case it's quite possible that the student union will not press the issue enoguh. After all, it's probably not the first time this professor has acted this way, and nobody's warned people about him/her.

You've convicted the professor with no evidence and no trial. As I said, this is a great recipe for a difficult career. Maybe you should re-read your own last paragraph again.

@CareyGregory: I had assumed your comment was also making the same assumption. Perhaps you're suggesting I move that paragraph upwards and emphasize more how it might not be the case?

Starting with the assumption the professor is honest and well meaning would be my advice, yes. Only when there is convincing evidence he's not would your answer apply.

@CareyGregory: OP gave evidence which would be convincing if corroborated.

Don't apologize. Don't be surprised though when he nitpicks your projects, and don't be surprised when your A-quality term project gets graded a B-. Your dilemma is so common in the industry. You can be right. Or you can get promoted. Choice is yours.

And they should not be surprised when their superior programming skills turns out to be at a mediocre level because rather than using knowledge that other impart (or attempt to impart) at the best possible level, they insist on being not only right in the matter but also in the other person's intention. I found that the most self-confident students are in most danger of being mediocre ones, and some of the most self-conscious are driving themselves to the highest levels.

@CaptainEmacs is your comment a trial to the OP? It seems that the student tried to use knowledge provided by the textbook authors (which probably know stuff) to figure out what he could and couldn't do with the opcodes. If this is being mediocre the world might be better than expected.

@AndreaLazzarotto No, it's a general statement. I had incredibly self-critical students, who despite being told they are doing well, kept feeling that they did inferior work and pushed themselves very high. And I had these students with high opinion of themselves and dismissing other people's work - some rare of them were right (in that their work was superior), but, by far the most had an inflated opinion of themselves. In picking out flaws of other's work, better have a good self-judgement. I don't know the OP's level and make no statement how great an achievement his insight would be.

@CaptainEmacs I would be interested in seeing where OP said they have "superior skills" or performed a "great achievement". Otherwise your remark seems to me a little bit OT in this context.

There are a variety of answers here.  I'm adding my own position to provide some straightforward advice.  With the nature of the question, any advice given may be subject to the different dynamics of different people; specific approaches may or may not work out well in different individual circumstances (that involve different people).  That being said, here are the instructions I provide for you to consider acting on.
You must absolutely back down, for your own good.  The professor is in a position of authority over you, and may have some leeway in deciding whether to grade something favorably (whether in this class now, or another class).  You don't benefit from being on the professor's bad side.
Either:

Apologize for taking a stance of being offensive.  By being offensive, I don't necessarily mean that you were personally slandering.  Your "offensive" nature might not have been any more inappropriate than playing an "offensive" role in basketball.  Still, sometimes instructors try to prepare students for industry by making sure that students are used to humbly taking instructions.
or apologize for not doing a better job of communicating in a way that didn't end up being annoying (or worse).
All of us humans can communicate in a way that doesn't end up pleasing everyone.  This is a flaw that seems universal to our species.  If we're very honest about life, then we can feel some degree of sorrow (a.k.a., being "sorry") for unpleasantness we cause, even if the amount of sorrow is slight because we don't feel like we could have done better.  Just be disappointed in the lack of ability to completely pacify everyone, and then you have the basis of an honest apology.

Don't feel like you need to convince the professor that you're suitably reformed and are now a stellar model of what the professor would identify as perfection.  It seems that you burned a bridge, inadvertent as that may have been.  How easy it is to repair the damage, or whether that is even possible, is highly dependent on the professor, and you might not be able to recover fully.  Writing a lengthy apology may do more harm than good.  Keep it short and sweet; three sentences or even one may be sufficient.  Just communicate a posture that that shows you're going through the step of apologizing, and that may be the best that you can do.  (Well, that, and you might want to walk on egg shells for the duration of time that you interact with that professor.  Whether that is needed may depend on just how thoroughly those bridges do end up getting repairs.  Even if you do again appear to be on the person's good side, make sure to never repeat the same action, so that you don't re-offend in the same way.  If you do, any acceptance of your apology will likely be revoked.)
This is coming from a person who got on the wrong side of a department chair within the first 80 minutes of a program.  This was because I tried to dutifully defend a score, and I guess she just deemed me to be adversarial.  She even took me out of the class for a one-on-one chat, which was a first for me.  I was terrified, and remained very cautious throughout the entire program.  It was not pleasant.  Towards the end (maybe my second-to-last-day there), the topic of that early encounter got brought up.  (I think I may have delicately brought it up, asking if she still thought of me as a "troublemaker".  It was a slightly risky thing to do, but I served her well and even did some good for her program, and was genuinely interested in feedback, so I took that risk.)  I even got an acknowledgement of the "misunderstanding" that the department chair had.
I remained pretty stressed throughout the program, but I did end up getting a straight A in every course (thoroughly demonstrating a reversal of prior academic years where I had some different results).  As I could (unpleasantly) handle the stress I endured, the end result was quite worthwhile for me.

While this situation is unpleasant, it's much better to learn how to deal with this now, rather than end up accidentally having it out with the person who writes your performance reviews.
Professors teach, so if you approach resolving this from that angle you'll have a better chance for success.
Go talk to your professor, in person, not to defend your position or to apologize, but to learn.
Something along these lines:

Hi Professor X, can you help me understand how I went wrong in my email to you about the bug I found?
The last thing I wanted was to offend you, and it appears I've failed badly in this respect.
Can you help me understand where I went wrong and any tips or resources that can help me avoid doing this in the future?

It's important to go in with the understanding that, unless you intended to offend your professor, you have messed up.

The Professor may not be approachable enough for even this, and might react angrily again.

@einpoklum if it's that bad, escalation to having the department head mediate is the next step, and also good practice for real life. I've found that admitting you messed up and asking for help takes the wind out of their anger and helps move past wounded pride.

Fair enough. See my answer as well though.

If I wrote "Hi professor" in my country, that would be considered way worse than 5 paragraphs of supposed (but unproved) "patronizing". I think it should be pointed out that the tone of your sample message would work in some countries but totally screw up things in other countries.

Schools, like business, army, most political parties, ... are non-democratic organizations. Thus, your answer (if you write it: an option is let time to pass) must be pragmatic, write what gives the best result to you. Do not start an ethic war, you're going to loss it.
You can "apologize the misunderstood" (that is not the same that apologize your mail). Or, as another answer says "I'm sorry if I've offended you".
If, as theoretical exercise, we analyze the facts exposed in your question:
Could be the teacher has made an error (by example, copy&paste the exercise without any check) and doesn't wants recognize it; could be it is true that the code mistake is voluntary introduced, but start the exercise with "complete the program below ..." instead of "based on the program below ..." is an error: he points students to the wrong path.
Worst, after your mail, teacher is using their status and position to punish the answer and your complain about quality: he is trying to teach obedience instead of criticism. He could simply explain you the facts and why your mail has been incorrect in background and/or form but instead, according what you explained, he is trying to force you to do what you consider near to false and humiliate.
However, again, remember: you are not in a democratic organism. Be pragmatic.

+1 Agreed. We live in the real world, not the ideal world. OP needs to gain some maturity pretty quickly.

@Joe in this case it's called submissiveness, not maturity. But you are right that he needs to gain it quickly.

Personally, I would not respond to a demand like that. My parents never taught me to kowtow.
My sense is that you got yourself into trouble by getting too anal about the assignment. Most textbooks are littered with mistakes. You could spend your life trying to correct all the mistakes in a textbook.
Just get on with it and do your work.

I'm sorry to see this so down-voted.  The answer does start with the word "Personally," indicating that this may be a single person's stance.  Although I may disagree with it, the answer is "useful" in the sense that it provides an opinion, and particularly a different perspective.  We should be voting based on whether an answer is useful, not whether we agree with it.  (Even if it is wrong, the answer may be useful for contemplation/discussion.)

@TOOGAM I am like Prisoner Number 6, a free man trapped in world surrounded by kowtowers... and they downvoted me. The subservient do not like those who are not subservient, sad fact of life.

@TylerDurden I didn't downvote, but if you want some honest feedback, here are a couple of things that make it not a good answer: first, you say you would not apologize, but the only explanation you offer is "my parents never taught me to kowtow", which is an argument from authority and logically invalid. Second, you don't offer any specific, actionable advice for OP about what to do instead of apologizing, except the highly ambiguous "just get on with it". So, subservient or not, I'm afraid your answer is simply not helpful.

@DanRomik My advice was to ignore the professors demand for an apology. I thought that was pretty clear and unambiguous from my answer.

"Never to kowtow" - that smacks like a "just because" going against authority, independently of the merit of the case, with no regard for what may or may not be the facts. Didn't downvote, but I do not like the advice justification, Dan Romik's comment is very apt here. Whatever action one decides to take, should not be just appropriate, but it is a good idea to make sure it is done for the right reasons. So, even if the advice of action may be a perfectly acceptable option, the justification is not really strong.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
What to do when a senior co-author is very disrespectful?
I am a researcher and professional in the social science field, writing a paper in the field of Computer Science together with CS colleagues to be submitted to an interdisciplinary journal, which is in Q1 for all of us.
The authors have the following contributions:

the associate professor (male, last name position in the manuscript, same age as me) chose the technique to be used for the analysis and supervised the work of the PhD student;

the PhD student (female, first name, much younger than me) preprocessed the dataset, made the analysis and the figures (without asking for my opinion, so some of the results came out wrong);

I, the assistant professor, (female, second name) gave suggestions on some aspects of the analysis, the dataset, and the preprocessing, wrote the discussion section commenting on the results, and gave my opinion on their significance for scholars in my field. The idea of analyzing this dataset was mine, as I am the domain expert (although I am not a computer scientist, I publish, review, and organize conferences in this field);

the full professor (male, third name, much older than all of us) is the PhD student's supervisor and only read the paper drafts.

The problem is that the full professor is treating me awfully: he is very disrespectful in his tone and words when communicating with me, and he is rude in his comments on the paragraphs I wrote. He doesn't trust my expert opinion, challenging every word I write (e.g., when I comment on the results, he says he doesn't trust my interpretation and mandates that I add unnecessary explanations). He commented only on the text I wrote in a harsh way and did not say anything about the errors of his PhD student, who made many mistakes.
On the other hand, the PhD student has also been disrespectful to me, ignoring my expert opinion on substantial facts regarding the dataset (she can't assess the content because she is a computer scientist and has no knowledge at all in my field, the dataset is Greek to her), resulting in errors that a reviewer might point out.
The editor-in-chief of the journal is a professor in my field, so I am worried about losing face submitting this article, but on the other hand, if I opt out from the author list, they have no paper because I am the only one who understands the results and I wrote the discussion section.
So far, I did not reply to the full professor's messages and comments because I wanted to preserve the professional relationship. I only defended myself during meetings when he or the PhD student attacked me.
The associate professor has conflict avoidance issues and doesn't stand up for me.
How should I handle the situation? What is the academic etiquette in cases like this? Should I escalate this?
My former supervisor said that I should report the full professor to HR because the way he speaks to me is unacceptable. Would this have consequences against me in the long term?

Could you provide a specific example of "disrespect"? E.g., a personal attack? Rude behaviour? As of now, it seems that the professor doesn't agree with your point of view, assessments and interpretations. This is not disrespectful. If he said "I don't trust your interpretations" that may be disrespectful or not, depending on the context. Did he say he doesn't trust universally all possible interpretations you may bring? Or just this one?

@Dilworth I cannot really give more details but I can tell you that I asked the opinion of other professors and they agree with me. Even the associate professor told me that he behaves like that with a lot of people and that's why he has a lot of enemies in his department. So it's not just me, this guy is problematic.

I don't think it's possible to give an objective answer the question presented without more details of what has been said. The advice this community could give ranges from "just ignore it and move on" to "this is a serious issue to take up with a faculty lead/HR dept." and without any further detail there isn't anything more we can help with.

Comments have been moved to chat; please do not continue the discussion here. Before posting a comment below this one, please review the purposes of comments. Comments that do not request clarification or suggest improvements usually belong as an answer, on [meta], or in [chat]. Comments continuing discussion may be removed.

Wait until you are treated like that by someone that is actually below you in the "pecking order". Yes, that happens, and, trust me, it is not easier to handle by people who are generally polite (esp. in an atmosphere that protects the aggressive against the courteous), even if they nominally have more power.
My advice, take it with some humour (it's not you it's them ;-) some indolence (oh, well), insist only on fixing hard errors that cannot be tolerated (recruit the help of your superior or someone with clout - if you have one - for that), keep tight until you finish the paper and don't work with them again.
Forget about expecting respect from certain people - the lack of respect may be just ignorance, or self-aggrandization, but sometimes it's an explicit strategy to make you malleable.
Right now, you are just trying to prevent blatant scientific errors from entering the paper. That's your mission. Complete it, and get out.

I agree with almost all of this (and +1 for a good answer), but not the part about only fixing errors that cannot be tolerated.  I think that is getting a bit petulant, and letting interpersonal politics interfere with the desire to do the best possible work.  My view is that it is better to revise/amend the paper for anything that would be an improvement to get it in he best form you can.

@Ben Not sure why that would be petulant? The idea is to insist only on absolutely necessary points. The OP complains that the prof engages in sloppy treatment of the analysis. What I was trying to say - maybe I failed - is that OP insist only on the most important matters rather than fight for minor points. Precisely the opposite of politics. I would have recommended 'any improvement', but given that every exchange with the prof seems painful, I intended to suggest one should limit the improvements to essential points. Maybe I misunderstood you; do you wish to elaborate?

Your position is a reasonable one in my view, and perhaps we're proceeding from different readings/emphasis of the question.  I suppose I'm of the view that the quality of work is so important that it is a good idea to push through painful interactions if they could improve the paper.  I see the contrary as petulant because it allows a person's personal hurt feelings to interfere with an objective assessment of what makes their paper better for the reader.  It is akin to punishing the reader for the sins of the co-author.  Notwithstanding this disagreement, I think your position is defensible.

@Ben Now I understand. Sometimes, however, one has to cut one's losses. I personally would prefer to spend intense time on something I can get to top level; and rather that fight for ages for bringing it to mediocre level, I would probably not invest more than needed to make it publishable. A fight needs to be worth the outcome.

Without a lot more specific context it is difficult to judge what you should do. The answer of Captain Emacs seems to be pretty good advice, however.
But let me point out that there is a vast (vast) difference between "This argument is garbage" and "You are garbage for making this argument". The former is merely (very?) impolite and may be an overreaction. The latter is unacceptable.
If it is a matter of the former then the proper course is to provide reasons that the argument is correct. In the latter case it might be necessary to complain to someone who can speak with authority to the offender. And, in the long term, work with others who behave better.
It might even be necessary to provide background materials to the one complaining about your contributions as they may have misconceptions, being from another field. That may or may not make any difference, depending on their general character, of course.
But at least, consider whether they are speaking about the "thing itself" or about you. Not the same thing at all.

He indeed wrote to me messages like "I am tired of your way of working", blaming me for delays his student caused in the first place, and demanding that I do non-paid work  (the PhD student delayed the article until my contract was over, and I had to do her job in the main project. Everyone else in the project complained about her inactivity to the point that we had to file a formal complaint against her to the PI). I told him I am in another project (I won an EU grant) so I could not give priority to this paper anymore and he got mad at me.

I think a direct insult is actually easy to respond to. Far more insidious and difficult to battle are the subtle putdowns.  "I am tired of your way of working" - now, this is ambiguous; it may or may not be an insult, maybe just impatience. It might be that they just have a different style. Do you have a stronger example for a putdown? This remark is something I would probably counter with "I am sorry, but I have to insist on this because [the analysis is incomplete/the case is more complex/etc.]". Maybe however, consider if there is something in the working style you might adapt.

@AkiPhD Hmm, is that Germany, perhaps?

@CaptainEmacs Well, Germans are often perceived as rude, but even to a German "I am tired of your way of working" sounds actually quite offensive. At least to the one German writing these lines...

@HenrikSchumacher To be honest, it was just a wild guess, but I can imagine an old school prof in Germany saying this without a nasty intention, just exasperated (after all, we have only one side of the story here, but understand that I am not saying that the prof is right). Context matters. I have seen much ruder and nastier behaviour behind an apparently polite facade.

Joint research in academia is a bit like dating, except that the first date lasts about a year.  We sometimes try people out, doing joint work with them on an initial project, but then we find that we just aren't compatible and don't work well together.  In general, it is useful to maintain politeness on this first date and "grin and bear it" if the other person has some traits that are annoying.  We work through these difficulties until this initial project is over and then make a resolution not to work with this person again.  In view of this, my recommendation here is multi-faceted:

Since the negative comments, criticism, etc., pertain to the research work and writing (as opposed to being extraneous criticisms unconnected with professional work), I recommend you treat this as valid academic scrutiny of your work and do your best to revise the work to improve it in the face of these criticisms.  With regard to the disrespectful tone, etc., you can "grin and bear it" for now, or push back proportionately if you feel comfortable doing so.  Irrespective of this, assume that the critique of your work by this senior professor is prima facie valid and revise accordingly.  It is possible that the criticisms of your work are unreasonable, but since this professor is more experienced than you, another plausible possibility is that there are things he knows that you don't yet, and if you revise your work to deal with his criticisms then you might improve it.

After you have completed the paper and its revisions, you will need to make a judgment on whether or not to work with this professor again.  From what you have described it is not a good working relationship and you should probably avoid future collaborations.  However, you should still conduct a "retrospective review" of the project and ask yourself some hard questions --- e.g., Was my work and writing improved by the critiques from this professor?  Did I learn anything valuable about research or writing from this process?  In general, were the critiques of my work reasonable responses to previous deficiencies?

There is an aspect of your question which raises a red-flag for me, and it is something for you to think about.  You say that your "expert opinion" is being ignored and that this professor is "challenging every word I write".  Well good for him.  In academia it is good practice for all of us to expect and demand that we can justify what we say with explanation rather than with assertions of expertise/authority.  Likewise, it is good practice to expect that everything we write can be subjected to scrutiny and questioned, and we ought to be able to respond to such questions with explanations and/or revisions.  In general, academics and practitioners who get into the habit of demanding deference to their asserted expertise instead of giving explanations of their reasoning (especially as a way of heading off questions about their work) either are or become incompetent practitioners.  The physicist Ernst Rutherford is attributed as saying that "[a]n alleged scientific discovery has no merit unless it can be explained to a barmaid", so surely you ought to aim to be able to explain your reasoning, work, and word-choices to a senior professor in your field.

I do not know the situation, but were these comments received in email (or writing) or in-person?
Personally, I think I tend to give very direct feedback, no extra 'fluff' in when giving written feedback. It is simply more efficient to write comments which are to the point, e.g. 'grammar' 'spelling', 'makes no sense' etc. than to try to tone it down.
In person, I hope I come across as more friendly.
I remember getting detailed critique as a young researcher, and it felt harsh at first, but looking back, it was very valuable to me.
Getting detailed suggestions on improvements (if constructive) is extremely valuable even though in the moment it feels like an attack.
But one needs to see the difference between 'this sentence is bad' and 'you are bad'.

Receiving harsh comments is not easy to deal with, but I don't think there is anything disrespectful unless the professor makes personal comments. I believe there is an obvious line between providing critical feedback and making statements about someone's abilities.
Example 1:
Harsh Professor (HP hereafter): I think your statements are completely nonsensical. I don't even understand how it's possible to obtain such results. I believe we should rewrite everything from scratch. I am not confident at all about the methodology you are using.
Example 2:
HP: I think you are stupid enough to get such nonsense results. I think you should be fired from your job due to a lack of basic analytic skills.
I believe the difference is quite obvious. Even though the statements in the first example are harsh, there is nothing personal, unlike in Example 2, and there is no personal attack on your personality or skills.
As long as you do not receive remarks similar to Example 2, you can either dismiss them and not work on further projects in the future, or simply communicate to the professor (and their PhD student) that their way of communicating does not align with yours and it affects the progress of the work in question.
In case of receiving comments similar to Example 2, I would have stopped working with those people, regardless of whether the project is promising or not.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Nerves and putting a lot of pressure on myself for meetings and talks with supervisors/professors present
I’m a second year PhD student experiencing a great deal of pressure for meetings and talks when supervisors/other professors are present. I want to find methods for relieving a bit of this tension as the high adrenaline during the meetings now makes me too nervous to actually think straight or so tensed I freeze and don’t contribute anything. Especially when topics related to my own work are discussed, I’m extra tensed as I’m expected to know the answers. When put on the spot I usually don’t. I do want to learn this, as for defending my thesis and during talks at conferences I should be able to think on the spot. Additionally, these meetings drain so much energy without being that useful in this way.
I create this pressure myself and I think the reason for this is twofold:

Performing under pressure and being assertive during talks and meetings are things I find hard and therefore I try to work on this in these meetings. However as the pressure actually prevents me to preform on these points, it causes more frustration, leading to more pressure in the next meeting.

On the other hand, I am very aware of the professors in the room and do not want to come across stupid and I want show what I’m capable of. Some of the (more established) professors can also be quite critical towards students and phd’s and while this can be very useful, sometimes it’s just really derogatory and hurtful, not constructive at all. I think I’m also intimidated by this.

Peers in the same situation do experience this as well but most of them just accept this as it is, I’d really like to do something about it. I discussed it with my supervisor as well, she was very understanding and we agreed that preforming under pressure and being proactive during talks are learning points for me, but that only lead to me wanting to show during the meetings that I’m working on it even more. I think the key probably lies on trusting more my own knowledge and being okay with not understanding and knowing everything, I just don’t know how to achieve this.
Has anyone experienced similar situation and maybe has concrete tips on how to deal with this and relieve some of the pressure? Many thanks!

Some of the (more established) professors can also be quite critical towards students and phd’s  You get them everywhere.  Most of the other academics are probably unhappy about it too, when it goes too far, so while silent, they are likely to be on your side

Let me suggest two things, one simple, one not.
The simple thing is to ask more questions than you make statements. The others in the meetings have more experience than you do and good questions can lead to research. Don't think of questions as revealing lack of knowledge but as a way of getting up to speed.
The harder thing is practice, practice, practice. It is natural for novices in any field, even doctoral candidates, to feel insecure and often a bit lost. But those others went through the same thing in the past and seem confident now because they've had a lot of practice. Especially hard for introverts at first, but if you think of it as a learned skill rather than a natural ability you can get there.
In some fields (math) even saying "I don't understand" can lead to positive things if arguments are incomplete as presented. As a student my peers often thought I was brilliant because I asked a lot of questions. Others had them also, but didn't ask. (My mom, on the other hand, thought my constant questions were a pain in the ***).
In New York the answer to "How does one get to Carnegie Hall?" is "Practice. Practice. Practice".

Thanks for the answer! Asking questions is for sure something that can really help and is practice at the same time. The question then is, how to ask questions. The problem now often is that because of the high pressure I put on these meeting I cannot think very straight and questions do not arise naturally as would happen when I’m reading something or so. Are there practical tips to being able to get your mind off how others perceive you and wanting to perform well and let your curiosity flow again.

It might help if you shift your perspective about what these meetings are and what they're for.
You seem to consider them as a test of sorts, requiring you to put on a top notch performance. Of course, you'd feel under pressure. Try instead to think of the meetings as an opportunity. Opportunity to learn, to ask questions about things you're confused about. Opportunity to share ideas and learn about science. Think of the meetings as being there for you, instead of you being there for them.
I know this is hard, but once you do it once, you'll feel so much better. If you need to just keep repeating to yourself that meetings are not a test. Right now you seem to be stuck in a loop. Before the meeting you might think I haven't done enough, I haven't learned enough, I'll embarrass myself. The problem with this is not only that it will affect your performance during the meeting, it will also affect you outside of meetings. You'll be unwilling to engage and feel stressed and might procrastinate too.
In addition to shifting your perspective, you could also try to manage expectations. You could talk to the profs individually and ask them what they expect of a second year student. You can ask them if you're meeting those expectations and if not what do they recommend you do? You can ask them who meets those expectations in their opinion and then you can go to those students, talk to them and learn what they're doing that you're not, or what they're not doing that you are.
You can also create agendas for the meetings and prepare more before hand so you feel more comfortable.
That's all that comes to mind.
I do agree that maybe there is an issue with a lack of knowledge. But you won't get anywhere if you constantly think that you don't know enough and that you need to learn more (it'll just kill all the fun). Even though this is invariably true for pretty much everyone, science is especially difficult because knowing what you need to know and where you can learn it can be just as hard if not harder than actually learning it. So if you set unrealistic expectations about how fast you're supposed to progress and how to measure progress you are bound to be disappointed and lose the will to do science.

I think we humans tend to poorly assess how others assess us. Sort of an egotistical problem we never grow out of as toddlers where we assume we're always being judged by others even as we walk in the street or visit a store. In reality, people just aren't paying that much attention to you, they're focused on themselves and how they are being judged. When they do judge, they do so according to their own experiences and feelings: they judge you for getting in their way, not for how well you walk. If you trip and catch yourself they're thinking "glad that wasn't me! And glad they're not hurt and I don't have to decide whether to help" not "they're so uncoordinated!".
A scientific presentation/talk around professors is a little different but it also extends that principle. The other people aren't there to judge you, they are there to hear about science. They like talking about science in their field, it's their favorite thing. They'll judge you only by how much science you help them talk about. If you don't know the answer about something, it might give them the chance to show off what they know: they'll remember how smart they must have seemed to everyone, not how the student doesn't already know everything (if you did why are you a student?). They'll remember you more negatively if you make them seem dumb in front of their colleagues than if you let on you are not omnipotent.
I would be more careful not to seem arrogant rather than trying to know everything. I would think of this as a conversation not an exam; in a conversation you can admit you don't know without losing points and you can invite others to contribute in your place. It's more impressive when someone understands the limits of their knowledge than when they pretend to have no limits.
For your own research, the one thing you absolutely do need to be an expert in is what you actually did, because no one else in the room will ever know more than you about that. You have to be prepared to be the expert in you own work; especially if you've tried many things, make sure you review what you actually did when you present data/results.
Finally, presenting among professors at your institution is great practice for the wider and world. Everyone studying and working at your institution has an incentive for everyone else there to look good when presenting outside. If you get tough questions, see these as opportunities your friends are providing you to be ready for true adversaries later. They all know you're learning, let them help you learn.

I definitely went through a stage where I had this problem. In hindsight, it reflected weakness in technical knowledge. You say "When put on the spot I usually don’t [know the answers]." How long does it take you to come up with the answers when you're not put on the spot? If it's just a few seconds to come up with the correct answer, then the issue is probably psychological. But if it takes time to come up with the answer even when you're on your own (and especially if you can't answer without checking references), then the issue is probably a lack of subject matter knowledge.
At the undergraduate level, it is sufficient to understand the concepts and techniques and be able to figure out the details when needed. But at the graduate level, the goal is expertise in a particular topic, and that means that you know these things cold. Sure, you'll never know everything, and there are some questions to which "I have no idea" is a perfectly fair answer. But in many cases, improving your technical knowledge will allow you to more confidently answer questions.
So how do you do that? Look at your work (and your group's work, and the subfield generally) with fresh eyes. Specifically: with very critical eyes. Pretend that everyone in the subfield (including your past self) is an idiot and you assume everything they've done is totally wrong. Then, start with the axioms and fight with them until you must grudgingly concede that the axioms are reasonable. Then rinse and repeat for everything else. Once your work has already withstood your own scrutiny, you'll have an easier time defending it to the scrutiny of others.

I was (and still often am) in a similar experience when giving talks. I can give you a tip that worked for me that refers to your statement:

I think the key probably lies on trusting more my own knowledge and being okay with not understanding and knowing everything, I just don’t know how to achieve this.

For me that was indeed the key. And what helped me be okay with not knowing everything was observing my advisors or other senior academics in meetings. When I collected enough evidence that professors are also stressed giving talks, at times are visibly challenged by the questions and sometimes have to manouver the way around the answer, or sometimes struggle to explain a concept clearly, it made me calm down. I realized that apparently none of us know everything, even about our research field, and we all have better and worse performances when speaking to an audience. So my advice would be: observe senior academics carefully during meetings or presentations and notice their shortcomings. If they can have shortcomings and still be successful academics, so can you.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to deal with an advisor that refuses to accept my evidence for a negative result?
I am in what should be the final year of my PhD. Essentially, the problem is as follows:
The goal of my thesis is to reduce the uncertainties in a study performed by a previous PhD student. I have probably thought about the problem more than anyone else on the planet over the past four years and have come to the conclusion that this goal is impossible to achieve for technical reasons. In fact, last Fall I discovered that it had been known in the literature for nearly 30 years that there is a physical mechanism that can explain our results and why it might be very difficult or impossible to obtain the precise measurements we are looking for.
Unfortunately my professor does not agree. He thinks I am making some sort of mistake in the analysis. This is of course possible but he refuses to acknowledge the possibility that the project has a negative result. This has been the case every time I questioned the project's viability over the past 2 years. When I discovered the papers explaining the physical mechanism that describes our results I was very excited but he just brushed it off as something he knew already and that was of little significance (which led me to nearly having a nervous breakdown).
He recently stopped responding entirely to my e-mails. He also made it very clear that if I am unable to finish the project I will fail my PhD. Unfortunately, e-mails I have sent to academic advisors and my own committee members have largely been ignored. A co-author tried to help for a bit and then also stopped replying. All of this has led me to feel like I am the problem here somehow and the situation is very unpleasant for me. I am wondering what to do.

What field is this? Physics? If so, please say and you can add the tag "physics" to get more attention from the experts. As a mathematician, I'm afraid I can't help. Good luck!

Not all PhDs are succesful, my parents both had failed PhDs due to technical limitations at the time they did the research (find earlier than you did though, but it meant they had to go to different fields/jobs before finding another subject). It's not a personal problem if you don't finish and have to start over at another thing

I don't understand: showing that the uncertainty can be reduced seems an important result. Couldn't it be rephrased as a positive result: "PhD. X found the sharpest bound on uncertainty. Here is a proof". Did you write a paper on this physical technical reason? That would help you in forcing your advisor to pinpoint the exact problem in your analysis.

The first step is for you to take stock of what research you did accomplish so far. Did you gain some new insight into the problem that is of interest to others? Were there any publishable side projects?
Once you have that list, the next question is whether this is (almost) enough to make a dissertation from. If yes, it makes sense to try and work around your advisor and walk out of there with your PhD in hand. If no, it is probably time to quit. It is clear that you aren't getting the advice from your advisor that you need, so you'd be better off starting over with a better-suited advisor than trying to salvage the current situation.
Something that is pointedly absent from the steps above is trying to figure out whose fault the situation is. This is because the answer to that isn't really relevant for your way forward. It seems to me that your advisor failed you. However, even if I could grant you an official judgement that it is all their fault, it wouldn't help you with your current situation.

From a bird's eye view, though I do not know your field:

It is frustrating that your advisor is not with you on this. From what you stated, you have negative results, and that should not be a problem. Of course it is possible that either you or your advisor is right.

It would help if you can try not to be fatalistic about the situation. Negative results may seem like a bad thing, and your advisor's response is discouraging, but there is a difference between what can be published in a top, competitive venue versus what can be published in your thesis. As the user @Arno suggests, many negative results can be extremely valuable for the community to learn about, and they can be reported on as part of a thesis.
For instance, what have you learned from this experience? Are you really sure that there is nothing useful to report on, in a technical and clear way, about the techniques ABC you investigated and what results XYZ came out of that investigation? You do not have to exhaustively rule out every explanation for the analysis (it seems, from your advisor's perspective, that you have not); but you can still report on the preliminary analysis and make a list of ways in which you tried to be thorough about it, and any particular strengths and limitations of this approach.

About your academic advisors and committee members, you did the right thing in reaching out to additional mentors. Please rest assured that it is nothing wrong with you; however, the best way to proceed is to try to be proactive and constructive. If the conversations with additional mentors did not go well, it is possible that they saw a situation which you described or perceived as hopeless, and could not find a way to help. It may be best if you can identify a route forward where your results might be salvageable, and can communicate them in an honest and open way.

You state that you were excited when you "discovered the papers explaining the physical mechanism that describes our results" -- that is fantastic. To me, it shows that you still remain excited and interested in your field. I am sorry to hear your advisor did not share that enthusiasm; but hold on to it -- don't lose sight of why you are doing this and why you are interested!

Beyond this, I really can't say about the particulars of your situation, without knowing your field and the problem you are working on, but I encourage you to not lose hope and to focus on a positive and constructive way forward.

The could be a number of things going on here. The first is that the professor knows there is an issue with the analysis but instead of outright saying what this is, they are suggesting you have another look at it. This is common with supervisors who do not wish to spoon feed you information, but expect you to discover what the issue is.
The other issue is the professor and others may have mistakenly or not, taken the stance that you havent been receptive to their input. This can be hard to unpick, especially when both sides are convinced their stance is correct. The fact you said that nobody is willing to enagage may hint this is correct.
While I dont know what your field is, in mine negative results aren't really an issue. Doing a PhD is about showing you can do research, not get "positive results". The issue around your PhD will be whether you can demonstrate that you did everything by the book, as its your methodology and analysis which will be judged.
When I did my PhD, almost every candidate complained they were being asked to do things they didn't want to do. Usually because they didn't understand the value of the input of the supervisors. In general they want to help you get the PhD, even if its via a method you may not like at the time.
What I would consider in your position is that if your professor thinks there is an issue with the analysis, there is a good chance those who assess your thesis may come to the same conclusion. The other issue is that your explanation of the analysis hasn't convinced your supervisor or others of its validity.
I would suggest a meeting with the supervisor to discuss ways forward, which may include doing something with the PhD you do not like. This is an important step to learn as a researcher who in the future will be working with others and with constraints you have no control over.

There can be many reasons for your professor to disagree. And it may be very hard for you to understand their position. I guess that what is more important for you is not to fail the PhD.
I had a very similar experience and I think what helped me was being more assertive. At the very beginning I wanted to write a negative paper for my first publication. A young student questioning an entire branch of research? Not very promising. I had to find a way out.
My suggest is to start looking for any reason that explains why your idea is just an opinion and not a fact. Focus on such reasons while keeping your discoveries for the future. Learn to be diplomatic, so that when you will be a doctor, you will not only know how to do research, but also how to survive within academia.