Whatever the side of the fence you’ve been on in trainings - teacher or student, I believe we all share the same experience: it’s very hard to stay focused during a couple of hours. This has only become worse in recent years, with mobile phones being a huge source of distraction.
The consequence is that the most important part is the practice. Students need to put in application what they just learned in order to:
- get a better understanding
- have a longer knowledge retention period
I started teaching when I was still a student, more than 15 years ago, without any teaching training. When I prepare a new lesson, I focus a lot on the hands-on part. Sometimes, I go as far as preparing a workshop first, and then build the course upon it.
Here are some approaches I’ve used over the years.
Grasping at straws… in the dark
Earlier, I wrote my workshops on Word documents. To distribute them, I first used USB keys, and later Dropbox and Google Drive when Internet and cloud-based apps became ubiquitous.
I coded the solutions live in front of the audience, while explaining and answering questions if necessary. Upon request, I handed them over the solution code in zip archives.
This approach obviously has a lot of issues:
- What if nobody asks for the solution
In that case, no student has access to it. And they cannot review it at a later stage.
- What if some students don’t attend
The solution can obviously be given to them. However, it’s in its final form: they don’t get to see the steps. I think that is a huge obstacle in the understanding process and preparing for the exam.
- What if the problem statement needs to be updated
The teacher must contact each of the students individually to tell them about downloading the document again.
I contemplated the usage of Docker images for workshops. I don’t think this is a good idea for several reasons:
- Students will need to learn how to perform the setup anyway
- Docker is a great way to setup application servers. I have more doubts about IDEs.
- My experience taught me it’s quite hard to install new software such as the Docker engine in public education organizations
Source control and pages hosting
Some years ago, I learned Git. I realized it could solve the above issues, if coupled with some other technologies.
- Workshop instructions are written in Asciidoctor format
- Instructions and code are managed in Git.
masterbranch contains the workshop starting state, while the
solutionbranch contains each step for every task up to the final state. Finally, the
documentationcontains the instructions, as well as the build script (see below)
- Everything is stored on Github.
- Each pushed commit triggers a build on TravisCI. This transforms the Asciidoctor sources into HTML.
- The generated HTML is made available on Github Pages.
Gitlab is a great alternative if you want to keep the sources private. It offers build capabilities similar to Github’s, but as an integrated build tool, as well as hosting.
I don’t believe there’s a universal solution: this works pretty well with the second workshop, about servlets. Java EE development requires a lot of setup, and workshops are no exceptions. Besides, web development requires visual feedback.
However, for Java fundamentals - or for any other language fundamentals for that matter, an IDE is overkill. They allow for debugging, but on the flip side, they make things more complicated than they should.
Also, using a testing framework to check if results are correct is awkward. It’s hard to first tell about, say, TestNG if students don’t know about annotations. This becomes a case of a dog chasing its tail.
That IDE barrier got me thinking about an alternative.
Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages.The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
In a nutshell, Jupyter notebooks allow to execute code from a local document in a browser and see the output in the same page: it’s all about interactivity. For example, the following is taken from Jupyter’s website:
import ipyvolume.pylab as p3 import numpy as np fig = p3.figure() q = p3.quiver(*stream.data[:,0:50,:200], color="red", size=7) p3.style.use("dark") # looks better p3.animation_control(q, interval=200) p3.show()
- Java 9
- Jupyter notebooks
The kernel can now be installed using the documented procedure.
To test the newly installed kernel, use the following command:
jupyter console --kernel=java
This should output the following:
Jupyter console 5.1.0 Java 9.0.4+11 :: IJava kernel 1.1.0-SNAPSHOT Protocol v5.0 implementation by jupyter-jvm-basekernel 2.2.1-SNAPSHOT In :
Try typing any valid Java command e.g.
To launch the notebook, use the following command in the folder you want to create (or use) notebook files:
I played a bit to re-create the Java workshop referenced above using a Jupyter notebook.
This is a part of the result:
Several tools are available for free to help teachers and trainers in their tasks. For coding courses covering basics, Jupyter notebooks are a great asset, removing the hassle of setting up an IDE.