Summary and Schedule
This lesson introduces AI chatbots as an assistant for learning to code in R. Using plotting as a motivating example, it touches on functions and loops but does not aim to be a comprehensive introduction to programming. Rather, the goal is to get participants started running code, asking an AI chatbot for help, and critically evaluating the responses. After completing this lesson, participants should be ready to decide when and how they want to use generative AI tools as they continue to develop their own coding ability.
After completing this lesson, learners will be able to:
- Write prompts following good practice
- Validate the output of an LLM
- Analyse how simple programs work using an LLM
- Code and test short programs
- Identify approaches and resources to learn programming skills
- Develop a strategy to continue learning
Prerequisites
This lesson is aimed at people with little or no prior experience of programming / research software. It assumes some foundational knowledge of probability and computers.
| Setup Instructions | Download files required for the lesson | |
| Duration: 00h 00m | 1. Introducing LLMs as a Tool to Learn R |
What do I want to learn? What AI chatbots are available to me? How do I get started with R? |
| Duration: 00h 25m | 2. Writing Effective AI Prompts |
What should I include in a prompt? How does context affect responses? How can AI help me understand code? How can AI help me write code? |
| Duration: 01h 20m | 3. Analysing a Real Program |
What are some good strategies to learn from code that I did not write
myself? How can I use a chatbot to help build my own understanding of how code works? |
| Duration: 01h 30m | 4. Learning About Programming Concepts |
How can I get explanations when I don’t understand or recognise
something? What can I do to reinforce my learning? |
| Duration: 01h 40m | 5. Modifying Code |
How can I tidy up and reorganise existing code? How should I describe a change I want to make to a program? How can I ensure that I am building my own expertise when working with a chatbot? What are the challenges of scaling up this approach to larger programs? |
| Duration: 02h 40m | 6. Validating What We Have Made |
Why do we need to check code that a chatbot has generated? What kinds of errors can be hidden in AI-generated code? How can we test whether code is doing what we intended? Which parts of our code deserve the most scrutiny? |
| Duration: 02h 50m | 7. Crafting A Learning Path |
What am I confident that I know? What do I want to know but don’t yet? How can I ask for a strategy to master those things? What am I missing? What are the gaps in my understanding? How can I ask questions that reveal these gaps? How can I build more complex skillsets? |
| Duration: 03h 00m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Visit the Learning Programming with GenAI workshop overview to follow setup instructions for this lesson.