owned this note
owned this note
Published
Linked with GitHub
Hackathon for Notebooks in Training
===
*Tuesday, May 30, 13:30 - 17:00 (Room: Ask)
NeIC Conference 2017*
### Background
Jupyter Notebooks and other similar interactive web-based tools have quickly gained popularity. They provide convenient environment for light-weight programming and for that purpose are ideal for tutorials, demonstrations and training courses. Notebooks allows to combine documentation with live code, making it easy to create interactive step-by-step exercises. In this workshop we develop and adapt notebooks to fit your training needs and ideas. The notebook environment is provided from CSC’s cloud service and previous experience with the technology is not strictly necessary.
The hackathon is aimed at participants who give training, technical support for training or are otherwise interested in hacking notebooks. Programming experience will be useful, but the idea is to have different people working together and sharing their skill-sets.
The hackathon is hosted by Aleksi Kallio and Jyry Suvilehto from [CSC](www.csc.fi).
### Agenda
- 13:30 Introduction (Aleksi Kallio)
- Introduction to Jupyter Notebooks
- Other notebook environments
- Why notebooks are good for training?
- Hackathon practicalities
- 13:45 Introduction to hacking notebooks with Pebbles (Jyry Suvilehto)
- Hackathon environment: Notebooks at CSC
- Walk-through of example course notebook
- Jupyter Notebooks - the fun hacking points
- 14:00 Getting started with hackathon tasks
- 15:00 Coffee available
- 15:30 Continue working with hackathon tasks
- 16:30 Wrap-up of results
- 17:00 End of hackathon
### Practical
[Notebooks](https://notebooks.csc.fi)
1. Log in (give us your email to get an invite if you don't have a Haka Login)
2. Go to "Account->Join group"
3. Paste **dangerzone-7c3c40f875f945b99f996e099d5fcbbd** as the joining code
4. Launch **"OS Jupyter Datascience (Hackathon) - DANGER ZONE"**
5. Click "Open in Browser" and follow instructions
Example standalone playbook [https://github.com/csc-training/R-for-beginners](https://github.com/csc-training/R-for-beginners)
### Tasks
#### Hacking task: Create a notebook to teach X
If you are unfamiliar with notebooks but are familiar with programming this is a good chance to try out creating a notebook on a relatively familiar topic. It is recommended to do this in groups of at least 2, unless you have something specific in mind.
The goal is to introduce a good workflow for working on things.
Suggested steps
1. Decide a topic
2. Plan your notebook on paper/flap board
* Will it be a standalone notebook or discussion offered aside notebook
* What is explained and what must be tried out? Is something left to discover?
* Focus on the key points
3. Outline your notebook with short explanations of what will be said, shown or required in each cell
4. Start filling out the content either from the most interesting one or from the beginning
Things to ask yourself:
* Will this support or lead away from the narrative?
* With notebooks the responsibility is left to the reader, but mentioning everything in a side note leaves too much responsibility to the non-expert reader
* What must I say, what can I show?
* Is this obvious to an average reader? What am I assuming that the reader has done
* Is this exercise anything like the previous code example?
* People learn by mimicking and students generally start an empty coding example by copying the contents of the previous code example and modify from there.
Example topics/concepts:
* A visual introduction to normal distribution
* Reading in data to Python using pandas/csv/some other well-defined tool
#### Hacking task: Automatic exercise checking
Start working from the example notebook (hacking-jupyter.ipynb). Looking at example "IPython widgets and plotting", you have code for computing y from x. Now code for y is given, but on a course it could omitted and left as an exercise for the student.
- Create separate code cell that checks if y has correct values
- How do you check it without repeating the correct answer?
- How to allow for numeric in-precision?
- How to encapsulate code for computing y and use unit tests for checking it?
- How to check running time of student's code?
- How to check scalability of student's code?
- How to check if correct programming constructs are used in student's code?
Aim to create a clean solution that addresses some of the questions stated above.
Formula for y is trivial, but you can change to something more complicated if needed.
You can assume that the student cannot change the code cell for exercise checking. In real life cases it might be necessary to move the checking code outside of the notebook (behind REST API for example), if it is needed for course grading as an example.
[Introduction to R](https://github.com/csc-training/R-for-beginners)
To check out a project via a terminal, run
git config --global user.name "John Doe"
git config --global user.email "john@doe.org"
#### Discussion task: Notebooks in training day flow
There are multiple schools of how to use notebooks. Typically instructors follow pick an approach that works for their first need and don't deviate from that. This task is aimed at educators and trainers who wish to expand their horizons in a small group. Experience with using Jupyter Notebooks for training is not required, but experience in designing and implementing training is preferred.
The heaviest (for the author) is a completely self-standing notebook, where the text between the examples reads like a schoolbook. Such notebooks can just be left to be discovered unsupervised.
Another approach is to use similar notebooks with trainer supervision. Students can proceed at their own pace and ask for help when they need it.
Notebooks can be used as a concretising tool interspersed around a lecture. Every 5 to 10 minutes the lecturer stops and everyone does a small exercise related to what was just said. After that depending on the task students can discuss their solution with their neighbors, there can be a group discussion or the educator can show the correct answer. The challenge in this is to make sure that the quick assignments are actually quick for most participants. This is usually achieved with iteration.
What approaches would you you use in teaching what kinds of tasks? Does the target group affect the approach? Is it possible to write a single notebook and change the approach based on the audience?
The expected deliverable might contain
* examples and heuristics of what approach is suited to what kind of teaching/learning
* best practices and ideas on how to ensure assignments improve learning results instead of hindering them
* what are easy tricks to engage users to go beyond the content covered in class?
#### Discussion task: Notebooks for course pre-requisites
A notebook can be used to document and check pre-requisite knowledge for a course. One example is given here: https://www.csc.fi/web/training/-/r-for-beginners
Discuss and plan how notebooks could be used on your courses to improve the match between course contents and students' previous knowledge.
### Participants in groups
Group 1, back on window side (Create a notebook to teach X):
Group 2, front on window side (Automatic exercise checking):
Group 3, back on door side (Automatic exercise checking):
Group 3a, in the back, doing their own thing ...
Group 4, front on door side (Notebooks for course pre-requisites):
### Conclusions
Executive summary: TBD
#### Summaries for each group
Task 1
- hard to interact with text cells (for Slurm submit file exercises for example)
- hard to have exercises in notebook but working from terminal
- script to automatically remove solutions from notebooks
- hard to edit files in terminal
Task 2
- hard to separate testing of the code
- student needs to remember to run autograding code
- easy implementation of autograder: code encapsulated into function, REST service that gives random input and checks if returned output is correct