Wanted: Advice from CS teachers
-
@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.
[Edit: And seriously: I think it is hard to understand if the voice from god tells your that there is an error line 32, that this could be somehow wrong.
I mean, this is a computer, right? It doesn't make mistakes.
Maybe emphasizing that the IDE and the compiler and everything else was written by humans and that they discover bugs in those programs all the time could help.]
@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.
-
@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.
@futurebird @EricLawton @david_chisnall @maco Yeah. And it really just is more and more precise force of the same sort. It does however end up at a qualitatively different place, with different impacts to the system of programming work itself because of it.
-
@futurebird @EricLawton @david_chisnall @maco Yeah. And it really just is more and more precise force of the same sort. It does however end up at a qualitatively different place, with different impacts to the system of programming work itself because of it.
@aredridel @futurebird @EricLawton @david_chisnall I’ve heard pricing on these is based on “tokens,” which I understand is in the tokenization/lex/yacc sense. I think that’s based on the number of tokens output, not input.
When it has to make two or three tries at generating code that actually compiles, does each attempt get charged, or just one?
-
@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.
@wakame @futurebird when I’m feeling extra dramatic I sometimes think of Diane Duane’s “So You Want To Be A Wizard”; we’re in a war against entropy itself, a sandcastle versus the tide, utterly unwinnable. And yet we show up every day and carve out a little place where something is Better for the people relying on our work. A bug fixed here, a tiny efficiency win multiplied by running a trillion times a day there.
“To these ends, in the practice of my Art, I will put aside fear for courage…”
-
@aredridel @futurebird @EricLawton @david_chisnall I’ve heard pricing on these is based on “tokens,” which I understand is in the tokenization/lex/yacc sense. I think that’s based on the number of tokens output, not input.
When it has to make two or three tries at generating code that actually compiles, does each attempt get charged, or just one?
@maco @aredridel @EricLawton @david_chisnall
I've only ever used free offers including a few I experienced in workshops, so I don't know about the pricing.
-
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.
treat it like a video game. each error is a life but you have to burn all your lifes to get assistance. start with 5 lives?
-
@aredridel @futurebird @EricLawton @david_chisnall I’ve heard pricing on these is based on “tokens,” which I understand is in the tokenization/lex/yacc sense. I think that’s based on the number of tokens output, not input.
When it has to make two or three tries at generating code that actually compiles, does each attempt get charged, or just one?
And if you're paying for it, there is an implied warranty that you'll get what you paid for.
Oh well, disputes w will be settled using lawyers with LLMs.
Which will further normalise the occupation of society by these corporate spokesbots.
-
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 intro courses at a university, which could be a little different but probably not completely. We often do "live coding" in class, with either me or a student at the keyboard while we solve a problem. Regardless of whether it's me or a student "driving", there are always lots of errors to fix, so it's an opportunity to model error-fixing as a normal, expected, creative activity. I always thank students for pointing out my boo-boos, which are plentiful. -
@aredridel @futurebird @EricLawton @david_chisnall I’ve heard pricing on these is based on “tokens,” which I understand is in the tokenization/lex/yacc sense. I think that’s based on the number of tokens output, not input.
When it has to make two or three tries at generating code that actually compiles, does each attempt get charged, or just one?
@maco @futurebird @EricLawton @david_chisnall That's complex and ever-changing, as business tuning is wont to do.
You usually pay for input and output tokens both, and thinking is part of that. But most people are using plans that give them some sort of semi-metered time-based access — five hours of time with the model and a token limit within that. It's a strange system.
Tokens are roughly in the lex/yacc sense, but they're a new thing, for LLM models. They're not precise parser tokens with parts of speech, but they are roughly "words”. Not exactly, since language is morphologically complex, and programming languages carry semantics in other granules, but the idea that they're words is not wrongheaded.
Others are going flat-fee (F/e, something like z.ai hosted GLM-4.7 is a flat fee per month, and quite low.)
(Also that one is interesting because cost to operate it figures are quite public. The model is public, the hardware requirements are about $15000, so you can do the math on it pretty easily to see what capital costs would be. Also environmental! Like that's 3 high end server GPUs, so a lot of heat, but also to humanize it, "less than heating a house" amounts of energy by far.)
-
@aredridel @futurebird @EricLawton @david_chisnall I’ve heard pricing on these is based on “tokens,” which I understand is in the tokenization/lex/yacc sense. I think that’s based on the number of tokens output, not input.
When it has to make two or three tries at generating code that actually compiles, does each attempt get charged, or just one?
@maco @aredridel @EricLawton @david_chisnall
I strongly suspect they are vastly undercharging and counting on building dependency and jacking up the prices later.
The free workshops seem to be all about that and didn't impress me much. But, I did get to play with the tech so I could better understand it which was worth it despite all of the sales pitch infused through the process.
-
@maco @aredridel @EricLawton @david_chisnall
I strongly suspect they are vastly undercharging and counting on building dependency and jacking up the prices later.
The free workshops seem to be all about that and didn't impress me much. But, I did get to play with the tech so I could better understand it which was worth it despite all of the sales pitch infused through the process.
@futurebird @aredridel @EricLawton @david_chisnall oh yes, I had the impression there was some of that going on. Some of the services did jack their prices up some time a year or two ago; I remember there being sticker shock. I think people expected what was free at first to go to like $20/mo and it actually went much higher.
But I have no details. I haven’t used any of it.
-
@maco @aredridel @EricLawton @david_chisnall
I strongly suspect they are vastly undercharging and counting on building dependency and jacking up the prices later.
The free workshops seem to be all about that and didn't impress me much. But, I did get to play with the tech so I could better understand it which was worth it despite all of the sales pitch infused through the process.
@futurebird @maco @EricLawton @david_chisnall Oof. A sales pitch embedded in it sounds miiiiiserable.
As far as pricing ... man it's hard to tell. The training of models is very expensive, and energy-consuming. That has to be amortized somehow. But the actual running takes only a little more than 'home computer' level. (and cruddier models do run on home computer scale 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 not a cs teacher, so feel free to disregard, but maybe you could split lectures up with students just taking notes during some examples, and following along with others? My favorite coding professor also often intentionally put in common errors to the examples he was doing, then asked the class what needed to be done to fix them