(263g) A Scaffolded Approach to Process Modeling Education with Literate Programming Tools
AIChE Annual Meeting
Tuesday, November 12, 2019 - 9:48am to 10:06am
A common approach to the teaching of engineering modeling is to focus on the use of numerical methods techniques with a small amount of simple programming skills being needed to deliver the required results. Understanding the principles of the model, developing skepticism based on the âgarbage in, garbage outâ principle, and robustly interpreting the results are key steps at this early stage that then permit successful engagement with sophisticated simulation packages in later stage courses.
For teaching purposes, the mathematics and its embodiment in code are insufficient on their own, with inclusion of the context of the problem, a description of the approach in words and interpretation of the results being necessary. Jupyter notebooks offer a literate programming environment in which numerical methods and data analysis code can be interactively developed and refined in âcellsâ, while relevant rich context including text, images and equations is interspersed amongst the code. For the engineer undertaking one-off model development and also in the educational scenario, the Jupyter notebook offers the ideal fusion of code, documentation and output.
To scaffold the three-fold development in programming, numerical methods and discipline knowledge, we have created Jupyter notebooks in which problem statements (in Markdown, with images included and mathematics via MathJax) are accompanied by code cells (in Python or Octave). As well as the problem statement, questions come with some hints on possible approaches or fragments of code as starting points to help students. A small amount of guidance, without giving away the entire solution, allows students to attempt much harder questions and develop their skills. Within each weekâs tutorial set, progressively less help is offered as confidence and competence is gained.
To facilitate maintenance of the tutorial notebooks, the problem and solution notebook are generated out of the same annotated precursor/template notebook using some simple Python modules we have developed; the notebook with the problems is generated by redacting parts of the code to leave some partial solutions or fragments as hints, omitting the output of the code, and omitting the analysis of the model output. After editing the instructor-facing template to move questions, fixing bugs, improve explanations etc, the student-facing problem and solution sheets are both automatically regenerated.
Beyond the educational advantages of this scaffolded approach in the classroom setting, we have also found that marking take-home assignments where students work in outline templates was faster than where students work completely independently outside of the template. While little assistance is offered in these assessment activities, the notebook imposes some additional structure onto the work and may also hint towards using certain variable names, reducing the time required to decide on the grades for each piece of work, thereby allowing the time to be spent offering better feedback to the students. Jupyter notebooks can be exported to PDF and these are marked within our learning management systemâs PDF grading tools; alternatively, tools like nbgrader can work with the notebooks directly.
Hosting and deployment of any computational tool presents interesting challenges, particularly for large class sizes. The benefits and limitations of cloud-hosted Jupyter notebooks at CoCalc.com will be discussed and the use of the templating system will be demonstrated.