text:
How can a TA help a student who is certain she sucks at programming?
I am a TA for an undergraduate Signals and Systems class (Electrical Engineering). As part of this, I lead a lab session, where we teach students how to code up various signal transforming operations in MATLAB, and visualize the transformed signals (for example, time-scaling, time-shifting, etc). So far it has been just basic stuff (it's only week 3), but the complexity will scale up quite a bit.
One of my students has some kind of "code-fright". She understands the theory (because there's a pre-lab in which you write down the theory of what you will be coding in the lab, and she does well here), but when it comes to coding, she just can't get started; her editor is blank till the very end, and she doesn't ask for help when I go to her; eventually, she's on the verge of tears, and is clearly very, very upset.
When I try to talk to her about what the code should look like, asking questions, and trying to get her to answer, she just remains stuck on the line, "I'm not good at programming". I repeatedly tell her that she has the theory down, and she simply needs to write it up in MATLAB, and reassure her gently that she can do this. But it doesn't help at all.
How do I help her out? The lab has 20 students, so as much as I wish, I can't spend more time with her. But I don't want her to forever think that "she sucks at programming".
EDIT - I forgot to add, this lab has teams. But she refuses to work with her partner (presumably because she wants to be able to do it on her own?). The partner does manage to get her code to work on her own.

You may be interested in [cseducators.se].

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

My response would be: "I wasn't good at it either when I started."

@Dom or a natural extension of that, "almost no one is good when they start"

Have you tried actually walking her through the code? Not "talk to her what would it look like if she typed it", but actually sat down with her and told her what to type ("y = function (x)...") and had her gradually fill in blanks?

When you tell her that she doesn't suck at programming, all she hears is that you don't understand how bad she sucks.  The psychology is the important thing here, not pedagogy.  If I were in your situation, I would say something like, "Yes, you do suck at programming.  In fact, most of us suck at programming. (Heck, have you ever noticed that Windows doesn't work???) But by doing some of these exercises, we get a bit better at programming.  Likely, you'll never be World's Greatest Programmer, or even a programmer, but by struggling, even unsuccessfully, with some of these exercises, you'll make yourself a stronger thinker.  And therefore a better person."
I've gotten a lot more mileage out of "We all suck, so let's do what we can" than pretending that everyone's a genius.

Upvoted because it's true (and not just of programmers; most professionals suck at their jobs) but I'm not sure it will have the desired effect.

As a Professional Programmer with about a Decade of Experience... this is a great question... and an simple but great answer. I still have "code freight" and only succeed because I'm stupidly stubborn. Coding is maddeningly complicated (it scales quickly is an understatement). Behind every successful person is years of struggle and failure. I know I've failed more than I've succeeded. I know I suck and work harder because of it.

Agreed, upvoted for truth, except please do not say "You do suck..." "you'll never be a PROGRAMMER", because she will latch onto just those words.  stick with "likely not be World's Greatest", and put it more on yourself "I'm not really good at it.  nobody is."  which is more reasonable.  also, she could benefit greatly from understanding how to use psuedocode, which I've observed a great many people, sadly, do not use.  She needs to understand the problem is piecemeal, and that she won't be able to just sit and type it out like a conversation at this stage; her peers likely can't either.

As a programmer, I can say that this answer is great. I would tell the student the ugly truth - good code is very rare in the industry, most people do not have the qualification to do their work responsibly and computer security is a bloody joke. She needs to get her hands dirty to get used to the syntax, the rest is easy then.

Perhaps put it less harshly, but, YES, this! I wrote some terrible code, I sometimes STILL write terrible code, but you can always delete, improve, do over, as long as you start writing. Perhaps an additional encouragement: the coding itself turns into routine with some practice. The fact that she understands the THEORY puts her already ahead of many!

I was coaching my 13 year old daughters soccer team and a girl on the team was frustrated and said "I suck at soccer".  I replied "Well, you did at the beginning of the season." She had quite the shocked look on her face, obviously not used to adults being this blunt.  I continued, "When you joined the team, I used to cringe when I put you in, especially when the score was close. But you've improved a lot and you're one of the better defenders on the team. I don't hesitate to put you in at all anymore, regardless of the score."  She was practically beaming after that.

"The psychology is the important thing here," I downvoted because you are implying the TA should try to do a psychologist's or councillor's job.

All teachers are in the psychology business. It's not just a counselor's job.

Can vouch that most programmers stink at programming. It really does take that 10,000 hours (minimum) of experience before you start writing code that doesn't make you want to throw up the next time you look at it. And it seems like a lot of people don't get beyond that even with 10,000 hours.

@jaia No, this is wrong and an unethical approach.  Most professors and TAs have no formal training in psychology (myself included).  In addition, in many places psychology and/or counselling practice requires a licence.  It seems obvious to me, based on very basic knowledge of anxiety disorders, that this student needs expert help.

@AnonymousPhysicist I think it's a bit of a jump to go from a student saying they suck at programming to the conclusion that they need professional help. Besides, there's no way the TA can make such a referral unless, for example, the student says something like "I get really nervous when I try to write any code", and even then, the referral should be in addition to more immediate help.

@jaia Your comment does not match the circumstances described in the question above at all.  I think a TA can make a referral at any time for any reason; it's up to the professional and the patient to decide if action is needed.  The TA should err on the side of caution.
I think this whole conversation is based on a misconception that sending a student to counselling they might not need has some kind of significant down-side.  It does not, unless you are the health insurance company (in countries I know insurance pays for mental health care and students are required to have insurance).

@jaia I don't know much about anxiety, but sitting in front of a completely empty editor crying for the length of the lab seems to me a lot more extreme than just saying they suck at programming. At least something more than "we all suck, so just do your best" seems warranted.

@11684  It's not "We all suck, so just do your best," but "We all suck, but we can get better."  Your version is, indeed, oppressive.  Second, the question wasn't what the Counseling Office can do, but what the TA can do.   Commiseration seems like the way to go in all cases.  I'm always surprised on this stack how someone will post a good, general answer, but it gets torn apart by people proposing fringe, special cases.   "But if the student has rabies and is from a culture that worships bananas, your solution won't work at all!!!!"

And to add that the TA should recommend counseling is pointless.  The OP is already aware of that obvious option.  Hence his question, "What can I do?"

@B.Goddard I'm sorry you feel attacked. However, my comment was not in response to your answer, but to jaia's comment, who seemed to underestimate the severity of the problem of the student in question. I think we do agree, as you write "the TA should recommend counseling". However, jaia's comment suggests they think this is too much. I don't disagree with the approach outlined in your answer, but it seems we both think that this will likely not be sufficient to solve the problem completely and other options should be explored (again, "the TA should recommend counseling").

@11684  I don't feel attacked.  It's just the internet.  Queen Elizabeth and I both sent our first e-mail messages in the same year.

I agree with this answer. I am definitely one of those who is not qualified to be coding (GOD I got so much insight just posting my franken-code on Code Review!), but I still struggle through it and my code works out in the end. I'm not a programmer, but with this bit of coding I add a huge amount of value and can understand more logical ways of thinking as a result. Even when I look at my analyses (I'm an analyst) now, if there's an error, I'd debug it the same way I would if it's a code!

About her not wanting to work with her team mate -- she may have some fears such as:

that she'll feel embarrassed in front of her team mate
that she'll rely too much on the team mate's competence
that her phobia and/or incompetence will be contagious

Here's what I think would help:

She needs a tutor to work with her outside the lab, one on one, several hours per week, ideally for 30 - 40 minutes per day.
The professor should be brought on board and she should be allowed to turn in pseudocode on a temporary basis.
In each tutoring session, the tutor should pose a programming exercise and ask her to write pseudocode, since (if I understood right) she's comfortable doing that.
Next, to produce Matlab code, the tutor should scribe for her (write from her dictation), using pencil and paper, away from the computer -- ideally not in a computer lab.
When she gets stuck on syntax, the tutor should allow her to look at an easy-to-use syntax cheat sheet (if one doesn't exist, the tutor should create one).
As much as possible, the tutor should help her fix errors before they get to the computer.
Once the program has been written completely with pencil and paper, they should sit in front of the computer together, but with the tutor in the driver's seat.  Initially, the tutor should do all the typing and clicking.
She may continue to be tearful and she may continue to say she's not good at programming.  The tutor should not waste any time with pep talks and should not argue with her.  At the end of each session, the tutor should give brief positive feedback, with eye contact, but without gushing.
After several sessions, the tutor should say, at the end of the session, "Next time, you're going to type the second half of the program."
At the next session, when they're moving to the computer, the tutor reminds the student, "Today, you're going to type the second half of the program."  Next, the tutor types the first half and then hands over the keyboard and mouse.  Now, the tutor needs to be as cool as a cucumber and just wait.  The tutor may solve a Sudoku while waiting if desired.
The next session, the same, but at the end, the tutor informs the student that next time, she will type the whole program.
The next challenge might be to move toward composing at the computer -- but this stage might not be needed.

This is a bit like exposure therapy.  The tutor should provide occasional positive feedback, but very businesslike.  You know, and I know, and the tutor will know, that the student will be going through hell.  But it is most respectful to just let her go through it, without making a big deal about it.
If she takes the initiative to speak about her feelings, the tutor should not interrupt -- but the tutor should keep the focus on programming (not talk therapy).
It might be helpful for the student to see a medical doctor to discuss possible pharmaceutical support for this project before beginning.  That part is optional and the decision is very individual.
I don't know how you could help arrange for this.  One obvious option is to find a private tutor who could do a good job with this type of tutoring, and propose that she pay the tutor out of pocket.  You could ask in your department to see if there are any other options.

Edit: I glanced at the Wikipedia article's Solutions section that Daniel linked to, and it made me realize I should have explained where my outlined intervention came from.
It came from my experience with my son, who has Tourette Syndrome, OCD and anxiety. Specifically, from tutoring him during several key difficult periods, and from assisting with home exercises in his treatment for OCD.
Scribing during high-symptom periods has allowed him to progress academically.  We were able to move from a place of high emotion and a lot of homework refusal to a place where I would start the homework session by scribing, until he would grab the pencil and the clipboard from me, and eventually to a place of independence.
Exposure treatments work on the principle of exposing the person to the thing that's very distressing, but in a controlled way, with increases given in small baby steps.  It takes patience.  The body can't maintain its alarmed state forever, so in each session you apply the stressor in a small amount and wait it out.  Eventually the fight-flight-freeze response goes away.  You do the exercise repeatedly.  That's a very simplified explanation but I hope it helps.
This student's problem is a bit like the classic phobias, e.g. fear of flying, fear of spiders, etc., but it's a bit different, and that's why I used my experience scribing for my son as a model.

"[S]he should be allowed to turn in pseudocode on a temporary basis." This is the only part I can't really get on board with—it would be better to give part of the assignment in just pseudocode for everyone. Making special exemptions for single students isn't really OK, unless there's direction from an appropriate administrative office.

I like this answer, but I am a bit wary of any requirements for an extra person to be hired. I know for a fact that our department is pretty cash-strapped (to the extent that some quarters PhD students go unfunded - it happened to me once). But you are right, the simple answer seems to be just get her more practice.

@convexityftw - What I outlined amounts to a variant of exposure therapy for OCD and specific phobias. What I'm suggesting is more than just getting her more practice. // If she had more time she might be able to get a medical diagnosis of an anxiety disorder and 504 accommodations, but at most schools this is a process that doesn't happen overnight.  Could you meet with a department administrator and share this page?

@aeismail - In general I like that approach.  I don't know if that would be compatible with what needs to be accomplished in the lab.

@convexityftw I believe aparente001’s suggestion is that the student hire a tutor. As a department, you should not be expected to bear the costs for one-in-one instruction.

@aparente001 You could certainly make the pseudocode a “stepping stone” on the way to the final assignment.

@aeismail yes, it's not a bad first step.  If graded by having the code checked to ensure the concepts are being used, then pseudocode should be easy enough to reward some credit.  Full credit will be unobtainable as the code can't be run, but it's a start, and the student will go from failing to produce output, to being able to produce something and getting some credit for it.  That just in itself should be a good step towards the student feeling more confident (if not any more competent) in doing the work.  Every journey starts with a first step and all that.

You should not suggest that an unqualified person try to provide therapy.

This would be great advice for someone with a long history of failure, but the OP is talking about week 3 of a basic course. A tutor seems like overkill at this stage and the student may not be willing to hire one. (When I was struggling with math and my grandfather offered to pay for a tutor, I declined because I didn't think it would do any good.)

My school hires tutors, but not for a single student I don't know what the limits/ratios are but 5 or more student can use a single tutor depending on their needs.  However, pay is only slightly more than minimum wage.

@cybernard - You have a student in a similar situation?  If so, I recommend you talk to your department to see what can be done to support the student.

@aparente001  No we don't have student like that because our school actually hires tutors for students to use, after filling out paperwork of course.  However, it is free to the student using it.

I don't think the tutor approach is fixing anything. She will get past the lab sessions, perhaps with good remarks, but what about the future? What about the next time she can't/is not willing to do something? What about partnership and relying on others? You can't just join the workforce and go "by the way, I need a tutor on my side otherwise I'm not turning my assigned work in". I feel this just prolongs the problem and, worse yet, it deepens it. It might help the OP to "get rid" (note the quotes, I know OP is trying to help) of the unwilling student, but it won't help the student.

@tfrascaroli - The beauty of exposure therapies is the gradual expansion of the exposure to the point that the impairing symptom is no longer impairing.  In this case it's the gradual removal of the support (the scribing). // Note, if scribing accommodation were being given for certain other reasons, it would continue, and that would be covered under Section 504 of the Rehabilitation Act.

I've found assignments that ask students to read code and write interpretations of what they think the code does are greatly helpful for new/first year students learning to write code.

I've had some of these cases over the years, and they always end badly. To me, the "she doesn't ask for help when I go to her" is the worst signal here. A student in that situation cannot get better, in my experience.
This sounds a lot like math anxiety, which is an incredibly deep problem, and likely beyond your ability to fix as a TA. My understanding of the literature is that classroom-based interventions do not work; the student needs one-on-one treatment; so perhaps you should direct them to a school counselor, if available. You could also peruse the suggested solutions here, but they are mostly aimed at school-aged children, and frankly even the top few items run counter to research as I understand it.
In the long run, you'll find that if a student doesn't want you to assist them, then you simply cannot be of use to them as a teaching assistant.

I disagree because I think you are pathologizing, and I really disagree with the attitude that the student doesn't want assistance. It's hard to know exactly what's going on without knowing the student, but since she does understand the theory, it seems more likely that there is something about the process of coding as it's being presented in this course--sitting down in front of an editor and banging out code--which is causing the student anxiety, and not a generalized paralysis when given any task related to coding.

@ElizabethHenning I agree with your general sentiment here - especially the resistance to the answer's "just give up on this student" sentiment, and being weary of the risk of labeling something as a pathological mental problem prematurely. One side-note though: In my experience "math anxiety" is also primarily caused by a problem with "something about the process" - how we as a society teach/do/represent math that fails to connect to the person's fundamental ability to work with numbers and logic.

Referring a student to counselling is never premature labelling.  This student absolutely needs to try counselling.  There is evidence therapy improves these symptoms.  This answer is not worded strongly enough, and I disagree with the comments.

Anecdotally, teachers can have a powerful influence on math anxiety. I've been on the receiving end of that. http://perceivingwholes.blogspot.com/2011/10/on-not-being-fish.html

I wasn't familiar with MATLAB, so I looked at some code samples on a page called Getting Started with MATLAB. If your own introduction to MATLAB looks like this, that may be the problem. Even those extremely basic operations assume a lot of knowledge that programmers take for granted, like what variables and functions are, first conceptually, and then in their general appearance in code. The thought underlying "I suck at programming" may be, "What the hell is programming, anyway?"

Typically electrical engineering students in a signals and systems course have had at least an intro to programming course along the way, so it's not like the student has never programmed before.

@MadJack if the student's only experience in programming is in one language in an into class, chances are that isn't going to be sufficient to be able to just jump into a completely different language. Especially if the quality of that intro course wasn't high to begin with. (teach all the syntax without the concepts) From what I recall the syntax and structure of MATLAB isn't anything like the languages typically used in intro courses.

Most students i have met didnt ubderstand anything in the first programming course. Not because the didnt understand how to write the code, but because the reason why and how it relates to other skills they have is opaque.

Also, it should be added that MATLAB is quite different from other languages not just syntactically but conceptually. Those who wrote MATLAB documentation often assume that anyone in the world thinks about matrix operations (instead of procedural / or object oriented) all day long.

I as a professional programmer with computer science education struggle with MATLAB and never used it apart from one course where I had to. Most electrical engineers seem to like it (probably because it is all they use for programming during their studies...)

@Mr.Mindor Indeed. Even a professional programmer cannot simply jump into a new language. It may only take a day or two to learn the syntax, but it takes months or years to thoroughly learn the standard library, not to mention popular third party libraries, conventions, and best practices.

@AndreaLazzarotto 3D graphics programmers do. That's about it.

Surely the answer is this. People who know how to code take a huge background understanding for granted. The poor student probably understands coding in a hypothetical mathematical sense but dosn't really know what the editor is or where to put the first line of code.

Programming is a complex skill that you can't pick up that quickly. So telling her she can do it when she may have an accurate assessment of her abilities won't help in any way. If I would attend a class and find out it is given in Chinese, then no amount of telling me "no you can actually understand Chinese, just try it" will help. There is this mindset of "We can do whatever we want if you just want it enough" but what gets forgotten is that some things need years of training.
What she needs is to attend an introductory programming course, where she learns basic concepts and assumptions, for example that there is a CPU and it executes instructions in sequential order and there are variables and so on.

"there is a CPU and it executes instructions in sequential order " If that were true, we wouldn't have Meltdown.

Well I would begin with a simple model and do the nitty gritty later.

@Acccumulation: It's true enough, though.  The cardinal rule of out-of-order execution is to preserve the illusion that a single thread runs in program order.  The same goes for compile-time reordering in languages like C++.  This model is only talking about the architectural state, not timing, and is all you need to care about to write correct programs.  Meltdown is based on a timing side-channel to turn micro-architectural state into architectural state, so yes it's a problem :/.  I think you already know all this and didn't really mean that students need to understand OoOE.

It's pretty pedantic to critique a (tangential) comment that says you should learn "basic concepts and assumptions" like CPUs execute in sequential order.... it is indeed an assumption and learning to program with such an assumption is a basic skill every programmer should know.

Since no one suggested this before, simply ask her why. 3 minutes after you give out the exercise for everyone to do, go to her and check her screen.
If she keeps repeating the same phrase, break the "brain freeze" pattern by asking a sequence of questions similar to:

"why can you not start?" (nod and ignore if she repeats the same phrase)
"did you study the last classes exercises code?" Or simply, "did you study the basic syntax of a MATLAB program?"

if not and if the reason is because she did not have the code, ask her why she did not study from her partner's code?
if she did study, why can't she start by trying out a similar structure to the code in X class or from what she has seen in Y book/tutorial?

More importantly, remind her that this is a group exercise, that both of them seem to understand the logic behind the exercises, so she needs to work with her partner. Then ask her: "why are you not cooperating with your partner?"

if she replies that "her 'programming level' (whatever that is) is too advanced for me", then say to her: "what matters here is that the group implements the logic, if you both understand parts of it you can ask each other about certain issues, like which set of conditions would be better in this case, what expression would satisfy them better, etc."
if she comes up again with the "I want to do it on my own" line, be blunt, tell her that this is a group exercise for a reason and that the group (not her) needs to deliver the code at the end. You may suggest to her that she can try to do the exercise by herself after the class, but if she still decides not to contribute, consider that dismembering the team and evaluating each one individually is an option. Ask her partner first how would she feel about it.

From this sequence at least you'll be able to address the real problem, which some here have speculated about (freeloading may be implicit), but if you ever discover the true reason, adapt your strategy in order for her to either start writing something down (even if the interpreter does not run, at least there will be a debugging process to do) or to start working with her partner.

This seems like a good/best approach -- the best teaching is teaching people how to teach themselves. Giving the student of the model of the type of questions to ask herself when she gets stuck is almost certainly much more helpful in the long-run than cobbling together some personalized shoddy intro to Matlab syntax.

+1, but caution: people with these sort of mental blocks can feel stressed/defensive if feeling pressured when probing for the why - they might not be able to word the root issue, or even fully understand it themselves. Pressed for answers, they might give answers that are sincere but incorrect or rationalizing attempts at putting the issue into words. Best advice I can give is to make sure you emphasize several times that you're asking because you want to understand, and back off temporarily at signs of growing distress.

I don't get why this answer doesn't have more upvotes, it gets to the crux of the matter. "I suck at X" isn't a solvable problem, but "I suck at X because Y" is.

Emphasize bravery for new programmers
When I was preparing to tutor a 13-year-old girl in programming, having only helped undergrads before, I did some light research to see what tone I should set. I came across this TED Talk:
Teach girls bravery, not perfection | Reshma Saujani
(Reshma Saujani is the founder of Girls Who Code.)
Saujani's thesis is that girls are socialized to be perfect, whereas boys are socialized to "play rough and climb to the top of the monkey bars". One study she cites found that grade 5 girls encountering material that was too difficult gave up whereas boys redoubled their efforts, despite the girls' overall superior academic performance. (In fact, the smarter the girl, the higher the chance she gave up.)
Now consider that programming requires a huge amount of trial and error both in writing and debugging, not only for learners but even for most professionals.
A scenario she describes at Girls Who Code sounds very much like your own student's:

We immediately see in our program our girls' fear of not getting it right, of not being perfect. Every Girls Who Code teacher tells me the same story: during the first week when the girls are learning how to code, a student will call her over and she'll say, "I don't know what code to write." The teacher will look at her screen and she'll see a blank text editor. If she didn't know any better, she'll think that her student spent the past 20 minutes just staring at the screen. But if she presses Undo a few times, she'll see that her student wrote code and then deleted it. She tried, she came close, but she didn't get it exactly right. Instead of showing the progress that she made, she'd rather show nothing at all.

She also mentions a pattern that reminds me of your student's "I suck at programming" comments:

When the guys are struggling with the assignment, they'll come in and they'll say, "Professor, there's something wrong with my code." The girls will come in and say, "Professor, there's something wrong with me."

Not everyone may agree with this assessment (the disheartening YouTube comments are evidence enough), and generalizations have exceptions. There's no guarantee that these observations apply to your student's case. But at a minimum, I think it would be a promising track to follow.
Applying this
Let her know that mistakes are necessary steps to mastery and that progress is only made in this field by trial and error. The mistakes she'll make won't do any harm or damage the computer. But showing them to you will allow her to get past them.
Focus on the process, not the result. Praise growth, not (perceived) ability.
Throw in stories of your own history getting over these humps. Many students love to hear that their teacher wasn't always "all-knowing". They see that you're human and had the same problems as them. Ergo, they too can surmount them.
You can also do something like "My Favourite No", where you invite attempts from the students. You then identify the mistake whose correction is most likely to help everyone and go through it with the students. These days apps like Padlet would make it easy to do that anonymously.
Theoretical connections
As Kevin comments below, there are connections with growth vs. fixed mindsets and mastery vs. performance outlooks. There are also connections with attribution theory ("Whose fault is it when I fail? Who gets the credit when I succeed? Why did I fail or succeed?"). We know, for example, that helping students attribute success to effort rather than innate intelligence is a good predictor of willingness to take on new, harder tasks (itself a prerequisite for succeeding at them).

Appendix: filling in the air pockets
This doesn't mean a diminution of rigour. You don't need to say that mistakes are fine or can be ignored. Quite the contrary: Students have to make them because it's important to identify them. The mistakes aren't good; making them is.
I'll illustrate. I have another student, a 10-year-old boy* I'm teaching French. For a long time, he seemed to hate reading, even though he was pretty good at it. During one lesson he happened to make a remark that revealed the problem: "I'm not gonna read. I'll just make mistakes."
"So?" I said. "That's what I'm here for! I'm not here to listen to you already reading perfectly!"
I then made this impromptu drawing:

"This box is your understanding of how to read French," I said. "When we completely fill it in, you understand everything. But right now there are little bubbles — air pockets. Those are the gaps in your knowledge."

"Whenever you read, we're scanning this box. Every time we find a bubble, we 'pop' it. We talk about the mistake and practice till you get it. By the end, this is what we have."

I don't know if it would work with everyone, but it worked with him. He got over his fear of reading.
* Those who read this episode as proof that boys have the problem too can feel free. The pedagogical point is the same.

This sounds like a rediscovery or reframing of mastery vs. performance orientation in goal theory.  (All searchable terms.)

I think there is something deep in this answer as it addresses the core problem of a student who seemingly refuses to start trying. Trying for two hours and then feeling satisfied to have found a half working solution may seems natural to experienced programmer facing a new problem, but this mindset is probably not natural for some (most ?) people. Also it applies to many different flavours of problem solving (in my experience at least math, physics and programming).

As a GWC facilitator: Confidence, not intelligence, is often what is lacking: In the past, I usually tell the girls in my club "Everyone has to start somewhere. I wasn't born knowing more than you. I also had to work hard to not only solve the problems but truly understand them.", saying in essence "It's normal to need help/struggle: I did too". Additionally, Impostor syndrome is something I saw a lot while pursuing my CS degree, and often times calling it out for what it is and having a discussion was enough to dispel it.

This is the best answer to this question. Strange that it has so few upvotes.

I think their problem is the initial barrier to "programming". They think a "programmer" is genius that thinks in code, loves in code, breathes in code and knows always everything.
If they can do it manually on a paper switch the computer down and ask them to instruct you to do all the steps on the paper.
Start with a blank page and ask them to feed you with the signal draw the signal input or ask them how to draw the graph.
Then ask what to do next and why. "Apply fourier transformation" is good instruction here.
in the end you should be instructed to draw the output graph. Assure them that it is That Simple.
Then start again with a blank page. Explain them, that now you are more dull than earlier and that you understand simpler tasks only. Explain them that one instruction from previous example must be divided in several steps following each other. The instructions here should be complex as well, but a bit simpler. Assure them that it is Still That Simple.
Repeat untill the instructions you are asked to do are exactly the instructions written on one line in the computer code.
Now they wrote the actual program in language they understands. Assure them it is That Simple and that you were dull enough to be considered a computer and they can get results from you anyway.
Then start the computer and write "Hello World" function. Assure them it is that simple.
Show them how to translate short part of the instruction they fed to you to the code MATLAB understands. Something like "go through X and append every value greater than Y to Z" translates to:
Z=zeros(0,1);
for ii=1:length(X)
  if X(ii)>Y
    Z=[Z;X(ii)];
  end
end

Explain them every single command and assure them they actually used that command, but with slightly different name.
Let them write slightly longer code based on the simple example you have just explained.
I think there is only one lesson they need to learn: Everything is build up from simple parts. All they need is to know about those simple parts and how to connect them to build something more complex.
Also do not hide help and doc functions from them.
Avoid something like "It is simple, all you need to do is [write advanced code]". This will prevent a lot of people from even thinking about whatever you do.

Don't teach for looping to anyone who should be learning Matlab.

I teach math and programming to life science students, so I've seen students like this, although maybe not this extreme. Here's what I would try.

Start interacting with her in your usual way. Wait until she says, "I suck at programming".
Don't contradict her. Instead, say "OK, let's suppose, just for the sake of argument, that you suck at programming." If you feel you can pull it off, ham it up and see if you can get a laugh. "In fact, you might just be the worst programmer who ever lived!" If this doesn't fit you, just do the first line.
Turn it around. "I bet that even if you really are the worst programmer in the history of humankind, you can code this line." Point to something very simple from her pseudocode. Provide support if necessary and be enthusiastic when she gets it. If she freezes, type an answer with an obvious mistake into her editor. Let her fix the mistake.
Go to the next simplest line. At this point, you're not going for a fully working program, just incremental development.
At this point, tell her to work with her partner for a few minutes and say you'll check back soon. (Repeat a few times.) It's also good to make an announcement to the whole class about how much time professional programmers spend debugging.

Also, encourage her to come to office hours. That can be a good way to work with a student individually without spending extra time.

"I bet even the worst programmer in the history of humankind can code this line," or anything about a particular task being easy, can be an awful thing to say to some people. You've just confirmed that I'm dumb if I don't get it.

Not if it's said humorously. The idea is to convey a message of, "I don't really believe you're terrible, but I'm playing along". If humor isn't the OP's strong point, they could just say, "But I bet you can code this line".

@jaia easy or not, humorously or not, if someone has a mental block of some kind, they might not take what is being said well.  We know what you mean, but they might interpret it a completely different way.  The goal is to be unambiguous as possible, so they can't take it the wrong way.  Its not always easy.  Humorous statements are usually intentionally ambiguous, in wording or tone.  They can work, but you need to know the person to know how they are going to react.

I agree with Baldrickk -- if I had the student's problem, and the TA did what you suggested, and I didn't figure out the answer, the conclusion would immediately be "this TA is inherently superior/more intelligent than I am and isn't able to/doesn't understand how stupid I am because they are so smart they can't imagine being this stupid, and therefore is and always will be unable to help me in any meaningful fashion". I.e. it would be extremely counterproductive.

@jaia The problem isn't that you're exaggerating. If you say, "Let's assume for the sake of argument that you're the worst programmer who ever lived (which you aren't). Even then, you'd be able to code this line." What if she can't code that line? Now suddenly she sucks even worse than your humorously exaggerated worst programmer in history. I agree that you shouldn't contradict her, but better to go with "We all suck at the beginning. If everyone got it immediately, they wouldn't have hired me to help out. If you're hitting a wall, let me know so I can help. Eventually, it'll click."

The thing that's important here is calibration - humor is never just about whether or not you can pull it off, but also being sensitive to the possibility spectrum of how your statements will effect the other person. Through other interactions with the person you can get a feel for, and influence (by building comfort/rapport, etc), the interpretation probability mass. The risk with advising such humor is many people who try it are not sensitive to when not to use it, either due to not really understanding the mental issues possibly involved or lack of interpersonal tuning.

(cont.) And a necessary condition for successful interpersonal calibration is starting with a broad enough idea for all the ways a person can react to our statements - that's really what all these commends are about: drawing attention to the ways that this humor could go wrong, which is less about saying that we can never use it, and more about helping us be more successful at figuring out when it should or shouldn't be used.

This is insulting and probably harmful advice.

I edited the line in Step 3 that people were objecting to. Don't forget the fallback -- give her the code, but with a mistake and have her fix it.

@Ray: "Eventually, it'll click." But this is simply false as a universal statement. One-third of students in CS1 worldwide don't pass. Three-quarters of students entering a computing program don't graduate. http://cs.au.dk/~mec/publications/journal/25--bulletin2007.pdf

@DanielR.Collins Yes. But it works as a generalization. After all, two-thirds of students in CS1 worldwide pass. (cs.au.dk/~mec/publications/journal/25--bulletin2007.pdf). And in all seriousness, I don't think I've ever had a student who regularly came to office hours when they were having trouble and still failed the intro class. The ones who fail are the ones who try to cheat, and the ones who are having trouble and yet never seek help. (Some of the ones who struggle but seek help might not make it through the whole program, but I can get them through the intro class if they let me help.)

@Ray: "The ones who fail are the ones who try to cheat, and the ones who are having trouble and yet never seek help." So we're back at the fundamental fact that the student in the OP's case refuses help. Which as I noted in my answer is the worst attribute in this case.

@DanielR.Collins Hence my suggestion to emphasize that most people struggle initially but get it eventually, and that the TA was hired specifically to help people get to that point.  If the OP can get her to the point where she asks for help when she needs it instead of panicking, the problem becomes solvable.

@Ray: "most people struggle initially but get it eventually" is not the same as a universal "Eventually, it'll click".

@DanielR.Collins I readily admit that "Eventually it'll click" is a generalization that will fail in some cases.  I'm okay with that personally (it's encouragement, not a theorem), but I'm willing to replace it with "Most people struggle initially but get it eventually" as my official suggestion.  The important thing is that it's something more likely to encourage them to seek help and less likely to backfire than the answer's "I bet that even if you really are the worst programmer in the history of humankind, you can code this line."

Have you ever heard of Imposter Syndrome? My coding bootcamp introduced it to us at the start of our development training. It essentially sums up the feelings of inadequacy, especially in the face of peers. Learning code can feel like an insurmountable task. This video helped myself and my fellow students when we felt like we were in the wrong place:
https://www.youtube.com/watch?v=eqhUHyVpAwE
It may seem a bit silly but for the mind of a student, I think it is suitable.

Not sure about the video, but Imposter Syndrome was the first thing that came to mind when I read this.

I would like to add that some starter code / basic infrastructure can go a long way in helping a person who isn't very familiar with programming start typing stuff into the editor.
For example, in c++, a blank fourier_transform.cpp may look terrifying, but one with
... doFourierTransform(...)
{
    /*
        Input : This function takes as input ...
        Output : This function should return ...
    */
    //==== PUT YOUR CODE HERE ====

    //============================
}

suddenly makes it much easier to start with.
Forgive this slight piece of personal opinion... but Python might be an easier language for beginners than MATLAB

MATLAB is most likely required - it's very popular in the sciences.

It is much more common across engineers than scientists, actually.

@Pharap but Python has grown quite a bit in popularity in science the last 5-10 years (at least).

@mathreadler It's popular for beginners and certain applications, but there may well be reasons why matlab is used, like the fact it's geared around matrices so there's less need for looping constructs. Ultimately though, the powers that be have decided that students must program in Matlab and trying to convince them to switch to Python might not even solve the problem that the OP is asking about.

@AndreaLazzarotto Engineering is applied science.

@Pharap When I was at uni last time a few years ago Python with numpy, scipy and other libraries had a large upswing in several engineering departments.

Mathreadler is suggesting nothing like that, they only replied to your statement about MATLAB being widespread. Stop arguing for the sake of arguing.

@mathreadler Maybe, but A) that's just one university, which doesn't necessarily represent other universities and B) getting the university to change the language they use to Python would take time if they don't already have the facilities to use it, and even if they switched before the course is over then it might not help this particular student.

+1 To the main point here. A year ago I started using a book that came with lab exercises of this flavor ("Fill in code on the new structure here, and here..."). I does work much better than "write a program that dos X" exercises I was giving years ago.

While I don't take any issue with scaffolding as a teaching tool, I get students who've taken and passed our introduction to programming course who can't write anything starting from a bare editor. Presumably because every single assignment was scaffolded for them. So please, end the scaffolding at a some point.

I don't work exactly as a programmer, actually I am a professional software developer, hence my perspective might be a bit different. Moreover, I studied computer science so I really don't know much of the engineering side of academia (I just know it is different).
However, I did study a lot of programming (it is just a small part of software development after all) and from what you wrote I think there is something that can and should be fixed or at least can help this student a lot.
In particular, you mentioned that:

She understands the theory (because there's a pre-lab in which you write down the theory of what you will be coding in the lab, and she does well here), but when it comes to coding, she just can't get started

I might be wrong, but it seems to me you are first doing a pre-lab when they write something and then you get them right in front of a screen with MATLAB opened.
This is dangerous (and not productive) for professionals, let alone for novices.
Starting to write code without having figured exactly what your goal is and what structure it will have is like leaving for a 2-year long journey with no luggage, no money, no means of transportation and no idea of where you are going. You can probably do it but you rather wouldn't.
I can't recall how many times we were taught this when I studied programming in high school and in my BSc. Actually, they even forced us to do so. Not much during the MSc, probably they figured we wouldn't be there if we didn't already know it.
By starting directly in front of a screen one:

spends a lot of time fixing syntax while still thinking about how the solution will work
writes messy code which lacks a clear vision
feels the frustration and the pain of not having precise ideas

This can be fixed by applying the Correct Way (:P) of:

starting with a list of: provided input, output we want to get / effect we desire
writing down a step by step process detailing how the problem will be solved, or how the main function will behave, etcetera (plain English, then pseudocode as a second step)
(if it is a larger program) designing a list of different functions and or data structures, thinking firstly just what they will do, then how
finally copying the things written on paper into actual code, step by step and only at this point thinking about syntax/bugs

For small programs or scripts, professionals can usually handle designing all the code structure in their minds before starting, however it is quite hard (if not impossible) for novices or people who think they "suck at programming". I usually write down stuff for anything that will take more than 2 hours of work.
Pen and paper are the first tools that should be used for programming and also for software development especially by beginners. This approach should be pursued instead of having the students write code directly.

Side note
A different approach is usually good for becoming familiar with the syntax of a language, especially in a REPL environment. That is starting from code provided by someone else (small chunks) and trying to change the values of parameters to see what happens.
But this approach should not be confused with learning how to program. This method makes sense only in an "exploratory mode" not aimed at writing a particular piece of code.

"I don't work exactly as a programmer, actually I am a professional software developer" - A software developer is a type of programmer. (Unless you don't actually write any code.)

@Pharap yep I do write code, but a software developer does much more than programming. :)

What does a "programmer" do?

@Wildcard a programmer's job is turning coffee into code. :P Seriously, a programmer writes code for whatever reason. Statisticians are programmers given that they use R. Engineers are programmers when using MATLAB, etc. A software developer is someone who has to design a whole application structure, its database schema, the classes, the modules and so on, for a product that is going to become a finished software or app. Then the programmers can take the design and implement it, or in case of a small team the developers write the code themselves.

Assuming down-votes are "revenge" votes is a recipe for animosity. I generally don't agree with your assessment: There is nothing wrong with what you propose, I just don't think it is the best way. I teach young kids (10-13) CS and they are able to code "on the fly." The confidence to try (and potentially fail) is what is lacking in my experience. Also, the distinction you've made: programmer vs software developer, is largely semantics. Saying that R and MATLAB are the realm of programmers, not devs, comes off as elitist: "I'm not a garbageman, I'm a professional refuse removal expert".

@TemporalWolf, downvotes can be used as "I do not agree" on Meta. On the main sites, downvotes should only be used to mark clearly incorrect answers. Please check the site tour and help section for more details. Also, I did not say anything about R or Matlab being the realm of programmers. I explained that there are several people who code for important jobs that are not related to software development. I am responsible for what I wrote, not for what people think I said. And there is nothing elitist in saying that I am a software developer, I know what my job is.

As a matter of fact I used both R and Matlab while I was attending university and quite enjoyed them. But I never used them to do software development, I used them to solve scientific problems... hence I was a programmer in that context. :)

There was no malice in the choice of profession, it's just the first thing that came to mind. If you prefer: "I'm not a dancer, I'm a professional ballerina." I don't know any programmers by your definition and maybe 1 or 2 software developers. Out of dozens of people I know who hold software development jobs. The gross majority of people in our profession fall somewhere on the spectrum between what you've described.

OK. I understand what you are saying, but it seems to me that you are implying "programmer" and "developer" are synonyms, while they aren't. Yes, there are several developers who call themselves "programmers" because they do not think too much about what they do the other 50% of their time. :) Some devs in larger companies do even more thinking and even less coding.

PS: thank you for the Dilbert trivia, very appreciated.

Your student will probably not be able to pass the course this time - she is already far behind, and will be unlikely to catch up. So she may prepare for passing next time.
The problem isn't anything intellectually, it is plain and simple fear. She absolutely knows she can't program, so she needs to start without programming, or without thinking she does programming. In the end, "programming" means you type a program, the computer does what the program says, and if you type the right things, the computer does what you actually wanted.
So to try her to do this in the simplest possible way, ask her to go to https://www.w3schools.com which teaches html. It starts really easy. They show a program, you change it a bit, you click on a button and it shows the result of your changes. It doesn't look like programming ("real" programmers will say it isn't programming, but it's close enough), so the hope is that she can do this without being overcome by fear, see little successes, and improve from there.
And at some point, MatLab will not induce fear in her anymore. I hope it is possible for her to get the course materials, so she should be able to get started on her own, and then do the course next year.

Well, HTML coding is objectively not programming and won't help with grokking MATLAB (I tend to feel, subjectively, that most of the MATLAB scripts written by science/engineering students don't qualify as proper programming either (more as abacus move batching), but it's a completely different kind of “not proper programming”...) That said, this answer may still not be bad advice because HTML coding may help with a general fear of coding raw text files, which is perhaps the first hurdle.

I'm getting here late but I want to contribute a different angle. Most people are saying "tell her something and she will change" or "change her": this will not work.
Think what if they were your family. What would you do then? Like if your son refused to fold his laundry? I think there we would just have to fold the laundry together until he got the hang of it. I could do it for him every once in a while so they don't get frustrated but eventually they will have to learn to do it by themselves or it doesn't get done. Some people just don't fold their clothes, like some people just don't like computers.
It's hard to understand from our perspective but it's no less unique or special. Certainly a tough lesson for any teacher and shows the importance of a positive attitude. Even if they don't learn if you can keep a positive attitude it was still a success for the student. Hope my perspective sheds light on the situation and best of luck.


text:
Is a "lecturer" position sufficient for a career and not a temporary position? Can it ever be useful if not intended as permanent?
I am a visiting assistant professor at a selective liberal arts school for psychology, first year post-grad. I have five publications but probably won't get any offers for tenure track positions without an additional postdoc. I also am trying to find a position in which research is an element, but not the first priority of the job (which is a really narrow path, it seems).
I haven't been able to find a lot of information specifically about "lecturer" positions in US universities. I know they can come with some security and focus mainly on a lot of teaching. I enjoy teaching and would be happy to make it the focus of my career, but I am still holding on to the ideal of the tenure-track line. If I did take a lecturer position at a high-ranking school, I figure I can depend on potentially a better starting salary than a tenure line at a smaller or lower-ranked school- while it would be at the cost of career growth, would it be incorrect to assume I could just make a living that way and possibly get some job security down the line? (For example, I know there have been "senior lecturer" designations and such that seem to indicate security of employment). Or even if there was stability but no growth?
Can anyone speak to maintaining a lecturer position as a kind of permanent position? I know that they are generally term to term, or are on some contract every x years (for example one of the positions I applied to is renewable on a 3 year contract). I know that lecturer positions are not really helpful to transition to tenure-track lines focused on research, but what about teaching-focused schools? Or, even, if one just stops at lecturer?
I feel at the moment that taking a lecturer position would sort of end my tenure-track aspirations on paper, but also I don't want to end up doing term positions or adjuncting for 10 years (true stories about this have been told to me). I could do a postdoc but the return rate on those is generally later in the year, which comes at the expense of current opportunities if I get any offers. Additionally, although I'm young in my career I am already feeling myself fatiguing and I don't want to go through years of moving, instability, financial insecurity, etc. I started grad school initially thinking of the classic tenure track position, focusing on research, etc. but I didn't really enjoy the research aspect as much as I thought, so I shifted my focus to teaching (apparently not a good move). Since I don't actually know anyone who's gone in for a lecturer position or what kind of growth there is there, can anyone weigh in on their stability, enjoyability, growth etc?? And if I take it and do want to try to pursue a tenure track line somewhere else, could it ever be useful?

I'm having trouble making sense out of what you're really wanting to know.  It's a diverse but competitive market.  Apply to literally hundreds of places, take what you can get.  My impression of the perma-adjunct life-of-horror people is that it's self-inflicted: they are only willing to work within a very limited area and have access to a very small fraction of a job market that rewards willingness to move.  This is usually because of a spouse or other family, so can have a good reason, but it's still limiting themselves to 1% or less of what's out there.

Varies with institution. E.g., I have a permanent Lecturer position (with tenure-like protections) at a U.S. East coast university.

The permanence/security of "Lecturer" positions varies significantly between universities and even between departments on the same campus.

Anecdotal evidence: one of the most celebrated mathematicians in my field had a one year lecturer position as their first position.  It's not terribly uncommon if your dissertation gets finished ahead of schedule, and you need to find a position after most of the post-docs and tenure track positions are filled or already at a short list stage. I was in that situation as well, though I'm not nearly as significant or celebrated.

The context here is clearly the US system.  I'm responding based on my own experience working with people in such positions at my institution and elsewhere.
This is ultimately a personal decision.  There are certainly many institutions where instructors have been employed for decades and even reached retirement.  Having a stable job is better than having an unstable job or no job at all.
However,

Lecturer/instructor positions are not generally tenure-track positions.  You won't have the protections of tenure, and if your institution comes on hard times, you'll be one of the first to be laid off.
Although some institutions have "senior" instructor or lecturer job titles, there isn't nearly the same scope for advancement as for a tenure-track faculty member.  In particular, tenure-track faculty can advance from assistant to associate to full professor and ultimately into department chairmanship or higher administration.  In terms of salary, you're likely to be stuck at a level below the tenure-track assistant professors for the rest of your career.
Instructor/lecturers seldom get to teach any but the lowest level (remedial, developmental, and first year) courses.  You probably won't have the opportunity to teach advanced undergraduate or graduate courses.
You may not have much control over the syllabus, textbooks, etc.
Teaching loads can be very high in these positions.  There just won't be time for any professional development.
Taking one of these positions for a year or two might help your chances of getting a tenure-track position at a teaching-oriented institution (because you'll have gained some teaching experience to balance with your research background), but after you've stayed in such a position for a while (say five years), your chances of being able to move into a tenure-track position at even a teaching focused institution will decrease substantially (because at that point your research will have stopped, and even teaching-oriented institutions want some research from tenure-track faculty.)

In short, it's a deprofessionalized dead-end job.

-1 Not true in all cases. E.g., I have a permanent Lecturer position with tenure-like protections at a large U.S. East coast university.

@DanielR.Collins Your case may be an exception, but my impression is that Brian’s answer is true in most cases...

You may not have much control over the syllabus, textbooks, etc.  Possible.  On the other hand, my experience has been that full-time lecturers often "own" lower-level classes, and become responsible for selecting textbooks, developing syllabi, supervising and coordinating other instructors, implementing significant changes where warranted, etc.  This may or may not be a good thing, depending on your point of view.

-1 The professionalism, control, workload, security, advancement opportunities, and respect attached to "Lecturer" (or "Teaching professor") positions vary significantly among different universities and different fields.  Yes, in many departments lecturers are disposable cogs with ridiculous workloads, but definitely not in all.

I'd certainly be interested in seeing examples of how some institutions have structured these positions so that instructors have opportunities for salary, career advancement, professional development, and participation in shared governance that are comparable to the opportunities available to traditional tenure track faculty.  Knowing what kinds of policies to look for could help the OP and others in navigating the job market.

I don't think this is especially common in the U.S., but I do know of some R1 universities that have a position known as "Lecturer with security of employment", where the salary, difficulty of getting dismissed, and sabbatical opportunities are all comparable to that of a tenured professor, but you aren't expected to do any research but only to teach. Pretty good job if you can get it.

Actually "Professors of the Practice" as they are called, are probably required to do research, but of a different sort. Pedagogical research, for example. Or at least those of my acquaintance in CS do, in fact, do quite a lot of research and have wide reputations. At Duke, CMU, Stanford, etc.

@Buffy It probably varies from place to place. According to this document UCSD explicitly does not require their "lecturers with security of employment" to do research, but does encourage it. (It's recognized as a sign of "professional achievement and activity", one of their performance evaluation criteria.)

@Buffy No, those are different. I had a (fantastic) lecturer with security or whatever they were called. Professors of practice are usually people with a lot of industry experience

This is going to vary widely between fields and institutions.  There's a very prominent example of someone making a (partial but non-trivial) career as a lecturer, however:  Barack Obama
He was a Lecturer at the University of Chicago Law School from 1992-1996, and then a Senior Lecturer from 1996-2004.  The University of Chicago happens to be a top-tier institution that makes extensive use of lecturers.  The junior positions pay very well, but do not involve any administrative or governance elements.  The senior position does.
To answer your question as generally as possible, it's my impression that a lecturer position like this will lag behind a tenure track position within the same department, but can easily meet or exceed the pay and benefits of a tenure track position at a smaller school.  If anything, the lecturers seem more likely to be teaching in specialized areas, since they often have professional experience as well as academic.  The full-time version is nothing at all like temporary adjunct positions, though UofC does also have part-time lecturers who are closer to that.
So while Brian's blanket answer that it's a "deprofessionalized dead-end job" is wrong, it is very true that the real answer will vary widely by institution.

source: Stack Exchange

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

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

sort: votes


text:
How do I tell my teacher I want him to be co-advisor but not advisor?
I am currently a master student at university A after having done my bachelor at university B. The class sizes are small in this field, so I am quite close to teachers at both universities. I want my old teacher at university B to be my advisor in my future PhD, because the research I intend to do fits slightly better with his own work, and he will be much better at advising me with other directions of research (based on my experiences so far). However, my current teacher has a lot of knowledge in some subfield which will be relevant for at least part of the research project, so my intended advisor and I would like him to be participating as co-advisor.
How do I tell my current teacher I want him to be co-advisor? I think he expects to be my main advisor and obviously want to remain on good terms.
Note: I have seen How do I tell my current research advisor I want to work in a related field with another professor?, but I feel this is a more complicated situation since I still want my current teacher to participate in the project.

Where will you be enrolled for your PhD studies?

@aeismail at my old university (B).

Usually, it is not a good practice to have the same advisor both for your master's degree and PhD. Did you think about collaborating with your former advisor and having your current professor as your PhD advisor?

@padawan it is the intention I return to the professor of my bachelor, with the professor of my master only as second advisor. I don't want to have my current professor as advisor, because I think I will learn more methodologically from the other one. I'm doing my master with this one because the programme fitted better. Out of interest, because it's not what I intend to do, why is it not good practice to have the same advisor for the master and the PhD?

This is totally my opinion, but you learn a lot more by working with different people. At some point, you will have to move out of your comfort zone, and this might be the correct time.

I don't know if there is some kind of recipe for doing that.
I think that the main point in your question is about the feelings of the involved advisor and co-advisor. If they are as professional as I suspect, then you just need to explain to both advisor and co-advisor the situation, and probably they will agree with your decision, or better, they can point out things that you haven't see yet.
I think that the key point in this process is avoiding the feeling of being "betrayed". This could be achieved being transparent with both parts. Maybe you must appoint a meeting with both advisors.
Finally, I'm not aware of the actual rules of the Universities A and B, but in the case I know (Universidad de Buenos Aires) the advisor and co-advisor have the same level of responsibilities, being the "co-" thing because you need more than one "mentor". In such case the co- thing is a trivial issue that could be easily agreed by the parts

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


text:
Why does a copy editor count the number of characters on a line?
I got my paper back with remarks of the copy editor. One annotation counts the number of characters in a line. I have been told to ignore it, but I am still interested to know what it is for.
On the bottom of the page, the copy editor wrote: "73 × 39 × 27 → 25p.". 73 is the number of characters, 27 is the number of pages of my manuscript. 39 is the number of lines per page minus 1. It seems to be a calculation for the final number of pages (judging from the "p.") but I don't see how that figure would be calculated by multiplying these values.
I am using a template provided by the journal.

Odd. I've copyedited lots of manuscripts but never ran into this notation. Can you tell if the copyeditor is an employee of the publisher or if the publisher outsourced the copyediting? If the latter, a possibility is that the rate the copyeditor is charging is based on the number of characters. This would be rather unusual though; most charge by the number of words.

@Allure I'm not sure, but I think he is an employee. It may be an ancient notation. With the scanned annotations, I got a second file summarising the comments. That list was written on an old school typewriter and scanned as well!

73 x 39 x 27 would give an estimate of the total number of characters in your manuscript.  They presumably have some standard estimate for the number of characters that fit on one page in the final format, and they've divided by that number (not shown) to get 25 pages.
I can't think of a good reason to subtract 1 from the number of lines per page (unless one line is obviously a header or something) so I'd wonder if they just miscounted.

Maybe I miscounted. Yes, this must be it. My 27 is higher than 25 because of more figures than usually, I think. Thank you, my mind has been put to rest.

Just brainstorming... If you subtract 1, you get the number of interline spacings that appear in your article. That may be useful, for instance, if you submitted your article with double spacing and they want to know how much space they would save if they switched to single spacing, or if they want to make the spacing larger or smaller. But I realize that's not a very common use case, so that's probably not the correct justification (ha).

A common rule of thumb is 3000 characters per single-spaced page. Applying that to the numbers you've given would work out at 25.6 pages, consistent with the CE's estimate depending on how you choose to round.


text:
Is it okay to ask someone for an (electronic) copy of their PhD thesis if it is not available online?
I am a PhD student and recently I came across a researcher who is currently an assistant professor. I don’t know them. But I want their thesis, which is currently not available online. I want to know details of their work.
Is it okay to ask an unknown professor or researcher for their PhD thesis via email?

You can get it from library?

It is not available in my library.

It's similar to asking for a paper, which is usually fine, but you should add 1 or 2 short sentences on the context of your request, e.g., you started working on a particular topic for which his thesis appears very relevant.

Get it from the Proquest Dissertations database.

@AnonymousPhysicist good luck finding dissertations from outside the US on that.

@DSVA I've found several dissertations from outside of the US on Proquest.

@MadJack well, several isn't that much. For example in my country universities publish those free of charge on their own website, you won't find those on proquest. Proquest is heavily used in the US, not so much or basically not at all in other countries (the idea to put those behind paywalls is also quite stupid imo). Just look at the "Most-Accessed Dissertations and Theses" list for december 2018. Some from canada, one from the UK, everything else is US. They even label them with the country but only if they are not from the US.

@lighthousekeeper - This is an important point of etiquette and worth an answer.

@DSVA Fair point. (I should point out, though, that I use Proquest not as one-stop-shop for dissertations but rather in addition to going directly to university dissertation archives / other venues.)

I do not think that I saw that  in the answers, so just for the record : he or she may not have a soft copy. I did my PhD in LaTeX in 2000 and lost the source since then.

Yes, it is completely fine to ask them, but before you do, it helps to be aware of a few things:

In many if not most fields and countries, PhD theses are somewhere between

a recompilation of previously published papers with an introduction and a conclusion and possibly with some additional content that did not fit into publications,
just a collection of published papers.

This is particularly likely to apply if the thesis is not to be found in a published form.
So, the more important results of a PhD work are likely to be published.
This doesn’t make it invalid to ask for the thesis, but it may be worth checking what that person published during their PhD time before asking.
This way you can establish whether you are actually interested in the thesis and what parts you are interested in.
Depending on the field, it is rather uncommon that somebody is really interested in an entire thesis, and not just a certain aspect.
Hence a more specific request including why you are interested in the thesis or what specific aspects you want to know about is more likely to gain you what you need.
Usually, the author can directly tell you, which chapters or sections are relevant to you.

For example, the most interesting content that is exclusive to my thesis is a brief review of the general topic in the introduction.
The requirement of publishing my thesis was waived because all essential parts were already published.
If somebody wrote me a mail just asking for my thesis, I would ask them what part or aspect they are interested in and then send them the corresponding paper(s).

In addition, ask your librarian how to find PhD theses: e.g. over here, they are usually available, but the "distribution channels" are different from those for papers (search e.g. in the national library and/or university library where the thesis was done). And while boilerplate theses in extreme cases report nothing that wasn't in the stapled papers, many other theses (like companion technical reports to a paper) contain interesting details that are not in the papers.

@cbeleites - Good point.  I suggest, Wrzlprmft, you add to answer: check with librarian first.

@aparente001: It doesn’t really address the question, which was not about how to obtain a thesis, but how to ask for one. It’s fine as a comment, but that was already made.

In addition, some might no longer have a soft copy of their PhD thesis. Having written my thesis almost twenty years ago, at some point I had stopped backing it up along the years.

I would contest the claim that 'most' theses consist of material that's available elsewhere - and, even if true, the thesis can contain additional material / be phrased in a different / more expositional way / be easier to read / etc. than the published papers. Academia is a varied place, and there's plenty of fields (and countries and epochs) where the expectation is/was that significant effort go into writing text that's specific to the thesis.

If the author of the thesis has later published papers on the same material and prefers that readers refer to and cite the published papers, then you should take the time to find this out and respect that wish.

@E.P.: there's plenty of fields (and countries and epochs) where the expectation is/was that significant effort go into writing text that's specific to the thesis. – right, but that tends to correlate with a requirement to publish the thesis. For example, what you describe is still common in my alma mater, but in that case the thesis must be published online. The only reason why you cannot find my thesis online is that it does not do this.

'Tends to correlate' - is that based on an actual statistical survey? I just don't see the need to mention words like 'most'. There's plenty of unrelated reasons why universities might not publish theses online (my own alma mater does not make available 'old' theses from before 2008 or so simply because they were submitted before they standardised to CC BY-NC and they don't have a signed agreement from the author, even if they do have a pdf). The information your 'many if not most' offers over 'some' is dubious at best and it's not needed to begin with.

Is it okay to ask an unknown professor or researcher for their PhD thesis via email?

Yes.
I did it a lot and always got the thesis (or any other kind of paper) sooner or later.  Typically, you are also likely to get a positive answer if you ask politely and provide the author with the details on why you need the thesis.  After all, the author wishes to promote his or her name.
In certain rare cases, you'd get a negative answer:

Thesis contains classified information, and you are not allowed to read it (e.g., you are in the US and asking a Russian for his/her dissertation on ICBM-related technology).
The thesis has low quality. ("I wrote it late at nights.")
The thesis is old and available only in print, so sending it would take more than 5 minutes.
The thesis is lost and even the university library does not have it any more.
The author lost interest in research.
The author is busy and you seem too unimportant to bother to answer.
The author wants to get the thesis published first and only then share it. (Thanks to @greenb.)

Again, all these cases are rare.

In the disciplines where the PhD thesis usually comprises unpublished research (like in the humanities), another common reason to refuse is that the author is transforming their thesis into a publication / a set of publications and doesn't want to share the work until it's published (or doesn't want to share the material gathered in the thesis for other scholars to study until their own analysis appears in print). But it's always worth asking


text:
Ought mainstays (people recurring in a piece of academic writing) be abbreviated?
Presume that these mainstays (even if their names are short) can all be named publicly.
I fancy referring to them only with my abbreviations that I introduce on the first page, to save space and avoid typos, like for long surnames (e.g. some Indian, Polish, and Russian mathematicians).
E.g., I'd state my abbreviations of Iannis Xenakis as IXS, Jean Barraqué as JB, and Per Nørgård as PN (I chose the latter because  of its 2 accents). Then  I'd write:

IXS won the Polar Music Prize in 1999, but fewer prizes than PN. JB won none.

Please note that aside from the issue of abbreviating names, the grammar of your proposed sentence is abysmal.

@BenVoigt 'the grammar of your proposed sentence is abysmal' How? I adedd a missing word.

One word makes a huge difference.  It still is somewhat inconsistent, though.  The introductory sentence mentions a prize by name, not how many.  But the conjunctive clause talks about the number.  In context, that's ambiguous.  Fewer prizes the same year?  Fewer years winning the same prize?  Fewer when both year and prize are varied

I've never seen this in academic writing, ever.  At minimum it will be confusing, and some people might find it rude to obscure people's names like this.
Don't do it.  Just write out the surnames on each reference.  If they're long, so be it.
If your main goal is to avoid keystrokes and typos, use an autocomplete or "abbrev" feature of your word processor or text editor, or some sort of macro expansion.  But don't impose it on the reader.
(I think in some fields it might be acceptable to refer to authors of the paper this way.  "One of us (NE) previously investigated this question..." And in some cases, you see initials used to refer to individuals who are anonymous, such as patients or  study participants.  "R.Z. is a 59-year old female who presented with shortness of breath..."  But I've never seen initials used for non-anonymous third parties as you suggest.)

Agreed, with a footnote: abbreviations like this are sometimes used to refer to standard works, like LSJ for the Liddell-Scott-Jones Greek English lexicon or BDB for Brown-Driver-Briggs. But those would be journal guidelines, you don't usually introduce your own. Also, if you use a reference manager the accents shouldn't be an issue.

@Nate Thanks for the savvy observation in your last para. I added a 1st para. to address this.

When journals require a list of "who did what" these abbreviations are often used . (AB derived the experiment design, CD and EF conducted the experiments, GH helped with statistical analysis,...)

I agree 100% with Nate's response, but I'd like to expand on why it might be considered rude to do this.
I don't speak Danish. If I'm citing a researcher with a name like "Nørgård", it's probably because our hypothetical Dr. Nørgård spent many hours learning a second language and went to the trouble of publishing their research in English. They may even have paid a translation/editing service to help with that.
I find it tough enough writing or understanding academic papers in my own language (English). That so many researchers do it in a non-preferred language is a massive gift to me. Taking the trouble to figure out how to write (or paste) "Dr. Nørgård" is a very small way to remind myself of that gift and to express my respect for their effort.


text:
Changing the main topic of research
I started my PhD about a year and a half ago in an area that I will call A, which is quite applied. I've been doing a lot of programming and coding, and although I've learnt a lot and we've been doing some progress recently, I strongly feel that I haven't got any important result worth of appearing in a doctoral thesis. Even when we complete our current project (something that, I hope, is going to happen already in the near future), I won't feel like I've done any truly significant/original work. It is a nice work, but we've spent way too much time in a problem and we just don't have many results or important conclusions. I've been working on developing methodologies and improving little things, but I haven't got any concrete scientific result yet.
However, in the last 4/5 months we started thinking about a different problem (in collaboration with another professor) in a different area, B. B is a more theoretical area, and although A and B are loosely related (and ideally our work in B would be at some point applied to our work in A), they are very different topics. The thing is that I'm very happy with our progress with B, where recently I finally managed to do some hard computations and reach some interesting results with which I'm quite satisfied. Now, I feel that continuing our work in B could be really fruitful and -since we already have several ideas and plans- could soon yield some very interesting stuff. In combination with what I have already achieved, I definitely deem this work worthy of a doctoral thesis.
The problem is that B was, at least initially, a side topic, and my grant and my initial doctoral project was clearly associated to A, but not B. Working in A I feel like I'm stuck: yes, I write code and I do stuff which is sort of important, but I am spending a lot of time in something that it is not yielding very relevant results and that I don't think is going to give enough material for a thesis. However, A is like my main topic and I can only spend bits of time working on B once in a while.
That's why I've been thinking about the idea of discussing with my thesis advisor the possibility of changing my main research topic and start focusing on B, while keeping A as a side topic. He is a very nice person and has always been helpful and supporting, but I fear he is not going to take it well, since he clearly has more interest in A and has always thought of B as something nice but that "shouldn't distract me too much".
Maybe I should just accept things they way they are, or does it make sense for you to talk freely about my concerns?  I don't intend to fight or anything, but having at least a conversation about the whole thing would be nice.
Any similar experiences to be shared?  Ideas?

Discuss with your advisor...

There's only one thing to do here, and it is having a talk with your thesis director. He's most likely the best qualified to :

answer your worries with A being not valuable enough and if it's worth pursuing
assess the scope of the grant and the leeway you have with this

Doing a thesis on a subject is a commitment. Don't give up because you 'feel' it's going no where, prove it's not going there first. Also, finding similar results in different initial conditions, while not exciting regarding finding the next innovative thing, is not necessarily worthless. It's good to have results doubled checked/confirmed, found by other methods, or  if another result is expected, the work also serves as excluding things that don't give this expected result. Which is a result by itself.

Thanks for reading and for your contribution! I'll ponder on this


text:
Citing page numbers of unpublished work
The journal I'm writing a paper for has an author-year-like citation style which includes page numbers. For instance: "... by Doe (2018, 58) ..."
I now want to cite unpublished work. The bibliography entry has "To appear in Journal X". The exact issue number and page numbers are unknown. As far as I can see, this means that I can only use imprecise references (only year, no page number) to this article. Or is there another way? The paper I want to cite will appear in a journal that does not number sections.

That is not the most important issue. Are you sure that the paper will be published? Or did the authors maybe only sent it to the journal and it might still get rejected or withdrawn? How can a peer reviewer access that unpublished paper, how can he be sure that it is correct (given that it maybe didn't even go through peer review yet)? How can you know if the published version will be the same as the one you have? In short: avoid citing unpublished work if possible, and if you really need it, make sure to deal with the questions above (e.g. by contacting the authors).

@DirkLiebhold thanks for the useful comments. The paper I want to cite has been accepted, it is just not sure in which issue and on what pages it will appear. I did not take it from the arXiv or so, but prepared my paper while in touch with the authors of the paper I want to cite, and they gave me theirs because it was relevant. My paper has been accepted as well (the cited paper is not vital to understand/review mine), we're just finalising issues like these now. (The editor did not ask me to add page numbers, but I was just wondering if it was possible to be more specific.)

Is there a preprint version somewhere? If so and it contains what you want, and isn't likely to change, cite that.

@DavidRoberts there is no preprint or PDF proofs. I/the authors only have a version on A4 with page numbers starting from 1. But I think you can expand your comment into an answer, as it may be helpful to others in a slightly different situation.

There are two options. Cite without page numbers (I mean, that's how you do posters, flyers, or artwork) or cite section or paragraph numbers.

If there is a preprint version online, and you are certain that what you want is going to appear in the published version, cite the accepted version (to appear etc), but also include a mention of the preprint, where to get it, and where the specific thing you want appears in the preprint. If you know something because the author has shared with you a version of the accepted manuscript it might be worth noting their input, something like "the authors have kindly shared the accepted version of this paper, the relevant material can be found in the preprint version at [address] on page [blah]". It's not as snappy as author-year-page, but it will do what references are supposed to do: point a reader where to find information. Practices like removing titles from bibliographies, compressing not over-long author lists to "Aarons et al" and so on are hold-overs from days when publishing was only on paper, and typesetting was by mechanical means, and expensive. Pixels are cheap. If you have to "break" a rule of citation style to make the citation clear, then that is no crime.
If the publisher allows it, please consider asking the authors politely if they can post a version of the article in some repository at its closest-to-published state (is this in an arXiv-using subject? I can't tell if this is the case from your question). Most publishers have some threshold where they are happy for this to be done, even if only under an embargo. Remember: the literature is for posterity, so if next year someone wants to check their paper after reading yours, it can be available, even if it is not publicly accessible on the open web right now.
Also, there's not much wrong with citing page "n of m" where m is the total number of pages of their article, because people can count, and will infer where in the officially-numbered version you mean.