How can a TA help a student who is certain she sucks at programming?

147

24

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.

convexityftw

Posted 2018-01-16T20:51:44.590

Reputation: 3 355

78You may be interested in [cseducators.se]. – Keelan – 2018-01-16T21:27:13.993

1

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

– aeismail – 2018-01-19T00:13:11.750

6My response would be: "I wasn't good at it either when I started." – Dom – 2018-01-21T11:05:28.193

3@Dom or a natural extension of that, "almost no one is good when they start" – None – 2018-01-21T18:01:59.470

4Have 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? – Mehrdad – 2018-01-21T22:42:35.077

Answers

233

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.

B. Goddard

Posted 2018-01-16T20:51:44.590

Reputation: 3 443

77Upvoted 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. – Kevin Krumwiede – 2018-01-17T04:12:54.640

31As 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. – WernerCD – 2018-01-17T15:26:01.193

66Agreed, 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. – NOP – 2018-01-17T19:44:03.490

4As 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. – JohnEye – 2018-01-18T00:36:19.000

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! – Layna – 2018-01-18T10:45:44.743

38I 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. – Kevin – 2018-01-18T16:32:15.197

2"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. – Anonymous Physicist – 2018-01-18T21:50:07.803

21All teachers are in the psychology business. It's not just a counselor's job. – jaia – 2018-01-18T23:56:59.183

2Can 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. – jpmc26 – 2018-01-19T18:15:02.843

1@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. – Anonymous Physicist – 2018-01-21T05:31:27.447

1@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 – 2018-01-21T06:15:26.750

1>@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). – Anonymous Physicist – 2018-01-21T10:22:28.203

2@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 – 2018-01-21T14:39:33.023

1@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!!!!" – B. Goddard – 2018-01-21T14:54:36.377

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 – 2018-01-21T14:56:43.960

1@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 – 2018-01-21T15:02:19.810

1@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. – B. Goddard – 2018-01-21T16:13:30.020

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! – Anoplexian – 2018-01-22T19:43:35.270

1

Vaguely related: I wrote and answer about understanding that you're not alone in being less that perfectly qualified as a coping mechanism for imposter syndrome.

– dmckee – 2018-01-22T20:44:44.623

56

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.

aparente001

Posted 2018-01-16T20:51:44.590

Reputation: 32 080

46"[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. – aeismail – 2018-01-16T22:35:55.707

4I 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 – 2018-01-17T01:00:46.130

2@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? – aparente001 – 2018-01-17T01:07:24.307

@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. – aparente001 – 2018-01-17T01:08:35.620

30@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. – aeismail – 2018-01-17T01:13:10.277

@aparente001 You could certainly make the pseudocode a “stepping stone” on the way to the final assignment. – aeismail – 2018-01-17T01:15:12.587

2@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. – Baldrickk – 2018-01-18T16:11:38.280

1You should not suggest that an unqualified person try to provide therapy. – Anonymous Physicist – 2018-01-18T21:52:33.600

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.) – jaia – 2018-01-19T17:52:44.223

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 – 2018-01-21T20:06:31.383

@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 – 2018-01-22T05:06:22.387

@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. – cybernard – 2018-01-22T12:43:09.260

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 – 2018-01-23T12:18:46.397

@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. – aparente001 – 2018-01-23T22:33:25.857

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. – Joel Coehoorn – 2018-01-24T18:30:30.393

35

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.

Daniel R. Collins

Posted 2018-01-16T20:51:44.590

Reputation: 15 147

8I 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. – Elizabeth Henning – 2018-01-17T22:29:39.130

1@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. – mtraceur – 2018-01-18T19:18:25.663

11Referring 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. – Anonymous Physicist – 2018-01-18T21:47:57.733

3

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

– jaia – 2018-01-18T23:55:21.550

20

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

Kevin Krumwiede

Posted 2018-01-16T20:51:44.590

Reputation: 309

3Typically 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. – Mad Jack – 2018-01-17T15:29:43.023

11@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. – Mr.Mindor – 2018-01-17T22:10:00.747

6Most 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. – joojaa – 2018-01-18T10:20:50.403

5Also, 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. – Andrea Lazzarotto – 2018-01-18T19:45:42.143

4I 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...) – Josef – 2018-01-19T12:18:20.977

1@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. – Kevin Krumwiede – 2018-01-19T19:19:38.947

@AndreaLazzarotto 3D graphics programmers do. That's about it. – Kevin Krumwiede – 2018-01-19T19:28:02.873

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. – TheoreticalPerson – 2018-01-23T11:32:26.893

16

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.

Konrad Höffner

Posted 2018-01-16T20:51:44.590

Reputation: 751

7"there is a CPU and it executes instructions in sequential order " If that were true, we wouldn't have Meltdown. – Acccumulation – 2018-01-18T19:51:30.903

2Well I would begin with a simple model and do the nitty gritty later. – Konrad Höffner – 2018-01-18T19:54:44.733

6@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. – Peter Cordes – 2018-01-20T02:13:38.503

2It'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. – Chan-Ho Suh – 2018-01-20T17:53:55.913

14

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:

  1. "why can you not start?" (nod and ignore if she repeats the same phrase)
  2. "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?
  3. 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.

CPHPython

Posted 2018-01-16T20:51:44.590

Reputation: 249

3This 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. – Chill2Macht – 2018-01-18T18:18:22.400

3+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. – mtraceur – 2018-01-18T21:01:40.917

1I 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. – Pharap – 2018-01-19T01:03:15.073

9

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:

Empty box

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

Box with air pockets

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

Box filled in

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.

Luke Sawczak

Posted 2018-01-16T20:51:44.590

Reputation: 232

1This sounds like a rediscovery or reframing of mastery vs. performance orientation in goal theory. (All searchable terms.) – Kevin Krumwiede – 2018-01-19T19:31:10.100

2I 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). – Kolaru – 2018-01-19T20:41:09.710

2

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.

– TemporalWolf – 2018-01-19T23:07:38.000

8

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.

  1. Start interacting with her in your usual way. Wait until she says, "I suck at programming".

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

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

  4. Go to the next simplest line. At this point, you're not going for a fully working program, just incremental development.

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

jaia

Posted 2018-01-16T20:51:44.590

Reputation: 1 125

22"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. – Chris Martin – 2018-01-17T18:30:32.457

1Not 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 – 2018-01-17T18:55:46.910

6@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. – Baldrickk – 2018-01-18T16:19:56.593

6I 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. – Chill2Macht – 2018-01-18T18:16:37.377

6@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." – Ray – 2018-01-18T19:54:42.143

2The 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. – mtraceur – 2018-01-18T20:43:45.567

1(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. – mtraceur – 2018-01-18T20:50:14.527

6This is insulting and probably harmful advice. – Anonymous Physicist – 2018-01-18T21:56:00.840

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. – jaia – 2018-01-18T23:53:02.487

2

@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

– Daniel R. Collins – 2018-01-19T17:37:47.793

@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 – 2018-01-19T18:28:26.963

@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. – Daniel R. Collins – 2018-01-20T22:47:25.323

@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 – 2018-01-21T23:12:55.140

@Ray: "most people struggle initially but get it eventually" is not the same as a universal "Eventually, it'll click". – Daniel R. Collins – 2018-01-21T23:45:22.263

2@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." – Ray – 2018-01-22T01:54:21.950

8

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.

Crowley

Posted 2018-01-16T20:51:44.590

Reputation: 1 607

1Don't teach for looping to anyone who should be learning Matlab. – mathreadler – 2018-01-19T22:32:19.170

7

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.

dowskee

Posted 2018-01-16T20:51:44.590

Reputation: 71

2Not sure about the video, but Imposter Syndrome was the first thing that came to mind when I read this. – Marianne013 – 2018-01-17T13:45:38.973

4

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

Woofas

Posted 2018-01-16T20:51:44.590

Reputation: 386

1MATLAB is most likely required - it's very popular in the sciences. – Pharap – 2018-01-19T01:06:34.330

It is much more common across engineers than scientists, actually. – Andrea Lazzarotto – 2018-01-19T13:03:59.950

@Pharap but Python has grown quite a bit in popularity in science the last 5-10 years (at least). – mathreadler – 2018-01-19T22:33:46.817

@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. – Pharap – 2018-01-20T10:12:16.403

@AndreaLazzarotto Engineering is applied science. – Pharap – 2018-01-20T10:20:31.653

@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 – 2018-01-20T11:25:37.550

Mathreadler is suggesting nothing like that, they only replied to your statement about MATLAB being widespread. Stop arguing for the sake of arguing. – Andrea Lazzarotto – 2018-01-20T12:55:49.570

@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. – Pharap – 2018-01-20T12:59:34.777

1+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. – Daniel R. Collins – 2018-01-20T22:55:53.700

1While 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. – dmckee – 2018-01-22T21:01:50.240

2

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.

Andrea Lazzarotto

Posted 2018-01-16T20:51:44.590

Reputation: 1 120

1"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 – 2018-01-19T01:08:20.737

@Pharap yep I do write code, but a software developer does much more than programming. :) – Andrea Lazzarotto – 2018-01-19T01:45:00.133

1What does a "programmer" do? – Wildcard – 2018-01-20T02:04:17.763

1@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. – Andrea Lazzarotto – 2018-01-20T12:53:04.283

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 – 2018-01-22T19:40:01.723

@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. – Andrea Lazzarotto – 2018-01-22T20:30:58.450

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. :) – Andrea Lazzarotto – 2018-01-22T20:32:14.273

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.

– TemporalWolf – 2018-01-22T21:54:29.583

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. – Andrea Lazzarotto – 2018-01-22T22:49:00.910

PS: thank you for the Dilbert trivia, very appreciated. – Andrea Lazzarotto – 2018-01-22T22:56:35.573

1

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.

gnasher729

Posted 2018-01-16T20:51:44.590

Reputation: 1 154

1Well, 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. – leftaroundabout – 2018-01-22T17:30:59.957

0

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.

mk mcmahon

Posted 2018-01-16T20:51:44.590

Reputation: 35