Lessons lay at the heart of your teaching. But between where you start and where your learners end up, there is a lot of work. Foremost in your head at the start may be the delivery method, like whether you are preparing a workshop, a self-paced online tutorial, or an academic course. We want to offer you a different mindset, and that is to mentally separate your content from your delivery, i.e., what content is delivered is distinct from how it will be delivered.
But first, a very brief history of “literate programming” (and why you are a literate programmer).
The concept of “literate programming” was originally introduced by Donald Knuth in 1984. In a nutshell, Knuth envisioned a new programming paradigm where computer scientists focus on weaving code together with text as documentation, with the aim of creating software programs as “works of literature.”
Knuth coined this new paradigm the
WEB system, which you have probably never heard of! But lucky for all of us, Knuth took the important steps to write down and publish his vision for the
WEB. By doing that, he inspired software developers to not only change their own mindset, but to change their toolsets too: they created tools to enable others to write literate programs.
Then, some developers created tools to enable others to write better literate programs; they realized that it would make sense for users to write their narratives in a markup language made for authoring (such as Markdown or \(LaTeX\)). This advance made it easier and ultimately natural to use real words in full sentences, instead of just adding comments to code.
Now, take those mindset-changing tools, make them actually accessible to people other than software developers, and that is where we sit today. You are reading a book that was created by non-software-developers who wrote text in Markdown combined with R code and:
- bound together as a collection using the
- “knitted” in the comfort of our respective RStudio IDEs,
- shared on GitHub,
- built by Travis-CI,
- and published on GitHub Pages.
The toolchain may sound complicated at first, but this wasn’t our first rodeo. We worked up to using and integrating all these tools, building up from the basics of literate programming using tools we already knew. Most importantly, each link in our toolchain has improved our collective quality of life as collaborators:
We can share our ideas better with each other because we can see each others’ ideas easier.
We can share our ideas better with each other because we can share our code easier.
We can share our ideas better with everyone else because we can share our website easier.
Even if you only have one collaborator and that person is yourself, we think these payoffs will apply in your life as an educator. Certainly, the idea of applying literate programming principles to teaching programming is not new. Lots of well-respected educators have written But, we think that opening up literate programming toolkits for educators with specific use cases may be new- in our experience, the actual application of using literate programming tools.
The most fully-featured tool for literate programming in the R ecosystem is R Markdown. But, this is not a chapter about R Markdown (see the cookbooks later for those). This is a chapter to get you thinking about lesson development workflows, and how to design your own. Our goal is to arm you with information and intellectual fuel to want to apply literate programming principles to lesson-making, from lesson design to delivery.
“There is no telling what will happen if lots of other people catch
WEBfever and start foisting their creations on each other.”
— Donald E. Knuth, Literate Programming, 1984 (edited by the authors)
You may not need to hear this, because you may be reading this and already using R, RStudio, GitHub, and other advanced tooling for education. If so, kudos to you! You have grit and it shows 🎉. But, if you are not this kind of educator (yet!), please read on…
but we encourage educators to step back for a moment, and think about the things that are hard about your current teaching workflow, and to reasonably weigh the pros and cons of adopting new tools and workflows. Let’s start with a few “truths”:
Educators create a lot of files:
- your 2015 taxes (kidding, sort of).
The natural consequence of not having a workflow for organizing these files is “course chaos”, otherwise known as content that is hard to update, share, and deliver (see Figure 3.1).
Contrast this with a happier setup (Figure 3.2), where you can find, edit, and remix/reuse/recycle your own code and words easily. The file structure pictured is from an R Markdown website, which leaves a lot to be desired in terms of file organization, but is often “good enough” to get the job done (and to improve the educator’s quality of life dramatically).
You are more than your teaching materials.
You may feel like “I can’t simply put all my materials online! Will my students still come to class? Will my employer take them and leave me behind in the dust? Will other people steal my ideas?”
You don’t need to use all the tools. But, be open to when opportunities arise that challenge your current skillset and provide an “excuse” to level up your skills.
ProgrammingTeaching is a very personal activity, so I can’t be certain that what has worked for me will work for everybody.”
— Donald E. Knuth, Literate Programming, 1984 (edited by the authors)
Permission to educators who teach R or teach with R to consider themselves literate programmers. You are programming a lesson, however you end up delivering it. You could deliver a lesson any number of ways, but you are a literate programmer. For any given lesson, here are some “inputs” that you need to design around:
Audience: who are your learners?
Time: how long do you have with the learners? If you won’t meet them in person (i.e., you are designing a ), this is trickier- you need to think about how long you can reasonably have their attention for.
Scope: what are your learning objectives?
Sequencing: in what order can you cover the things you need to meet your learners’ goals?
Medium: how will you deliver your lesson?
You know the rule for putting your own oxygen mask on first, before helping others? Same goes for lesson development. Whatever tool you choose to use, it should be one that works for you, first and foremost. If you hate working with X tool every time you open it, you’ll hate working on your content period. And that is not a good place to be.
involves letting your learners easily access, manipulate, and otherwise “play with” your learning content. You should think about when and how much play you want to encourage…
When it comes to presenting your lesson, here are some things to consider and tool recommendations for different lesson delivery methods.
- Start with R Markdown
- Disable all custom RStudio color themes and fonts
- In case of catastrophe, test out Loom