A lot has been written about large language models and their potential for replacing many jobs - including developers! One thing that is often overlooked however is how LLMs like ChatGPT or Claude can be a powerful learning tool. I’ve been using ChatGPT for a year both in work and personal projects and I’ve found it’s accelerated my progress. These are my tips on how to get the best out of LLMs to help you learn to code.

A computer screen with the ChatGPT website open on it Photo by Emiliano Vittoriosi on Unsplash

Learning roadmaps

Tools like ChatGPT can generate personalised learning paths. Instead of researching which topics to study and in what order use the model to generate a structured plan for you. You can also ask it to curate the best resources (books, videos, tutorials) to reach your goal.

Coding challenges

LLMs can generate coding problems for you tailored to your abilities and interests. Use these to test your understanding of a topic and get personalised feedback on where you can improve.

Debugging help

LLMs can act as virtual debugging assistants. Paste a code snippet or error message into ChatGPT and use the model to help resolve the issue. Even talking through your code step by step with it can help illuminate problems.

Spaced repetition and active recall

One of the most effective ways to learn a subject is via active recall (something I’ve written about here). LLMs can generate study questions for you and implement a system of spaced repetition so that you can remember the answers easier.

Conceptual explanations

LLMs can provide detailed explanations of higher level programming topics like Big O Notation, Data Structures and Algorithms and Object Oriented Programming. If you’re struggling to understand a concept you can ask for examples, breakdowns or analogies.

Pair programming roleplay and mock technical interviews

You can use ChatGPT to pair on an issue or problem with you and offer insight and suggestions. You can even ask it to take you through a timed mock technical interview with structured questions and ask it for feedback afterwards.

Notes of caution!

There are a few reasons to be cautious about using LLMs for learning to code.

Answers can be inaccurate or contain mistakes and still be prevented as fact. This is why it’s important to understand the code generated and be able to assess its merits yourself. LLMs often provide the most standard solution to a problem but not necessarily the best one.

Using AI to write code for you will prevent you from understanding and remembering the basics of your language. Puzzling through code and getting to grips with syntax are essential parts of the learning process.

LLMs can produce code that is based on biassed, incomplete or copyrighted material. Never use AI generated code in your projects without knowing what it is and what it does.

Bearing this in mind I still think that AI is the most exciting new learning technology since the internet. For me its main advantages are to make learning personalised and adaptive without needing a tutor. I’m excited to use features like Chat GPT Voice mode and Memory over the next few months.