Felienne Hermans
Felienne Hermans
November 3rd, 2021

Code Reading Club Reading Countdown

Article cover photo

A culture of writing code

In my book and in many talks I have discussed the culture we have in programming (and programming education) where we assume students but also professional learn programming by doing a lot of programming. This is embodied by for example the idea that you "need" an open source project outside of regular hours if you want to be a good programmer, the idea that to learn a language building something small like a todo list app is the best way and also a bit by Advent of Code, where people solve a little programming problem every day in December as a means of deliberate practice.

Now of course there is nothing wrong with writing code, and there is nothing wrong with Advent of Code! It is just that only writing code is a bit limited to only write code as a means of getting better. Especially if we know that professionals spend about 60% of their time reading code!

To compare with physical exercise: if you train for a marathon, you will do various things! Slow low runs, quick interval trainings, core exercises etc. The goal of code reading clubs has always been to widen the activities we do as a field to advance our own skills.

In many talks I have used Advent of Code as an example of our focus on writing, saying something like: there is no Advent of Reading code (f.e. I say that think literally here: https://youtu.be/jjMlguOrWHc?t=886)

But after saying that a few times I was like: well why isn't there an Advent of Reading Code? So.... let's do this!! But of course we do not want to do this alone.... And you can help us with sharing code snippets.

Code Reading Club Reading Countdown

We do different things when we read code, sometimes we are searching for a right answer like: "where is this variable initialized" but sometimes we are reading more to understand code. In my book I talk about these different type of programming activities is more depth if you are curious!

Because of these different forms of code reading activities that exist, we envision different types of code reading exercises too. Specifically:

  1. "Quiz" like questions with a right answer, like:
  • Where is variable x initialised?
  • What values can y take over the course of this snippet?
  • What type of variable does function f return?
  • In what lines is variable z accessed or set?
  1. Open questions that are more meant for reflection, like:
  • What is the most important line of code?
  • What decisions were made while making this code?
  • Summarise this code in 5 sentences.

We will mix up different types so it remains exciting and fresh for the whole month!

We deliberately choose to present the code snippets as images rather than as code you can run. Of course you are free to copy the code and examine its execution, but the idea is to practice the skill or reading itself!

Some examples

Quiz-like questions

Here is something we might use as a quiz-like question, asking you whether all these regexes are the same.


Open questions

An example of an open question could be to ask you for a summary of this code snippet in natural language.


Help us!

As experienced code reading club runners, we have a few lovely examples we can make into Code Reading Club Reading Countdown Puzzles but... we'd love your input too! Submit your snippet in our form and if we select it you will get a shoutout on Twitter and of course we count that as a submission for the day!