A new approach to an old language

How teaching the fundamentals of a core coding program with the use of AI is helping future generations.

Personalise
Dr. Andrew Taylor with his students
Senior Lecturers within the UNSW School of Computer Science and Engineering have developed an innovative tool known as the Debugging C Compiler (DCC), which uses generative artificial intelligence to help university students better learn and understand the notoriously difficult programming language, C.

Rather than fostering a reliance on AI-powered code generation, the new technology gives students a built-in AI ‘assistant’ to help explain errors in their code as they learn to program. Once discovered, students must fix these errors themselves. It’s hoped that students will learn how to code correctly without relying too heavily on AI.

The team, consisting of Associate Head of School, Dr. Andrew Taylor, Dr. Sasha Vassar, Dr. Jake Renzella and Dr. Hammond Pearce, believe this approach is vital, not only for graduating the best computer scientists, but for avoiding future software disasters similar to the global IT outage experienced during the 2024 CrowdStrike incident. “The CrowdStrike outage exemplifies the need for industry professionals to learn using best practice tools like DCC from day one” says Dr. Taylor.

Pictured from left to right: Dr. Pearce, Dr. Renzella and Dr. Vassar taken at a Specialist Interest Group Computer Science Education Conference. Image courtesy of Dr. Vassar.

The story of C

While the DCC tool is new, the story of this technology started many years ago with Dr. Taylor, who has been teaching first-year programming for over a decade. “While there’s a huge variety of programming languages to choose from – the school is best known for teaching a language called ‘C’,” explains Dr. Renzella. “It’s the very first language our students learn but because it’s older, there are no training wheels,” he adds. “We still teach it though because students develop a strong appreciation for how a computer works – none of the hard bits are hidden away with C.”

While the language was once the most common first language taught across the world, the popularity of C has dropped significantly due to its difficulty. Instead of choosing a new language to teach, Dr. Taylor decided to turn this challenge into an opportunity. “He modified and enhanced the C compiler, an important tool used to turn C code into instructions that the machine can understand,” says Dr. Renzella. In doing so, he added features to help students stay on track if things go wrong, especially useful in instances where no teacher support is available.

“When you use the compiler to translate between something that a human wrote and something a machine can understand in C, the errors can often be quite cryptic,” adds Dr. Vassar. “These can be very hard to understand, particularly for novices who have just started programming.”

Occasionally in these programs, there’s no context given when an error has occurred, meaning students are unable to continue working unless they have access to a teacher who can help them understand and resolve the issue. “[The DCC help feature] removes some of the roadblocks and allows them to keep going, particularly at night when they’re doing their assignments,” says Dr. Vassar.

This benefit is particularly important given students learning to code can often fall behind quite quickly without the right support.

“In our courses, timing is everything, so if the student’s learning is delayed just by a few days, it can have a serious impact,” adds Dr. Taylor. “Keeping them engaged and not stuck at a roadblock is really helpful.”

Pedagogically minded AI

Although rooted in AI, the compiler has guardrails to ensure students continue learning. “There’s a great temptation to hand things over to AI and that is what we’re trying to navigate,” explains Dr. Taylor.

“Our tool is very oriented towards providing teacher-like answers, rather than produce responses like ChatGPT, which will just give you the solution without encouraging any learning.”

Dr. Taylor, Dr. Renzella and Dr. Vassar in class. Image by UNSW photographer – Richard Freeman.

This is particularly important given students don’t have access to the tool in their exams. “They still have to make sure they understand everything they do.”

Users receive a one-off explanation, which gives them helpful information that may guide them towards uncovering a solution themselves. “Sometimes students don’t know what question to ask, particularly as a new student who has only been studying coding for a few weeks,” adds Dr. Pearce. “By integrating everything that DCC provides when something does go wrong – we have the questions that the tool knows to ask on behalf of the students.” 

Image by UNSW photographer – Richard Freeman.

Bugs hiding in plain sight

The compiler could go a long way to fighting buggy code in an increasingly online world. “Having silent bugs in your code that haven’t evidenced themselves is a huge problem,” explains Dr. Taylor. “These can manifest themselves within spaces of security where malicious people can find the bugs and take advantage of the situation.”

While bugs like those found in the CrowdStrike incident weren’t written in C, they were created in a language that is very similar. “The type of error they made was something that DCC and DCC Help would be able to detect,” explains Dr. Renzella. “We wouldn’t allow students to write code like that because our tools introduce additional safety-checks, which means our students are learning to write safe code from the onset.” Students can’t pass the initial submission checks when their work has these kinds of errors. “The DCC tool prevents you from learning those bad, yet common behaviours in the first place,” adds Dr. Pearce.

Coding for the future

First-year programming courses are notorious for their high failure rates across the globe. Thankfully, the DCC tool is helping students stay on track and continue their study.

“The DCC tool has been run over 50 million times,” says Dr. Renzella.

“The AI-enhanced help tool has been run almost half a million times.”

From left to right: Fellow UNSW researcher and winner, Professor Guan Yeoh alongside Dr Jake Renzella, Dr Sasha Vassar and Dr Andrew Taylor. Image credit: Seal Media.

With their innovative and scalable computing curriculum having already made a significant contribution to the higher education sector, the team has been awarded the Teaching and Learning Excellence category at the 2024 AFR Higher Education Awards. These awards are designed to highlight the tremendous impact that the higher education sector makes to Australian prosperity and quality of life.

As thousands of UNSW students continue to experience the benefits of DCC, the team are keeping busy extending the technology where possible. “We’re now exploring a new project called ‘Sidekick’, which makes the tool a bit more interactive so students can ask follow-up questions,” says Dr. Pearce. “We’re going to be deploying this in another course at UNSW for the first time so we’re pretty excited to see how it goes.” 

Researcher/s

Dr Andrew Taylor | Dr Sasha Vassar | Dr Jake Renzella | Dr Hammond Pearce

Focus Area

Digital Transformation

Read more

How a 50% efficiency leap unlocked a $1tn industry

From the creation of the world’s most efficient solar cell technology to the democratisation of solar power itself – here’s how our research is powering a global solar revolution.

Energy

Membrane technology with a global legacy

Solving water supply and wastewater disposal challenges with innovative membrane filters.

Water

Empowering smarter food consumption with sensors

Creating future food systems to prevent food waste throughout the globe.

Health

Get in touch and see what’s possible.

Ask how we can help your business, industry, or market through collaboration.