Wanted: Advice from CS teachers
-
I like the idea of a posted message.
You’re not stuck until you’ve tried:
A.
B.
C.(Variation on the old “You’re not stuck until you’ve run out of gas.”)
@donray @futurebird there are lots of them about https://www.tes.com/teaching-resource/debugging-checklist-poster-for-the-computer-tech-classroom-13223869
-
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've seen this too. Even in one-on-one instruction. Errors cause the students to panic and jump around quickly without stopping to think. Teaching students to stop and take a breath can be helpful. Sometimes the problem is the students are trying to learn by rote and don't have a mental model of what the code is doing, which takes a lot of time to address.
-
So I’m a long-time TDD advocate, and I guess this sort of gives up the game? Like, writing trustworthy tests that anticipate every distinct, concrete possibility that matters to us—this has always been The Hard Part of “coding”
That's hard, and so is figuring out the precursor of both code and test cases: the requirements.
I remember going to the US in the early days of Obamacare, for one State's new system to support it.
We had various experts representing different interests and they disagreed over so many points that I told them I would get them a neutral negotiations facilitator to help them figure things out, because I couldn't help until they were much closer to agreement.
-
This might be a bit too far (my teaching has been of older kids), but what if instead teaching them "coding" of "programming", you teach them "debugging"?
I mean start referring to that class exclusively as "debugging". "Okay class, it's time for debugging. Open your....". That way if they write something that doesn't work it's not a mistake - they've produced something that's important for the next step, which is understanding error messages, locating the place in the code ....
.... where the error is likely to be hiding, figuring out how to remove things to get to a basic structure that does work.
Honestly, "debugging" is the first thing you gotta learn. Heck "Basic Swimming" is still called swimming, but the key skill you learn is "breathing - while your face is in water half the time".
This might be expecting too much patience from your age cohort, but what if "it doesn't work" was met with "Excellent. We'll use that in the next step."
-
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 a powerful conceptual tool that I have after working in Boot Camp and in professional training is this: your code has billions of configurations, all of them except one are incorrect.
Therefore you’re going to spend the majority of your time with not working code. When it does work, that is the exception.
Therefore, your goal will be to learn how to gather information and diagnose the nature of the wrongness so that you can get it to the one working state this blunts the Instagram effect.
-
@donray @futurebird there are lots of them about https://www.tes.com/teaching-resource/debugging-checklist-poster-for-the-computer-tech-classroom-13223869
@donray @futurebird if you wanted to turn it into a Teachable Moment (TM) you could create the list together then put it up on the wall after.
-
@futurebird
I totally cried when I was 14 and I tought in my naivety that I knew almost everything and then a simple program failed.
@wakame @futurebird can confirm, I work on the standard library for a major programming language and my working assumption is “you can tell I’m writing a bug because my hands are moving”.
Which is why we have tens of thousands of tests and multiple code reviewers and elaborate compiler checking and teams of people dedicated to making sure everyone else’s code that uses my code still works and everyone “dogfoods” the changes and and and… stuff still slips through every once in a while.
-
.... where the error is likely to be hiding, figuring out how to remove things to get to a basic structure that does work.
Honestly, "debugging" is the first thing you gotta learn. Heck "Basic Swimming" is still called swimming, but the key skill you learn is "breathing - while your face is in water half the time".
This might be expecting too much patience from your age cohort, but what if "it doesn't work" was met with "Excellent. We'll use that in the next step."
To really overwork the swimming metaphor, once you get the breathing down you can start work on the cool stuff, like learning different strokes, etc.. And once you get debugging down you can start learning algorithms and cool graphics libraries, etc.
But you aren't going anywhere until you've learned how to debug, so let's honor it and teach it as a distinct skill, not as something shameful we need to resort to when we've made a mistake. (Forgive the excessively dramatic tone.
) -
They've added some new feature that will pull up a little virtual machine and it will let you run the code in there. It also seems to test that the code will at least compile first.
I worry that people seem to think that the LLM just... "evolved" these features when clearly a human person had to add them.
Which is how LLMs will "evolve", including soul-destroying work by people in the global south, "training" them.
They will become better corporate spokesbots, flooding our communications systems with marketing-driven slop.
-
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 "That's great! Your journey into coding really begins now, with the debugger!!!!"
-
Which is how LLMs will "evolve", including soul-destroying work by people in the global south, "training" them.
They will become better corporate spokesbots, flooding our communications systems with marketing-driven slop.
@EricLawton @futurebird @ben @david_chisnall How many Russian children had to be posed naked in front of cameras, so Grok knew how to make those pictures?
-
"Now I'm curious about whether LLMs' code compiles and executes error-free on their first attempt."
At first it did not, but they have added a routine to run it through a compiler until it at least runs without syntax errors and probably produces output that seems like what you asked for for a limited example of input.
This is a bolted on extra check, not some improvement in the base LLM.
But some people are acting like it does represent advances in the LLM.
@futurebird @EricLawton @david_chisnall @maco Are they though? The only sensible way to evaluate it is as a system — nobody uses the raw LLM, it's always through layers of API, tokenization, and now models or at least separate "trains of thought" leveraged against each other to refine the output. Using the tooling to conform output is a good hack to keep the systems able to deal with new things by using new tools instead of needing new training.
And it's not exactly an extra check — it's embedded in a feedback loop.
-
@futurebird @EricLawton @david_chisnall @maco Are they though? The only sensible way to evaluate it is as a system — nobody uses the raw LLM, it's always through layers of API, tokenization, and now models or at least separate "trains of thought" leveraged against each other to refine the output. Using the tooling to conform output is a good hack to keep the systems able to deal with new things by using new tools instead of needing new training.
And it's not exactly an extra check — it's embedded in a feedback loop.
@aredridel @EricLawton @david_chisnall @maco
I've had so many people say "it knows how to write code now" as if this is somehow ... new and different from generating text. As if there as been some foundational advancement and not just the same tool applied again.