Opinion
Artificial Intelligence and Machine Learning

Generative AI and CS Education

Increased knowledge sharing is helping CS educators and researchers accelerate change in computing education.

Posted
large display and console in an office setting, illustration

I have spent most of my career working on computer science (CS) education whether teaching undergraduate CS or managing technical education for software engineers at Google. In the early 1990s, when Pascal was the language of choice, I began teaching CS1 and CS2 at Stanford. Over the next few years, I saw the transition from Pascal to C to object-oriented programming. I also saw the pace at which we had to consistently update our course materials and projects, whether it was in the introductory courses or later electives such as graphics or compilers. Languages, software frameworks, libraries, APIs, and so forth change rapidly.

By the time I left Stanford in 2005, we were putting in place specializations such as systems, human-computer interaction (HCI), and artificial intelligence (AI) in the undergraduate program. These specializations had previously been reserved for the master’s program, but we realized that the field was changing so fast that undergraduates also required specialized knowledge and experience.

At Google, I continued to work on CS education, specifically for software engineers, whether recent graduates or industry professionals. Our software engineers require in-depth onboarding to get up-to-speed quickly on Google’s tools, codebase, frameworks, and collaborative working methods. They also require advanced technical education as the business changes. For example, in 2014, when Google went “Mobile First,” we trained thousands of engineers on Android. In 2016, when Google went “AI First,” we trained tens of thousands of engineers on machine learning.

Now we find ourselves, yet again, at a pivotal point in how we train engineers at Google—and my team is actively redesigning our internal curricula to keep pace. With the advent and proliferation of LLMs, the role and activities of a software engineer have already changed. We have seen the ability of generative AI (GenAI) systems in generating code, as well as helping to design and implement systems based on detailed prompts. We not only have to train our engineers on the latest advances in GenAI, but also how to think about AI-enablement in their products—how to bring GenAI into products and services so it helps users in impactful, safe, and reliable ways—while also managing the errors that come up from time to time. As the technology evolves, all of these other aspects evolve as well, making it challenging to keep everyone current.

Over the past year, CS educators and researchers have been undergoing an analogous exercise to ours at Google, trying to accelerate and influence change in computing education. While well aware of the potential risks posed by LLMs (overreliance; academic integrity), these educators also point out the opportunities when generative AI is used not just as a productivity tool for students, but also a pedagogical one—able to provide real-time feedback in large introductory classes, able to help students overcome “coder’s block,” able to help with code explanation, and able to hone students’ computational thinking through “prompt problems.”1,2,6

Whether we are educating software engineers in industry or computer scientists at universities, all of us need to look carefully at the skills and conceptual understanding we currently emphasize and how those may change in the near future. The time spent writing code from scratch has been gradually decreasing over many years with the power of code search tools and platforms such as Stack Overflow. Most engineers spend time finding and modifying someone else’s code rather than writing something original. Now, however, they no longer have to find it when a chatbot can generate it for them. The skill of code reading and understanding is becoming increasingly important, as is the ability to assess and test the correctness, safety, security and reliability of generated code.

With the productivity boost we are seeing with engineering assistance, software engineers get more done in a day, so features and projects are getting done sooner. Ultimately, the goal is to use the extra time to build more sophisticated, AI-enabled, safer, and more helpful products and services. If a chatbot can generate or find the low level modules of code, an engineer has the time to go up a level of abstraction and work on designing those more sophisticated systems. Note that this is not just happening at tech companies like Google. Tools like Copilota and Codexb are making these capabilities available to all software engineers, as well as to all students.

In a sense, then, these same “productivity benefits” can apply to students and their learning process. Typically CS1 focuses on syntax and programming principles, coding and testing, all of which are still essential for code reading, understanding, and assessment. But as Paul Denny and his collaborators point out, the CS1/2 sequence could evolve to an “algorithms early” approach focusing more on modeling with data structures and algorithms, and, I would add, designing systems using available or generated modules of code.1 Students will still need to know all the data structures and algorithms, how they work, what they are for, as they do now. But they only need to implement a subset from scratch, unlike the traditional way of teaching CS2, which is to have students implement all the basic data structures and search/sort algorithms.

The saved time in CS2 and later in the curriculum could be spent on how to choose the right model for a problem, assess its fit, try other options, and use libraries, APIs and generated code to design and build more sophisticated, compelling systems than is currently possible in undergraduate courses. The need to learn these fundamental design, integration and assessment skills will become increasingly important for future software engineers. There is a common analogy between calculators and their impact on mathematics education, and generative AI and its impact on CS education. Teachers had to find the right amount of long-hand arithmetic and mathematical problem solving for students to do, in order for them to have the “number sense” to be successful later in algebra and calculus. Too much focus on calculators diminished number sense. We have a similar situation in determining the “code sense” required for students to be successful in this new realm of automated software engineering. It will take a few iterations to understand exactly what kind of praxis students need in this new era of LLMs to develop sufficient code sense, but now is the time to experiment.

Similar to Lam and Guo’s survey of CS educators across nine countries and their use of GenAI in their classrooms, we recently conducted our own survey of professors at universities where we have research collaborations.5,c The universities vary in the size of their CS programs and in their research focus (R1 to liberal arts). What we found is a small set of faculty actively experimenting with generative AI coding tools in introductory courses. We also found faculty who are conducting research on the effectiveness of these tools in teaching.3,4 At the other end of the spectrum were departments and faculty that banned students using the technology. The largest group was somewhere in the middle, curious about how to use it in their own courses, but wanting to see the research results, or learn from the experiences of others who are doing it. There was also an understandable hesitation to embrace these tools until they become less error-prone.

As the software engineering role and process change over the coming months and years, it will be essential for CS educators at all types of institutions to monitor those changes and adjust curriculum accordingly. We already see a need to raise the level of abstraction for software engineers in industry given the productivity boost that engineering assistance is providing. The same thing is happening in CS undergraduate programs as early adopters and researchers start to communicate on their experiences and findings. Higher education does not move as quickly as industry for obvious and good reason. But there is an urgency to evolve quickly given the speed at which automated software engineering is evolving and improving, and how rapidly software engineering roles are changing in industry. To smooth the course, it is essential to build stronger pathways for knowledge sharing between industry and academia, so we can ensure CS students are well prepared for the future that they will encounter.

    References

    •  
    • 1. Denny, P. et al.  Promptly: Using Prompt Problems to Teach Learners How to Effectively Utilize AI Code Generators (2023); https://arxiv.org/pdf/2307.16364.pdf
    • 2. Denny, P. et al.  Computing Education in the Era of Generative AI (2023); https://arxiv.org/pdf/2306.02608.pdf
    • 3. Denny, P. et al. Conversing with Copilot: Exploring prompt engineering for solving CS1 problems using natural language. In Proceedings of the 54th ACM Technical Symposium on Computer Science Education V. 1 (Toronto, ON, Canada) (SIGCSE 2023) . ACM, NY, 2023; 10.1145/3545945.3569823
    • 4. Kazemitabaar, M. et al. Studying the effect of AI code generators on supporting novice learners in introductory programming. In Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems (Hamburg, Germany) (CHI ’23). ACM, NY, 2023; 10.1145/3544548.3580919
    • 5. Lau, S. and Guo, P.J.  From “Ban It till We Understand It” to “Resistance Is Futile”’: How University Programming Instructors Plan to Adapt as More Students Use AI Code Generation and Explanation Tools Such as Chatgpt and Github Copilot (2023); https://bit.ly/3HRg56m
    • 6. Liffiton, M. et al. Codehelp: Using Large Language Models with Guardrails for Scalable Support in Programming Classes (2023); https://arxiv.org/pdf/2308.06921.pdf

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More