Wanted: Advice from CS teachers
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
Present them or a piece of code and tell them this piece code has a problem with it and ask them to figure it out if you can find a fun thing all the better.
Have them perform a code review and look at code and say well figure out the failure modes of this piece of code.
I would actually have code refuse be part of your class.
-
@futurebird I'm also interested how to add LLMs to the mix: how to use them in a way we use IDEs now: we still know how to program/read code, but IDEs are so useful.
This will add another level to the me/them, where sometimes I'd want them to use LLMs, other times not.
But first I need to convince the school it's a good approach: I'm an external teacher, and as such have very little influence...
@ligasser @futurebird i'm interested, but very skeptical as well. Before the LLM craze, I was working through the CS50 Intro to CS class that Harvard offers online for free through OpenCourseWare. Even back then, they offered a rubber duck debugging program that you could type your questions to. And back then, I don't think it did anything except quack. But today, I would be curious what it does because I suspect they would try to use LLMs.
-
My students aren't lazy, but they *can* be a little perfectionist: scared to take risks or sit with not having the answer right away.
They are really upset when their code won't run... but staying calm and *systematically* looking for the cause of the problem, knowing that if you just work through the tree of possible causes you will find it is not something they are good at.
I think I need to teach this.
Maybe I will give them some broken code and we will find the errors together.
@futurebird
Teach The Ten Commandments of Egoless Programming. Especially "you are not your code" and "kindness to the coder, not the code"
Managed Coder: Advice to a New Programmer https://share.google/ahp9eb3GQvBOIfo8bTeach paired programming, giving everyone a coding/debugging buddy. This is one of the most effective ways to level set coding standards and skills. Students learn from each other. It also prepares them for more public code reviews.
-
@futurebird I know what you mean, and you're perfectly right when it comes to sane programming languages. However, C++ compilers have a habit of spewing out error messages the size of a Tolstoy novel in response to mistakes as trivial as a missing comma. Now I assume you're not teaching the kids C++ as that would be quite irresponsible.
@mansr @futurebird my highschool programming class was C++ based, but it was a joke. It was paint by numbers and we didn't learn programming.
The main thing I learned in that class was that Gmail existed and my classmates sent me an invitation to use it. Because he was checking his email during class time.
-
@AbramKedge @futurebird I do this (in the context of a different academic subject) with "bad" essays, where we work collaboratively to find errors and redraft improvements. Hope it's effective for you.
@MintSpies @AbramKedge @futurebird when I was taking cartography classes our teacher would put up student work on the board but with the names removed and we would discuss it together. We didn't know if it was folks in our class or previous years and it was really helpful especially when you saw your own work up there and other people were kindly pointing out their suggestions.
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird Are you familiar with the work of @Felienne ?
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird
I teach physics, but I know what you mean. I usually start by saying that 500 years ago ppl. like Leonardo da Vinci would easily have understood how the (classical) physics of a modern car works, but they would never have believed we could manufacture the parts with such precision. So the class is more about error control than new concepts.I also remember it being quite a mental leap for me as a student.
-
@futurebird have a look at some of the stuff Phill Bagge wrote about Learnt Helplessness https://philbagge.blogspot.com/2015/02/eight-steps-to-promote-problem-solving.html?m=1 and ways to work around it. I remember him doing lots of related work on it about 10 years ago.
@DavidAmes @futurebird note however that the term is misused here (and elsewhere) -- learned helplessness is a clinical term describing people no longer attempting things that have previously gotten them punished (usually physically hurt), even if that response is no longer present. https://en.wikipedia.org/wiki/Learned_helplessness This is often an explanation for seemingly illogical behavior in people who've endured abuse, and it's frustrating that the word is now being used to shame people for exhibiting the behavior! I point this out not as a criticism of the blog piece but in hopes that we use different terms going forward.
-
@futurebird "This never happens when I'm teaching math. Something about coding makes them forget some of their manners"
My take -- it's GOAL-ORIENTED. Maths is modelling, descriptive. Δ🧠-states
@wavesculptor @futurebird what does change in brain states mean in this context?
-
"I have the exact same thing as you but it's not working"
99 times out of 100 no, no you do not have the "exact same thing" you've made a typo.
Because the whole point of it being a computer is that if you have the exact same code it always does the exact same things.
@futurebird @freequaybuoy "works for me/on my machine"
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird I think someone else already mentioned teaching it backwards.
Start with working code - a small program that fits on a page, it doesn't really matter what it does.
Then give them the same code with a single syntax error - tell them it's broken and have them discover what the issue is. Keep going until they can find most of the problems easily, by looking at the error messages.
Teaching programming is damned hard in a classroom setting - I'm old enough to have learned programming in uni, and class time was for lectures, homework was the programming (in a lab where you could get help).
After they are good at syntax errors, move on to bug hunting.
I know, it sounds boring, but I am sure you can come up with some kind of ant related game to make it fun ;-)
We need a new way to teach programming because many of the existing methods don't work. Or we need to understand why it doesn't work with school age kids and whether we should be teaching them programming instead of something else
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird back in 1984, during my first computer class in high school, I can totally recall all of us students being the exact same way. Only difference was, the teacher would say "questions at the end" or ignore people calling out, and just get on with the entire lesson. Seriously.
And when it came to the walking around part, all you got was questions about what you were trying to do, or questions to make you think, you NEVER got the work done for you.
That was actually a fun teacher.
-
@futurebird You probably already know @b0rk‘s Pocked Guide to Debugging. The thing I love so much about it is how she cherishes the bug, instead of squashing it (in the illustrations too). I love this attitude. Not sure if students can learn to think that way? There is a beautiful poster too:
📰 https://wizardzines.com/zines/debugging-guide/
🖼️ https://store.wizardzines.com/products/poster-debugging-manifesto
@hoertauf @futurebird @b0rk +1 for pretty much anything by Julia Evans.
-
@wavesculptor @futurebird what does change in brain states mean in this context?
@semitones @futurebird rather than eeg-waveforms, I'd think hunting-defending vs. socializing-exploring. one's polite, the other's time and response critical, manners dont matter. think of a cat doing these different things.
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird
I just made it a rule that they had to give it the old college try before they called me. I don't remember if I had any formal time limit or number of tries or anything. Probably not. I also encouraged them to help each other, with the caveat that they needed to make sure the person they were helping understood the help. And I really really emphasized asking for help when they needed it, after giving it the old college try, of course. -
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird An old mentor of mine introduced me to a useful acronym: KMAFYOYO
'Kiss My Ass Fella, You are On Your Own'
It is even phonetic.
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird Maybe give them a homework assignment: Pay close attention to how many times in a day you hear somebody misspeak and correct themself, no matter how small it is. We all do this a lot, but it happens so fast and so often that we rarely notice.
When it happens in a computer program, we call that a bug. But the computer won't have the zillion shared context clues that human language enjoys. It can't work out what you mean by itself. And it has very limited ways to ask for help.
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird @nicklockwood to me that’s one of the fundamental truths of programming (or doing real math or science). Most of the time you’re wrong and trying to figure out how to fix it or address it. We do t spend much time on our successes we go on to the next thing that isn’t working. So I agree with your thoughts
-
Wanted: Advice from CS teachers
When teaching a group of students new to coding I've noticed that my students who are normally very good about not calling out during class will shout "it's not working!" the moment their code hits an error and fails to run. They want me to fix it right away. This makes for too many interruptions since I'm easy to nerd snipe in this way.
I think I need to let them know that fixing errors that keep the code from running is literally what I'm trying to teach.
@futurebird
Thank you for asking this. It made me feel useful, and brought back good memories now that I'm retired. Something else it made me think of was students' reaction when I'd come over to help with a problem they'd been struggling with for a while and point right at it. They would be all amazed and say how did you do that, and I'm like, well I've seen it hundreds of times. 😄 -
I think they become anxious when their code isn't working the same as what I have up on the projector and they want to get it fixed RIGHT AWAY so they won't fall behind.
Then when one of them starts calling out they all do it.
I may take some time to explain this.
This never happens when I'm teaching math. Something about coding makes them forget some of their manners, and become less self-sufficient. "It's broke! I'm helpless!"
What is that about?
@futurebird Some of it may be the lack of confidence in being able to fix it. I have seen devs who, as soon as they hit an issue, immediately look to make it someone else’s problem, so I fully support teaching them how to debug.
I like the idea of giving them buggy code. A lot of being a developer is finding the mistake the past developer (often yourself) made. :)