Language Basics

One variation on the tutorial that requires a series to teach

NOTE: if you are participating in a one-day workshop on learning about the tutorial template, do not choose this variant to work on during the day. It requires additional time for planning that we do not have during a one-day session.

Overview

The Language Basics format is a series of tutorials where you are teaching beginners the core concepts and syntax of a language. This cannot be done in a single one-hour session.

What are your 3-6 sections?

Since you're building an entire series here, you'll want to start by listing out all of the core concepts or pieces of syntax that you need to teach. Then split this up into groups of 3-6 things that go together in each one hour block.

Example

Regular Expressions

I used online regex cheatsheets and existing tutorials to help remind myself of what all of the different concepts are. Initial outline of core concepts to be covered:

  • fixed, literal matches

    • case sensitivity

  • . or matching any character

  • escaping metacharacters

  • repetition

    • greedy/non-greedy

  • beginning and end of line

  • word boundaries

  • character classes - built in and user-created

  • capturing groups

  • referencing matched groups

  • replacing/substituting

I also thought of additional concepts that I thought I could leave out:

  • negation in character classes

  • dotall flags, flags in general

  • or |

  • non-capturing groups

  • lookahead and lookbehind

Looking at the list, it was clear that I would need at least 2 parts to cover all of the concepts with just one exercise per concept. If I want to go more in-depth on a concept (split a concept into 2+ more specific concepts), I'll need to expand the number of parts to the tutorial series.

As I actually wrote the tutorials, I realized that I had to cover some of the topics I wanted to leave out:

  • or | - the example text I picked had enough variation in format that to actually complete my motivating task, I'd need it

  • flags: while I'm not teaching how to use them exactly, I did need to note their existence when discussing the case-sensitivity of regular expressions

  • negation in character classes: I put is as an "additional concept" bonus material at the bottom of the tutorial - I don't plan to actually teach it

I ended up with the follow sections in my tutorials:

Part 1:

  • fixed matches

  • match anything .

  • repetition

  • limiting repetition (non-greedy)

  • character classes

Part 2:

  • word boundaries

  • beginning and end of lines

  • capturing groups

  • substitutions

  • or operator

I added a part 3 for more practice putting all of the syntax pieces together (no new concepts -- just combining them), and a part 4 that is using regular expressions in either R or Python depending on what language folks use.

I have not taught these materials live yet, so there's a chance I'm covering too much too quickly. I plan to adjust once I've taught the series once or twice.

Additional Notes

Language Basics series require more orientation materials for learners and structure to help them navigate a series. We do include software installation instructions (when needed) for these series, but we address any installation questions or issues outside of the tutorial teaching time. We have separate consultations or office hours if they need help.

Last updated