AI copilots are changing how coding is taught

https://spectrum.ieee.org/ai-coding

Generative AI is transforming the software development industry. AI-powered coding tools are assisting programmers in their workflows, while jobs in AI continue to increase. But the shift is also evident in academia—one of the major avenues through which the next generation of software engineers learn how to code.

Computer science students are embracing the technology, using generative AI to help them understand complex concepts, summarize complicated research papers, brainstorm ways to solve a problem, come up with new research directions, and, of course, learn how to code.

“Students are early adopters and have been actively testing these tools,” says Johnny Chang, a teaching assistant at Stanford University pursuing a master’s degree in computer science. He also founded the AI x Education conference in 2023, a virtual gathering of students and educators to discuss the impact of AI on education.

So as not to be left behind, educators are also experimenting with generative AI. But they’re grappling with techniques to adopt the technology while still ensuring students learn the foundations of computer science.

“It’s a difficult balancing act,” says Ooi Wei Tsang, an associate professor in the School of Computing at the National University of Singapore. “Given that large language models are evolving rapidly, we are still learning how to do this.”

Less Emphasis on Syntax, More on Problem Solving

The fundamentals and skills themselves are evolving. Most introductory computer science courses focus on code syntax and getting programs to run, and while knowing how to read and write code is still essential, testing and debugging—which aren’t commonly part of the syllabus—now need to be taught more explicitly.

“We’re seeing a little upping of that skill, where students are getting code snippets from generative AI that they need to test for correctness,” says Jeanna Matthews, a professor of computer science at Clarkson University in Potsdam, N.Y.

Another vital expertise is problem decomposition. “This is a skill to know early on because you need to break a large problem into smaller pieces that an LLM can solve,” says Leo Porter, an associate teaching professor of computer science at the University of California, San Diego. “It’s hard to find where in the curriculum that’s taught—maybe in an algorithms or software engineering class, but those are advanced classes. Now, it becomes a priority in introductory classes.”

“Given that large language models are evolving rapidly, we are still learning how to do this.” —Ooi Wei Tsang, National University of Singapore

As a result, educators are modifying their teaching strategies. “I used to have this singular focus on students writing code that they submit, and then I run test cases on the code to determine what their grade is,” says Daniel Zingaro, an associate professor of computer science at the University of Toronto Mississauga. “This is such a narrow view of what it means to be a software engineer, and I just felt that with generative AI, I’ve managed to overcome that restrictive view.”

Zingaro, who coauthored a book on AI-assisted Python programming with Porter, now has his students work in groups and submit a video explaining how their code works. Through these walk-throughs, he gets a sense of how students use AI to generate code, what they struggle with, and how they approach design, testing, and teamwork.

“It’s an opportunity for me to assess their learning process of the whole software development [life cycle]—not just code,” Zingaro says. “And I feel like my courses have opened up more and they’re much broader than they used to be. I can make students work on larger and more advanced projects.”

Ooi echoes that sentiment, noting that generative AI tools “will free up time for us to teach higher-level thinking—for example, how to design software, what is the right problem to solve, and what are the solutions. Students can spend more time on optimization, ethical issues, and the user-friendliness of a system rather than focusing on the syntax of the code.”

Avoiding AI’s Coding Pitfalls

But educators are cautious given an LLM’s tendency to hallucinate. “We need to be teaching students to be skeptical of the results and take ownership of verifying and validating them,” says Matthews.

Matthews adds that generative AI “can short-circuit the learning process of students relying on it too much.” Chang agrees that this overreliance can be a pitfall and advises his fellow students to explore possible solutions to problems by themselves so they don’t lose out on that critical thinking or effective learning process. “We should be making AI a copilot—not the autopilot—for learning,” he says.

“We should be making AI a copilot—not the autopilot—for learning.” —Johnny Chang, Stanford University

Other drawbacks include copyright and bias. “I teach my students about the ethical constraints—that this is a model built off other people’s code and we’d recognize the ownership of that,” Porter says. “We also have to recognize that models are going to represent the bias that’s already in society.”

Adapting to the rise of generative AI involves students and educators working together and learning from each other. For her colleagues, Matthews’s advice is to “try to foster an environment where you encourage students to tell you when and how they’re using these tools. Ultimately, we are preparing our students for the real world, and the real world is shifting, so sticking with what you’ve always done may not be the recipe that best serves students in this transition.”

Porter is optimistic that the changes they’re applying now will serve students well in the future. “There’s this long history of a gap between what we teach in academia and what’s actually needed as skills when students arrive in the industry,” he says. “There’s hope on my part that we might help close the gap if we embrace LLMs.”

This article appears in the July 2024 print issue as “Professors Rethink How They Teach Coding.”

{
"by": "Brajeshwar",
"descendants": 487,
"id": 40248619,
"kids": [
40255488,
40250835,
40254012,
40250538,
40253998,
40250728,
40257203,
40257212,
40255956,
40255632,
40254873,
40254410,
40255308,
40254263,
40251050,
40257457,
40253343,
40250582,
40251579,
40259706,
40250904,
40258984,
40258950,
40251853,
40253354,
40258570,
40251122,
40255079,
40260297,
40251029,
40253435,
40255277,
40257415,
40258314,
40254435,
40257416,
40255029,
40253891,
40254308,
40255681,
40259672,
40250552,
40258050,
40259903,
40250980
],
"score": 270,
"time": 1714749217,
"title": "AI copilots are changing how coding is taught",
"type": "story",
"url": "https://spectrum.ieee.org/ai-coding"
}
{
"author": "Rina Diane Caballar",
"date": "2024-06-25T13:52:30.000Z",
"description": "Professors are shifting away from syntax and emphasizing higher-level skills",
"image": "https://spectrum.ieee.org/media-library/photo-illustration-of-a-mini-ai-bot-looking-at-a-laptop-atop-a-stock-of-books-sitting-next-to-human-hands-on-a-laptop.jpg?id=52145526&width=1200&height=600&coordinates=0%2C125%2C0%2C125",
"logo": "https://logo.clearbit.com/ieee.org",
"publisher": "IEEE",
"title": "AI Copilots Are Changing How Coding Is Taught",
"url": "https://spectrum.ieee.org/ai-coding"
}
{
"url": "https://spectrum.ieee.org/ai-coding",
"title": "AI Copilots Are Changing How Coding Is Taught",
"description": "Generative AI is transforming the software development industry. AI-powered coding tools are assisting programmers in their workflows, while jobs in AI continue to increase. But the shift is also evident in...",
"links": [
"https://spectrum.ieee.org/ai-coding",
"https://spectrum.ieee.org/amp/ai-coding-2668065815"
],
"image": "https://spectrum.ieee.org/media-library/photo-illustration-of-a-mini-ai-bot-looking-at-a-laptop-atop-a-stock-of-books-sitting-next-to-human-hands-on-a-laptop.jpg?id=52145526&width=1200&height=600&coordinates=0%2C125%2C0%2C125",
"content": "<div><p><a href=\"https://spectrum.ieee.org/what-is-generative-ai\" target=\"_blank\"><u>Generative AI</u></a> is transforming the <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/software-development\">software development</a> industry. <a href=\"https://spectrum.ieee.org/ai-code-generator\" target=\"_blank\"><u>AI-powered coding tools</u></a> are assisting programmers in their workflows, while <a href=\"https://spectrum.ieee.org/ai-jobs\" target=\"_blank\">jobs in AI</a> continue to increase. But the shift is also evident in academia—one of the major avenues through which the next generation of software engineers learn how to code.</p><p>Computer science students are embracing the technology, using <a href=\"https://spectrum.ieee.org/tag/generative-ai\" target=\"_blank\"><u>generative AI</u></a> to help them understand complex concepts, summarize complicated research papers, brainstorm ways to solve a problem, come up with new research directions, and, of course, learn how to code.</p><p>“Students are early adopters and have been actively testing these tools,” says <a href=\"https://profiles.stanford.edu/323862\" target=\"_blank\"><u>Johnny Chang</u></a>, a teaching assistant at Stanford University pursuing a master’s degree in computer science. He also founded the <a href=\"https://www.aixeducation.com/\" target=\"_blank\"><u>AI x Education conference</u></a> in 2023, a virtual gathering of students and educators to discuss the impact of AI on education.</p><p>So as not to be left behind, educators are also experimenting with <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/generative-ai\">generative AI</a>. But they’re grappling with techniques to adopt the technology while still ensuring students learn the foundations of computer science.</p><p>“It’s a difficult balancing act,” says <a href=\"https://www.comp.nus.edu.sg/cs/people/ooiwt/\" target=\"_blank\"><u>Ooi Wei Tsang</u></a>, an associate professor in the School of Computing at the <a href=\"https://nus.edu.sg/\" target=\"_blank\"><u>National University of Singapore</u></a>. “Given that <a href=\"https://spectrum.ieee.org/tag/large-language-models\" target=\"_blank\"><u>large language models</u></a> are evolving rapidly, we are still learning how to do this.”</p><h2>Less Emphasis on Syntax, More on Problem Solving</h2><p>The fundamentals and skills themselves are evolving. Most introductory computer science courses focus on code syntax and getting programs to run, and while knowing how to read and write code is still essential, testing and debugging—which aren’t commonly part of the syllabus—now need to be taught more explicitly.</p><p>“We’re seeing a little upping of that skill, where students are getting code snippets from generative AI that they need to test for correctness,” says <a href=\"https://www.clarkson.edu/people/jeanna-matthews\" target=\"_blank\"><u>Jeanna Matthews</u></a>, a professor of computer science at <a href=\"https://www.clarkson.edu/\" target=\"_blank\"><u>Clarkson University</u></a> in Potsdam, N.Y.</p><p>Another vital expertise is problem decomposition. “This is a skill to know early on because you need to break a large problem into smaller pieces that an LLM can solve,” says <a href=\"https://leoporter.ucsd.edu/\" target=\"_blank\"><u>Leo Porter</u></a>, an associate teaching professor of computer science at the <a href=\"https://ucsd.edu/\" target=\"_blank\"><u>University of California, San Diego</u></a>. “It’s hard to find where in the curriculum that’s taught—maybe in an algorithms or <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/software-engineering\">software engineering</a> class, but those are advanced classes. Now, it becomes a priority in introductory classes.”</p><p>“Given that <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/large-language-models\">large language models</a> are evolving rapidly, we are still learning how to do this.” <strong>—Ooi Wei Tsang, National University of Singapore</strong></p><p>As a result, educators are modifying their teaching strategies. “I used to have this singular focus on students writing code that they submit, and then I run test cases on the code to determine what their grade is,” says <a href=\"https://www.utm.utoronto.ca/math-cs-stats/people/daniel-zingaro\" target=\"_blank\"><u>Daniel Zingaro</u></a>, an associate professor of computer science at the <a href=\"https://www.utm.utoronto.ca/\" target=\"_blank\"><u>University of Toronto Mississauga</u></a>. “This is such a narrow view of what it means to be a software engineer, and I just felt that with generative AI, I’ve managed to overcome that restrictive view.”</p><p>Zingaro, who coauthored a <a href=\"https://www.manning.com/books/learn-ai-assisted-python-programming\" target=\"_blank\"><u>book on AI-assisted Python programming</u></a> with Porter, now has his students work in groups and submit a video explaining how their code works. Through these walk-throughs, he gets a sense of how students use AI to generate code, what they struggle with, and how they approach design, testing, and teamwork.</p><p>“It’s an opportunity for me to assess their learning process of the whole software development [life cycle]—not just code,” Zingaro says. “And I feel like my courses have opened up more and they’re much broader than they used to be. I can make students work on larger and more advanced projects.”</p><p>Ooi echoes that sentiment, noting that generative AI tools “will free up time for us to teach higher-level thinking—for example, how to design software, what is the right problem to solve, and what are the solutions. Students can spend more time on optimization, ethical issues, and the user-friendliness of a system rather than focusing on the syntax of the code.”</p><h2>Avoiding AI’s <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/coding\">Coding</a> Pitfalls</h2><p>But educators are cautious given an <a href=\"https://spectrum.ieee.org/ai-hallucination\" target=\"_blank\"><u>LLM’s tendency to hallucinate</u></a>. “We need to be teaching students to be skeptical of the results and take ownership of verifying and validating them,” says Matthews.</p><p>Matthews adds that generative AI “can short-circuit the learning process of students relying on it too much.” Chang agrees that this overreliance can be a pitfall and advises his fellow students to explore possible solutions to problems by themselves so they don’t lose out on that critical thinking or effective learning process. “We should be making AI a copilot—not the autopilot—for learning,” he says.</p><p>“We should be making AI a copilot—not the autopilot—for learning.” <strong>—Johnny Chang, Stanford University</strong></p><p>Other drawbacks include <a target=\"_blank\" href=\"https://spectrum.ieee.org/tag/copyright\">copyright</a> and bias. “I teach my students about the ethical constraints—that this is a model built off other people’s code and we’d recognize the ownership of that,” Porter says. “We also have to recognize that models are going to represent the bias that’s already in society.”</p><p>Adapting to the rise of generative AI involves students and educators working together and learning from each other. For her colleagues, Matthews’s advice is to “try to foster an environment where you encourage students to tell you when and how they’re using these tools. Ultimately, we are preparing our students for the real world, and the real world is shifting, so sticking with what you’ve always done may not be the recipe that best serves students in this transition.”</p><p>Porter is optimistic that the changes they’re applying now will serve students well in the future. “There’s this long history of a gap between what we teach in academia and what’s actually needed as skills when students arrive in the industry,” he says. “There’s hope on my part that we might help close the gap if we embrace LLMs.”</p><p><em>This article appears in the July 2024 print issue as “Professors Rethink How They Teach Coding.”</em></p></div>",
"author": "https://www.facebook.com/48576411181",
"favicon": "https://assets.rebelmouse.io/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpbWFnZSI6Imh0dHBzOi8vYXNzZXRzLnJibC5tcy8yNjU5NjY0OS9vcmlnaW4ucG5nIiwiZXhwaXJlc19hdCI6MTc4NTc0NjUwNn0.pFbPADvK9fyfasig9FMci3xf6UeB_WJaER5Yea_eRpI/img.png?width=48&height=48",
"source": "spectrum.ieee.org",
"published": "2024-06-25T13:52:30+00:00",
"ttr": 190,
"type": "article"
}