r/learnpython • u/illyar80 • 5d ago
CS teacher here: how are you keeping your kids from just copy-pasting ChatGPT answers when learning logic/coding?
[removed]
15
Upvotes
r/learnpython • u/illyar80 • 5d ago
[removed]
36
u/d1ll1gaf 5d ago
Have your students explain their code to you verbally, focusing your questions not on what the code does but why they chose that way of doing it.
7
u/Nomapos 5d ago
Why don't you just provide a small searchable offline wiki with simple tutorials, examples, etc and then simply shut off the Internet?
7
u/VioletWillows88 5d ago
Woah! I just wanna point out how cool it is that a high school (assuming it’s high school) offers Python learning in a computer science class. My high school did not offer that.
4
u/NerdyWeightLifter 5d ago
Consider two distinct learning objectives:
3
u/Wanchor1 5d ago
Pen and paper
3
u/POGtastic itertools evangelist 5d ago
"I have a Smith-Corona Cornet that is in a heavy plastic case under the bed in the guest room. If I catch you using AI to do your homework, you will time-travel 50 years into the past."
I also have a few fountain pens lying around, so we can actually travel even farther back in time if needed.
3
u/LavishnessFew7882 5d ago
It is maybe unpopular but I think handwritten quizzes where they have to write out a function that does xyz thing will make them retain it better and feel more confident to try things without having an llm do it for them.
3
u/leostotch 5d ago
Have them walk you through their code verbally, telling you what they are doing, how, and why.
2
u/jmacey 5d ago
I use TDD, get them to plan and write the test. Then let the AI write the code to pass the test, see how good or bad it is, with a good code review, then repeat.
Also get them all to use the same prompt (or variant of) and compare the results to see the non-deterministic responses.
There a quite a few good articles / papers on various areas and it is something I am doing quite a lot of work on (it's difficult as you have to factor in so much including digital poverty).
Have a look at https://arxiv.org/pdf/2604.17460 https://cacm.acm.org/blogcacm/five-key-principles-to-update-cs-education-in-the-agentic-coding-era/ also https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6097646 the ideas of "Cognitive Surrender" is a big part of this (I know I do it! when I just let the ai do it for me!).
2
u/nacnud_uk 5d ago
Get them super efficient in AI prompt writing. That will be their job. They are not going to be coding line by line any more.
Get them able to ask about the logic breakdown of a problem, that kind of thing. Get them to be able to understand design, and ask the questions that matter.
I'd not overly worry about getting them to type
void main ( void );
2
u/onerichmeyer 5d ago
I've heard of teachers putting in hidden poison commands in assignments which causes the AI to write the output in a way that makes it easily detectable as being AI. The hidden text is usually white on a white background so it isn't visible to the students but the ai sees it
1
u/TipIll3652 5d ago
Have them hand write the algorithm.
1
u/silfin 5d ago
There's a few ways I've had some success with.
Though I mostly have slightly older students (14-18) that have chosen to take computer science while having plenty of other options, so I have a largely well motivated group.
First off all I've let them know that developers who are better at programming tend to also get better results from Ai, so even if they expect to always use Ai in the future there's still a large benefit to learning the basics well.
Second, they are allowed to use Ai for any graded assignment, as long as they also let me know what they used it for and what prompts they used. If their AI use prevents me from assessing if they achieved the learning goals we have a chat to see if they understand what they submitted.
1
u/Xidium426 5d ago
Could do what I had to do in college 15 years ago, hand written code on tests.
Homework was "turn in your source code" and the teacher inspected it, but tests and mid-terms had large hand written sections that made up a large part of the grade. We didn't get docked for small things like a missing comma or regular stuff Intellisense would catch, they were looking to see that we had the general understanding of the languages.
At least I didn't have to hand write binary like the teacher made his first classes do back in the 80s...
1
u/victotronics 5d ago
If the code looks too good: have them explain it to you.
If you've given them a coding assignment, next week have them do a very similar problem, but with pen & paper. The ones that cheat will be obvious to you. And if the pen/paper solution is crap, also detract points from the "coded" solution.
1
u/Aceofsquares_orig 5d ago
Flipped classroom. In class exams. Pen and paper. Any take home assessments should be considered low scoring. With a small number of individuals, you can do verbal assessments but I'll leave that to you to decide. Lastly, don't listen to those people that say AI is the new CS or programming. The person behind the screen still need to know if the output fits the problem/code base which means they still need to be able to read code and any issues that AI produces, and there are plenty, they still need to be able to write code. Only after they have a decent grasp on programming and problem solving should they be introduced to AI assisted development. Not before.
1
u/_dissociative 1d ago
Having students explain each line of a solution or defend their debugging choice can reveal much more than a working code submission. Duro is an AI native API first PLM focused on connected engineering workflows.
1
u/MiniMages 5d ago
I have forced myself to write code on paper when I was trying to learn coding.
1
u/Slickshot_Showoff 5d ago
Im not a prefessional, but i do have a career tech school training in software development.
Honestly, the best thing you can do it teach them the simple things like how if/then/or/xor works, how loops work, the basics of variables, functions, libraries, and dictionaries.
But at the end of the day, AI is a new CS field, and by trying to tell them never to use you... you are only handicapping your students for the future.
The best thing here would be to incorporate a free frontier model into your classroom time, actually explain to the kids how prompts work (i.e. Role, Goal, Subject, Data, and Format) this gives a much stronger starting position for leveraging AI in a way that creates lasting lessons.
That doesnt mean go crazy and use AI for everything. Teach them basic powershell commands, how to spot easy malware, how to un-install norton, using task manager and setting up something like MSI monitor to track utilaztion.
1
u/neuralbeans 5d ago
Ask this in r/professors
I don't see how your debugging tasks can't be be done with AI as well.
0
u/armywalrus 5d ago edited 5d ago
When I learned python, my instructor told us we had to be "Google warriors." He showed us how to check the documentation and forums. In real life few of us code from scratch - and AI is not going away. My company wants us to use it. As far as they are concerned, it increases efficiency. And... . It can. Have you thought about maybe structuring your tests around what they need ro know to succeed and be competitive when everyone has ai? Maybe some multiple choice questions where they pick what the best tool is for a given scenario. Maybe some bad code to run and they have to look in the documentation and tell you what the error means. Maybe have them design a coding project where they have to apply their knowledge to design one, document what libraries they use and why, what errors they got and what they did to fix them. Things where they are thinking and applying knowledge that forces them to use AI as a tool only. Maybe we need to get creative in a different world. Maybe a RegEx challenge where they have to match a line of code pulled from Nasa.com or something, and cite the RegEx documentation, with extra credit given for any additional documented answers.
-2
u/jferments 5d ago
Teach them to code with AI. Just like the vast majority of developers aren't writing x86 assembly, in the future, the majority of developers will not be hand-writing source code. AI writes better code than 99% of developers at this point anyway.
The most important thing to do is teach students software engineering principles, how to design applications at the architectural level, and how to design good test infrastructure. Let a bot do the coding grunt work. Coding was never the interesting part of software development anyway.
-1
u/chuckycastle 5d ago
Schools used to teach the Dewey decimal system. Schools should do a better job of teaching how to use AI-assisted coding tools.
How did math teachers deal with calculators? How did art teachers deal with Photoshop and DSLRs? Point is: teach them how to properly use the tools the world around them uses.
0
u/Expensive-Bear-1376 5d ago
So what? How is that your problem?
0
u/[deleted] 5d ago
[deleted] — view deleted comment