Instructor Notes
Schedule
We will put information about the schedule here once we have it! We are aiming for a 1-day lesson. If we end up having way more content, we may develop a longer thing, but it would be good to have a 1-day version that can be taught in conjunction with the existing ecology curriculum. The goal is to have this be a supplemental lesson to the existing Data Carpentry ecology lesson, though it will also be able to stand alone. - This is also why we chose to use the {ratdat} dataset - The skills that learners get from the DC Ecology lesson are assumed as a baseline level of R experience in this lesson, though this lesson is also useful for more advanced R users.
Motivation and philosophy
This lesson was conceptualized by Kaija Gahm as part of a Teaching As Research project through CIRTL at UCLA, in Spring 2024.
Debugging code is a challenging task and not one that can be comprehensively covered in a single lesson. This lesson was designed with the understanding that learners will be better equipped to proceed with confidence in their coding if they have a toolbox of general skills that they can apply when they get stuck (or a general workflow to follow).
Traditional debugging lessons focused on computer science students often very technical debugging concepts that are more applicable to programmers, rather than code end users. We observed that most of our colleagues (graduate students in ecology and evolutionary biology at UCLA) have little computer science background. Their interest in learning to code (usually in R) is pragmatic, and they want to use R as a tool to solve their research problems, rather than as an end goal in and of itself.
Instead of trying to teach a lesson on debugging per se, we chose to focus narrowly on the practical skill of building a minimal reproducible example [because reasons–KG to expand here].
- emotions are important–acknowledge the stress and anxiety that comes with getting stuck.
- This has been done before but not in an interactive format.
What is a reprex and why is it useful?
Understanding your code
Identify the problem and make a plan
Minimal Reproducible Data
Instructor Note
You can use the next example as well if you choose.
Instructor Note
Ask the audience, wait for them to respond
Instructor Note
OR should we start with an example right here where they need to answer those questions?
Instructor Note
Maybe we don’t need to include the solution and we just walk through it in the following section.
Instructor Note
Give them time to think about it and answer the question.
Instructor Note
Let the students try it out and discuss outloud