Using Generative AI as an Aide to Help You Learn to Program
When we program, we have a variety of software engineering tools at our disposal to help us in our work.
- Linters
- Type checkers such as mypy for Python
- Code formatters and style guide enforcers such as black, ruff
- Language Intelligence Tools using Language Server Protocol for code completion, refactoring, navigating to symbol definition and usages, syntax highlighting, and error and warning markers.
We should link these into our code editor or Interactive Development Environment so that we can use them automatically.
When we write text in natural language rather than code, we can use similar aides such as spell checkers, autocorrectors or grammar checkers.
We also make use of documentation for our programming languages, libraries and software tools. Here are some examples:
- Python Language Reference
- Python Standard Library
- Scikit learn Machine Learning library
- Polars Dataframes library
- Pro Git book
Beyond the documentation, we can access Question-and-Answer websites such as Stack Overflow or more generally use Google or DuckDuckGo.
More recently Generative AI tools (GenAI) such as ChatGPT and Copilot have become popular. These tools bring with them the temptation to let the GenAI do our work for us, to use it as a substitute for our work rather than an amplifier for our learning.
As such tools are still in development, with new applications being discovered all the time, we need to adapt and adopt them prudently. There are no hard and fast rules. Just some general advice.
You are following a course to learn how to program. The course has its learning goals which you should strive to achieve. Try to develop ways of using GenAI that aide you learning to program.
- Bear in mind the learning goals of the course
- Be critical in you use of any tools
- Use GenAI tools as amplifiers not substitutes
- Be alert for biases and ethical issues
- Verify your work at all stages.
Some ways in which GenAI can be helpful to you in achieving your learning goals.
- When programming (and indeed in other fields) we often want to search for something when we don't yet know the right terminology. It can be helpful to make a description of what we want in plain English.
- Debugging
- Have the GenAI explain code to you.
- Verify all your work. Use Test-driven development and involve your GenAI in it.
- Ask GenAI to review your code.
- Tailor Examples to Your Experience Level
- Tutoring
- Break Down High-level Goals
- Generating code snippets
- Explaining functions
- Fixing bugs
- Completing partial code
During the course, please feel free to share your experiences with GenAI as a tool to help you achieve your learning goals so that we can discuss them in class.
If you do use such GenAI tools, you must submit (a link to) your entire dialogues together with your assignment. In this way you can receive feedback on whether you are in fact using the tools in a way which are helping your reach your learning goals.
- Our in-class LLM interactions can be found here
- If you are concerned about sending your data to one of the Big Tech companies, the UvA has an experimental LLM at UvA AI Chat which does not send any data outside the university.