Educators

Writing Code vs Generating Code: What Students Actually Need to Learn

Exploring essential coding skills for students, this blog compares the importance of writing code versus generating code in modern computer science education. Discover what students truly need to learn.


There’s a lot of AI hype and hysteria bouncing around schools and classrooms right now. Computing classrooms aren’t immune to this chaotic tech environment; many AI advocates argue that computing may be the biggest loser of all when it comes to job displacement and replacement, and anxiety about how computing (particularly computing jobs) will transform over the next decade or so is pretty commonplace. Like in other areas of education there’s a lot to talk about here, but one question keeps coming up in conversations and at conferences and I have strong opinions about it: what’s the point of teaching students to code when we have large language models that do an alright job generating code for them?

There are basically two sides to this debate. The first one goes something like this: The hardest thing about being a novice coder is memorizing the rules of the language well enough that you don’t run into errors or have to look things up all the time. LLMs make it possible for everyone to skip all that heartache and get to the interesting part of coding quicker; we should stop requiring students to be able to write code themselves. The other side, which is the position I’m taking says: Writing code is a foundational skill that facilitates students acquiring all kinds of second- and third-order skills as a result, and students still need it even if a machine might do it almost as well.

Both sides of this debate agree about the importance of teaching higher-order, systems design skills and how to read and interpret code. Even programmers who mostly generate code rather than write it themselves need to know what it says, and how to make sense of what the generated code will direct the computer to do. So finally, here’s the part of my argument that we can act on: I think teaching students to write code by hand is the fastest, most effective, empowering, and efficient way to get students to develop the skills they need to be effective LLM-assisted programmers. Even if AI transforms professional computing such that 0% of salaried programmers write their code by hand (I don’t think it will, but some say it might), I think we should still teach code-writing because it forms the foundation of all the higher-order thinking and design skills that these professionals need, regardless of how they produce their code. This type of anachronism exists all over the educational world. In music, we still teach solfege—sol, re, mi, etc.; you’ve probably heard of it—because it’s a fast and effective way to get students onboarded to important, foundational aural and musical concepts. Novice actors still act out Shakespeare even though there’s a version of Much Ado About Nothing starring Nathan Fillion and thus we don’t need anymore performances (just kidding). We still teach Newtonian physics before quantum mechanics.

I think a student who learns to write code is a better programmer in a shorter period of time than a student who only learns to generate it—as long as you measure their success by their understanding and fluency rather than by whatever they were able to produce. A vibe-coder can sometimes make impressive things, but what do they know? How does that compare to a student who has enough writing skills to make something simple, but with complete understanding? Which student would you bet on?

 

Similar posts

Keep up with our work

Get news, computing education resources, newsletters, upcoming events, and updates via email!

Subscribe