Typing races are surprisingly fun, but also
have the practical benefit of improving typing speed
and accuracy. Computing edit distance for the
autocorrect feature is a motivating example of tree
recursion. While the project is designed for a
Python-based course, the open-source
React-based web GUI is also easy to read and
extend. There are lots of opportunities to extend
the Python portion of the project, for example with
post-game analysis of how fast each word was typed
or by adding more sophisticated autocorrect
||Built-in Python container types (lists, strings,
and dictionaries), list comprehensions, higher-order
functions, iteration, and tree recursion. This
project does not involve any user-defined
There are two hard questions out of nine,
giving students a substantial challenge along with
plenty of early wins. The project is heavily
scaffolded, and students are guided through the
program design and decomposition. Almost all of our
students completed the project with full credit,
although some required substantial one-on-one
Fun & Concrete - As students complete
each part of this project, new functionality is
added to their typing speed game. The game provides
visual feedback that lets students directly interact
with their code.
Full test suite - The project is
distributed with a full suite of tests that includes
fuzz tests for most questions to verify
the correctness of student programs.
Linear Completion - For the most part,
problems cannot be completed out of order, and so
getting stuck on one problem prevents students from
making further progress.
Highly structured - As the project is
written, students are not given the freedom to
design their own program structure. Instead, the
structure is provided, and students fill in the
logic of each modular component.
Edit distance is widely known - It is easy
to find implementations for the edit distance
The Python component uses only the Python 3
standard library. The web GUI is a static site that
is distributed with all of its dependencies.
Students can improve their autocorrect suggestions by:
- Improving efficiency through
- Taking into account physical distance on the
keyboard to determine what the intended word was
(e.g. someone who typed "mpre" probably meant to
type "more", not "mare").
- Taking into account common misspellings or
This project also provides an opportunity to
introduce miscellaneous string-processing questions,
- Translating the source text to Pig
- Analyzing what types of words a user
- Implementing autocomplete, which might make
this project suitable for a CS2 class.