Yesterday I delivered a talk at the AWS TIPS-2022 global event. The talk was about Jupyter Notebook, a Tool used mainly by scientists to display research results and document research theses.
Jupyter is a very flexible tool, and I wanted to show how to use the tool to explain and demo concepts from a completely different domain.
As a trainer, I always face the need to demo things during my training. The problem with demos is that their success depends on the amount of milk you sacrifice to the demo gods, and they are prone to accidental syntax errors and to skipping steps due to demo pressure.
Another issue with demos is that the students cannot painlessly reproduce the demo. Many students don’t get it the first time, and they would like to do it again, later, at their own pace.
My goal in the talk was to show and demo how a trainer can use the Jupyter notebook as a tool to demo and explain knowledge items in a way that will help to overcome those issues.
The use case I used to prove my point was explaining the AWS APIs and the AWS CLI using the Jupyter notebook.
Before I continue with the technical details of the talk, I want to thank my co-partners: Margaretha Mauer and Shivender Singh. The TIPS is a global event. Every talk was delivered three times, each delivery in a different time zone. Margaretha and Shivender jumped to the help and delivered the talks in the other time zones. It was teamwork. They had many good suggestions, and their active involvement significantly improved the talk.
To use the Jupyter notebook, you first need to download and install the tool. It is a straightforward process. Go to https://jupyter.org/install and follow the instructions for your OS.
Learning the basics of the Jupyter notebook is to understand the concept of putting your input in the “In” cell, Clicking on “Run” (or Shift+Enter), and seeing the results in the “Out” cell. The rest of the UI is intuitive and trivial to understand.
The Cels functionality is “Code” or “MarkDown”. In a “markdown” cell, you explain what you do and write instructions and guidelines. In a code cell, you write executable items that will show the results of running them after you “Run” the cell.
The main building block of demo-ing the AWS CLI is that the “!” (Exclamation sign) sends whatever you type after it to the underlying OS.
So writing “!aws s3 ls” in a code cell and running it will give you the command results in the Out cell. See demo 01 in the repository for more information.
Those basic building blocks are enough for using the Jupyter notebook to create a lot of demos. Use a markdown cell to explain what you do, follow it with a code cell that runs the command, and you get a repeatable demo that will run the same every time you use it.
At the end of the demo clear the output cells, Save the Jupyter demo file and distribute it to the student to try it themselves.
You don’t need to know Python to use the tool but, since Python is already there, why not use it. There are more or less 12 knowledge items worth knowing about Python to be able to use Python as a helping tool in your demos. Look at demo 02 in the repository for details. Even if you never learned Python before, it will be enough to get you on the right trail.
All the demos are in my git hab tips-2022 repository (https://github.com/GadJMeir/TIPS-2022) feel free to use them.
For some of the demos to work, you need to modify the pointing from my S3 bucket to your s3 bucket. For demo 07 (Recognito) you need to upload the images to your S3 Bucket.
Run the demos from the repository and see for yourself how easy is to repeat the demos and follow my steps as a student (Except maybe that the S3 Bucket needs modification).
Please give me feedback about using Jupyter python as a demo tool. You can send me cool demo ideas and I will add them to the repository.