Motivation

Overview:

  • Teaching: 10 min
  • Exercises: 0 min

Questions

  • What are the challenges in developing teaching material for programming?
  • Why do we like Jupyter notebooks?
  • How can NBfancy help?

Objectives

  • Understand the motivation behind the development of NBfancy
  • Find out what problems NBfancy solves

The current method

In our experience the development of training material, tutorials and lessons for programming can be fairly ad-hoc. The process usually goes something like this:

  1. Start a document in your editor of choice
  2. While (not finished):
    1. Write some narrative
    2. Write some perfect example code in a separate text editor/IDE/terminal
    3. Run code (and it works first time!)
    4. Copy code to document
    5. Copy output to document
  3. Write slides/handouts/exercises ...

Of course this assumes the perfect world where eveything works first time. The ususal story is by the time we start working on the second example, we notice a mistake in the first example, or something else that is needed, or a better way of writing it. At this stage we need to go back stage 2 and typically several iterations are required. This process is time consuming, reduces the time we invest in the content and means, even minor changes can take significant effort and creating new material. Likely, if you are in this position, you just find someone elses material and hope that it fits your needs.

Software Carpentry

One example of a source of pre-packaged training material is Software Carpentry. We think this is a great example of how lessons should be organised, but the format doesn't lend itself to being readily edited.

Jupyter Notebooks

One approach to mixing code with the text of training material is a Jupyter notebook. This platform allows a user to write narrative and code simultaneously. The narrative is in markdown, a lightweight markup language with basic formatting. An ever increasing number of programming languagues are supported, with code executed and output viewed all in the same document. It is for this reason that we use notebooks as the basis for NBfancy.

NBfancy

While markdown is lightweight, as a superset of HTML notebooks can be made prettier by including additional fotrmatting, however this requires using yet another language while introducing additional debugging layer. We solve these issues by using NBfancy, a set of tools written to augment notebooks, to allow you to develop training material more effectively. We do this by

  • Providing a template for all of the material
  • Allowing richer content in markdown cells through keywords
  • Using Jupyter notebooks to mix documentation and code
  • Creating a simple workflow taking you from creating material to publishing it
  • Even more tools to aid creation of new material

NBfancy is also customisable and includes features that allow you to change the system to make it a tool suitable for your needs.

Key Points:

  • Creating new teaching material is difficult and time consuming
  • Notebooks can help to some degree
  • NBfancy is designed to enhance the features of notebooks