Harvard professor reveals the truth: AI isn't the only reason for computer science student exodus

Once one of the most popular university subjects, computer science enrolment is now in a steep decline

Harvard professor reveals the truth: AI isn't the only reason for computer science student exodus

The latest figures on university enrolment have sent shockwaves through the tech world. Once seen as a guaranteed path to a high-paying job, computer science (CS) is experiencing a dramatic downturn in popularity. According to the most recent data from the National Student Clearinghouse, which monitors 97% of all US universities, enrolment in computer science programmes at four-year institutions plummeted by a staggering 8.1% in the autumn of 2025.

The shift was so significant it knocked CS from the fourth to the sixth-largest undergraduate major in the country. The Washington Post reported that in absolute terms, "it's the biggest one-year drop of any major discipline going back to at least 2020," highlighting the sheer scale of the student retreat from the field. Even at top universities like Harvard, where CS was the second most popular concentration for the graduating class of 2025, the mood is changing, though newer enrolment figures have yet to be publicly released.

'Fewer opportunities' before the AI boom

While many have pointed the finger at the explosion of generative AI tools like ChatGPT, there is a growing sentiment that these new technologies will automate many of the routine coding tasks that were once the bread and butter of entry-level software engineering jobs, making a traditional CS degree seem less valuable. However, a top academic in the field argues the trend began earlier.

Harvard computer science professor David J. Malan told podcaster Ryan Petterman that while AI "absolutely seems to be the case" in hurting interest, the real problems started before the chatbot craze. "That was preceded, I think, over the past few years really by the downturn in tech offerings," Malan explained. He revealed that a slowdown in the tech industry was already impacting graduates. "We were seeing this in the recruiting pipeline on campus, where there were just fewer opportunities, and there was less of an appetite among some of the big tech companies to even bother coming to campus if they just didn't have many entry-level roles for students," he said in a recent interview.

The natural 'ebbs and flows' of tech

Professor Malan, who is famous for teaching Harvard's introductory CS50 course which has become a popular online programme for millions, believes this is part of a familiar cycle. He suggests that the tech world is prone to extreme reactions and that interest in the field will eventually bounce back as the market settles. "I think what we're going to see, if we sort of extrapolate out is that there's going to be these ebbs and flows over the years, much like we've seen," Malan said. He added that there is a tendency, "especially in tech, to overreact to things both positively and negatively." The professor predicts these fluctuations will continue until a "healthier medium" is found, "where people appreciate the real value and not just the opportunistic value of it all."

Students are specialising, not abandoning tech

The decline in traditional computer science enrolment does not necessarily signal a mass departure from technology-related fields. In fact, while CS numbers have fallen, there has been a significant surge in students choosing to major in more specialised areas. Disciplines like data science, data analytics, and other engineering fields are seeing a rise in popularity. This suggests students are adapting to the new landscape, pivoting towards areas they believe have more growth potential in a world increasingly dominated by artificial intelligence. This shift mirrors changes in the tech industry itself, which has seen high-profile layoffs alongside what's been described as a "hiring gold rush" for individuals with specialised AI and machine learning skills, placing a new premium on those who can develop and implement advanced AI solutions.

Redefining computer science for the future

The current shake-up has sparked a major conversation among leading figures in technology about the future of computer science education. Experts like OpenAI Chairman Bret Taylor and Nobel laureate Geoffrey Hinton still see immense value in a CS degree, but only if graduates understand that its core concepts go far beyond basic programming. Professor Malan strongly agrees, stressing that the curriculum must evolve. He is already integrating AI into his own teaching, using it as a personalised tutor for students in his CS50 course. "The whole point of so many of these courses has been about getting better at problem solving," he said. "And like that is a life skill, whether you're going to stay in CS or tech more generally, or leave it for some other field in which there's still going to be problems, just different types of problems."

The consensus is that the focus must shift from rote coding to higher-level skills like critical thinking and designing complex AI systems. The work of other academics, like fellow Harvard professor Boaz Barak, also underscores the enduring importance of a deep understanding of core computational principles, rather than just proficiency in a specific programming language.

Malan says that AI isn't going anywhere, but the ability to work alongside it and apply computational thinking to novel challenges will be what defines the successful tech professionals of the future.