
Can You Teach AI to Teach You?
“Education Is Not the Filling of a Pail, But the Lighting of a Fire”
Often attributed to W.B. Yeats
“I cannot teach anybody anything. I can only make them think.”
Often attributed to Socrates
Background¶
This is a jupyter book for the course Introduction to Computer Programming at City University of Hong Kong. The course aims to introduce key concepts, techniques, and good practices of programming using a high-level programming language Python.
Course Intended Learning Outcomes (CILOs):
Explain the structure of a computer program.
Analyze, test and debug computer programs.
Apply proper programming techniques to solve a task.
Construct well-structured programs.
Teach Year ~1 undergraduates “plumbing”[1] with Python:
Designed in 2019 (during COVID-19) and implemented since 2020/21 Semester A.
Grown to >600 students in 2025/26:
~240 CS, ~370 non-CS students
~440 non-CS studnets in semester B
Courseware¶
An in-house kubernetes cluster to run interative teaching materials.
Interactive Python/C++¶
import ROOT
print("Hello, World!")Hello, World!
%%cpp
cout << "Hello, World!\n"; Hello, World!
!nvidia-smi # Access to GPU if availableFri Feb 27 09:19:23 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 570.169 Driver Version: 570.169 CUDA Version: 12.8 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA RTX 5880 Ada Gene... Off | 00000000:1E:00.0 Off | Off |
| 30% 29C P8 32W / 285W | 2MiB / 49140MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Integrated with GenAI:¶
%%hermes
Explain briefly the ingredients involved in writing the following program:
--
def gcd(a, b): return gcd(b%a, a) if a else abs(b) # one-liner for GCD🌿 Fork/new: main (will create on click)
See Also
To write the program def gcd(a, b): return gcd(b%a, a) if a else abs(b), the following ingredients are involved:
Recursion: The function calls itself (
gcd(...)) to break down the problem into smaller sub-problems until it reaches a base case.The Euclidean Algorithm: The logic relies on the mathematical principle that the greatest common divisor of two numbers doesn’t change if the larger number is replaced by its remainder when divided by the smaller number (e.g.,
b % a).Ternary Operator (Conditional Expression): The
X if Condition else Ysyntax is used to provide a concise way to handle both the recursive step and the base case in a single line.Base Case Logic:
if a: If is non-zero, it continues the recursion by swapping terms and taking the modulo.else abs(b): If is zero, the GCD is simply the absolute value of .
Modulo Operator (
%): Used to find the remainder of divided by .Absolute Value (
abs()): Ensures that if is negative at the base case, the result remains positive, as GCD is conventionally non-negative.
Interative Materials instead of PPTs¶
Over 200 questions for students to instantly check and debug their solution with AI.
Conduct computer-based exams in Safe-Exam Browser with restricted access to AI.
Misuse of AI¶
An Example¶
Student: John Smith (fake name)
Assignments: 99.55%
Midterm: 30%
The Bug¶
Misuse of GenAI to generate bug-free solution in assignments:
bypasses computational thinking in constructing good programs
bypasses opportunities to debug
creates an illusion of competence
CE-Quiz (INTED 2026)¶
In-class collaborative E-Quiz assignments with help from
A tailor-made AI model for
students to have AI-assisted visual debugger, and
instructors to provide quality feedback to lab assignments.
OPTMentor running in-browser without a server
Turns error into thought-provoking questions that help debugging.
Uses a highly portable small language models (SLM) trained on DIVE by a CS1302 student.
Agentic Coding¶
Student-Developed Packages in a Summer (Submitted to TALE 2026)¶
hermes-acp-sdk- Python package for integrating the Hermes AI agent into existing applications with minimal code.traceback-coach- Explains Python notebook tracebacks in a structured, human-readable way with guided debugging questions.hermes-textstats- Lightweight text analysis tool for word counts, sentence counts, lexical diversity, and reading-time estimates.obj-tag-group- Utility for attaching tags to Python objects and retrieving them through tag or regex searches.sliveshow- JupyterLab extension for turning notebooks into animated slide presentations with live code execution.socratic-watchdog- Socratic TTS assistant that monitors notebook execution and provides spoken guidance when students need help.ultrasonic-img-steg- Package for embedding and recovering image data within inaudible frequencies of lossless audio files.
Core Concepts¶
Student-Developed Notebooks¶
Plumbing¶
Boldfaced co-authors were undergraduate students at CityUHK.
Chan, Chung, Suvernev, Bogdan, Zhao, Chao, & Wang, Zimeng. (2026). CE-QUIZ: AI-Assisted Debugging in Exams, INTED2026 Proceedings, Article 1724. doi:10
.21125 /inted .2026 .1724
Chan, Chung, Suvernev, Bogdan, Wang, Zimeng, Liang, Qihang, & Zhao, Chao. (2025). Making GenAI Socratic for Computational Thinking. 2025 IEEE International Conference on Teaching, Assessment, and Learning for Engineering (TALE), 1–8. doi:10
.1109 /tale66047 .2025 .11346691
Chan, Chung, Zhao, Chao, Chau, Wai Tong, Zhou, Yu, Liang, Qihang, & Lim, Michael. (2023). E-Quiz: Empowering Educators with a Self-Contained and Programmable Online Exam System. 2023 IEEE International Conference on Teaching, Assessment and Learning for Engineering (TALE), 21, 1–8. doi:10
.1109 /tale56641 .2023 .10398402
Chan, Chung, Kozhin, Assan, Liang, Qihang, Salter, Glenn, Tang, Ruoqin, Ye, Chunxiao, & Zhao, Chao. (2022). DIVE: Make Online Learning Diversified, Interactive, Versatile, and Engaging. 2022 IEEE International Conference on Teaching, Assessment and Learning for Engineering (TALE), 482–489. doi:10
.1109 /tale54877 .2022 .00085
Radul, A., & Sussman, G. J. (2009). The art of the propagator. MIT Computer Science and Artificial Intelligence Laboratory Technical Report, MIT
-CSAIL -TR -2009 -002.