# Live coding

Live coding is not so much about the solution but more about the process. The students get to see the workflow a mentor uses, the shortcuts, what they do when encoutering errors, etc.

Remember to take it slow when you encounter an error (this is super difficult). Explain what the error says and what it means. Get the students to help you solve the problem. Think aloud when trying to solve the bug, this is mega important!!

The most important part of live coding is probably thinking aloud.

Make students come up with predictions for small live coding stuff. Fx What happens when we log this variable out. What will happen when we call this function.

## Preparation

* [Video](<https://www.youtube.com/watch?v=ChLu2KfIAk4Slowing >) about slowing down when encountering a bugs
* [A video](https://www.youtube.com/watch?v=eVtCO84MDj8) about the problem with live coding: Will they actually learn from passively watching live coding?
* [Another video](https://www.youtube.com/watch?v=buFRgtzfmiw) about general about live coding
* [An article](https://academiccomputing.wordpress.com/2012/07/09/science-education-research/) with an interesting discussion about live demos (live coding in our example)
* [An article](https://academiccomputing.wordpress.com/2012/05/11/predicting-live-coding/) giving another perspective on live-coding

## Exercises

* [Exercise](/teacher-curriculum/exercises/live-coding.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hyfbe.gitbook.io/teacher-curriculum/topics/live-coding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
