How AI and Machine Learning are Changing the Way We Learn Programming

Code Monkeys Rejoice: AI and ML are Making Programming Less of a Chore and More of a Joyride
Welcome to the world of programming, where reading about staring at a screen for hours is only slightly less boring than actually doing it. But fear not, my fellow code monkeys! The future of programming education is finally here, and it's brought some friends. Meet Artificial Intelligence (AI) and Machine Learning (ML), the dynamic duo of coding tutorials. They're here to make learning to code less of a snooze-fest and more of a party. So grab your favorite beverage and get ready for a wild ride.
Advancements in Educational Platforms
First things first, let's talk about the advancements in educational platforms. I mean, who wants to learn how to code from a robot that sounds like it's been programmed to read a Wikipedia page? With AI and ML, we're getting tutorials so advanced they're practically reading our minds. And the best part is I can actually name them now.
Intelligent code completion: Tools that predict what code you're trying to write, sometimes before you know it yourself. GitHub Copilot went generally available in June 2022 at ten bucks a month, and free if you're a verified student. Amazon has CodeWhisperer, there's Tabnine, there's Replit's Ghostwriter. It's like having a mind-reading coding coach, except there are now four of them fighting over you.
Automated feedback: Instant feedback on your code, so you don't have to wait for your computer science professor to grade your homework. Copilot even shipped a thing called Copilot Explain that turns code into plain English, aimed specifically at beginners. Honestly? Explaining unfamiliar code is where I lose the most hours, so this one is bigger than it sounds.
Code generation: Platforms that generate code snippets from your input. The ultimate cheat code for coding. We'll come back to this, because it's also the part that should worry you a little.
Personalized instruction: ML that adapts to your progress and skill level, so you're not marching through the same fixed order as everyone else. Note that word: pacing. It adapts how fast you go. Adapting how something gets explained to you is a different beast, and we're not there yet.
Generated course material: This one surprised me. Researchers used OpenAI's Codex to generate programming exercises, solutions, test cases and code explanations, and most of it came out usable. Not a robot teacher. More like a very fast teaching assistant who still needs someone checking its work.
Interactive coding environments: Browser environments where you experiment and test in real time, like a video game.
Gamification: Platforms that make coding feel like a game, way more fun than it has any right to be. Least glamorous thing on this list, probably responsible for more people sticking with programming than anything else on it.
Virtual Assistants and Chatbots
Let's not forget about the virtual assistants and chatbots. They're like the wingmen of the coding world, always there to give you a hand when you're stuck. And let's face it, we've all been there. It's like having a friend who's always available, except this one doesn't get drunk and spill their problems on you. But hey, at least it's there when you're coding at 3 am and your real friends are sleeping.
It does spill gibberish though, and I want to be specific about that instead of just making a joke and moving on.
ChatGPT showed up at the end of November and hit a million users in about five days. A week later, Stack Overflow banned answers generated with it. Their reason is the single most useful sentence a beginner can read about any of these tools: the answers are wrong a lot, and they look right anyway.
That's the actual problem. Not "sometimes wrong." Wrong in a way that looks correct. An experienced dev reads a plausible answer and something itches. When you're starting out, you don't have the itch yet. So the tool is most confident exactly when you're least able to check it.
Wait, Am I Actually Learning Anything?
Okay, here's the awkward question. Do these tools teach you to code, or do they just produce code while you watch?
Because look at what I listed up there. Completion that finishes your thought before you've had it. Generation that turns a sentence into a working function. If the machine writes it, what did you practice exactly?
Turns out the researchers got here first. Back in February 2022, a team tested Codex against real CS1 exams and it scored in the top quartile of actual students. On an old model. Their paper isn't a victory lap either, it flags beginners leaning on it too hard and getting handed code they can't evaluate.
So no, I'm not telling you to avoid the tools. I'm telling you to know which mode you're in. Using Copilot to skip boilerplate you already understand is leverage. Using it to finish an assignment you couldn't have written yourself is borrowing against your own skills, and that bill shows up at your first technical interview.
My rule: write it yourself first, ask the AI second. Use it to explain more than to produce. And if you can't tell whether its answer is right, that's not a reason to trust it, that's a sign you shouldn't be using it for that yet.
Integration into Traditional Curriculum
Universities and colleges are getting in on the action, and January 2023 is a weird time to be writing this because everyone is deciding right now, mid-semester, with no warning.
So far they're being more welcoming than I expected. Computer science teachers seem to be talking up the opportunities more than the threats, which is generous considering this thing landed in the middle of their courses. And the tool vendors are paying attention in return: when GitHub made Copilot free for verified teachers, they thanked the computing education researchers whose papers they'd cited. Nice to see that loop actually closing.
The thing that has to change is assessment. If a free tool clears the top quartile of your intro exam, then take-home coding assignments aren't measuring what you think they're measuring. Nobody has this figured out yet. My guess is we move toward stuff that's harder to hand off: explain your own code out loud, debug something broken instead of writing from scratch, defend why you built it that way. Which is closer to the actual job anyway.
The Importance of Human Instruction
Let's not forget that AI and ML are not meant to take the place of human education and guidance yet, so don't get too enthusiastic just yet. There are several reasons why human instruction still matters:
Personalization, the real kind: I said platforms adapt your pace. What they don't do is notice you're stuck because of some misconception about how references work that you haven't even put into words yet, then find the one analogy that fixes it. Adaptive systems change the route. A good teacher changes the explanation.
Problem-solving and critical thinking: A human can refuse to give you the answer. Sounds like nothing. It's most of teaching. A chatbot built to be helpful hands you the solution every single time you ask, which is precisely the wrong move at precisely the wrong moment.
Motivation and engagement: Learning to code means being stuck, frustrated and convinced you're an idiot, on a schedule. Someone telling you that's normal and they went through it too isn't a feature any of these platforms ship.
Knowing if the output is any good: Back to the Stack Overflow thing. Somebody has to look at plausible-looking code and know it's broken. Until you can do that, you need someone who can.
Industry experience and connections: Instructors know what the field actually values right now. That's not in anyone's training data.
Cultural and diversity awareness: Making a room where people who don't already look like programmers feel like they belong is human work.
Conclusion
The future of coding is looking brighter than ever, thanks to AI and ML. It's like having a cheat code for life, and who doesn't love a good cheat code?
But here's the thing I keep circling back to. These tools are fantastic at producing code and only accidentally good at teaching you to write it, and those two things get mixed up constantly. So use them, they're free if you're a student and they're genuinely impressive, and turning them down on principle just means learning slower than the person sitting next to you. Just stay in the loop. Write it yourself first, ask second, verify always.
Ask me again in a year and I bet half of this looks quaint.
Sources
GitHub Copilot is generally available to all developers, GitHub Blog, June 21, 2022
GitHub Copilot now available for teachers, GitHub Blog, September 2022
Stack Overflow bans ChatGPT as substantially harmful, The Register, December 5, 2022
Finnie-Ansley et al., The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming, ACE 2022
Sarsa et al., Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models, ICER 2022