Last semester I taught an introductory Natural Language Processing (NLP) course at Nanyang Technological University, Singapore. I wrote a thread about it on Twitter (now X) but here is a slightly expanded version with some of my key takeaways.
tldr; don’t assume basic computer science knowledge, emphasize workflow processes, tailor assignments, identify potential ‘crutches’, teach critical thinking, use tools that make things easier as well as some that make things harder
Don’t assume basic knowledge of computers and Computer Science
The students I am teaching are in their early 20s, and could be considered “digital natives”, but most of their computer use has been through touchscreens, apps and graphical interfaces which obfuscate the way a computer works. I grew up with DOS, learning its commands, files and folder structure, but over 75% of my 36-person class was clueless about these things. After having to regularly reiterate “check the folder you’re in” and “check that the file exists” for the first few homework assignments, I ended up adding notes on file management and folder structure to the course materials.
Proper workflow processes should be constantly emphasized
I largely inherited this course from more experienced NLP/CS folks, which was hugely helpful. They had a clear structure, had worked out most of the technical constraints, and this made my course prep much easier. But since the majority of my students had no programming background, I needed to spend more time on the basics of “how to program” by having a process that supports writing working code. Iterating through writing code with tests/checks for feedback, running the script, and then going back to edit needed constant emphasis.
Tailor assignments to multiple levels
This course required no prior programming knowledge/experience, but was also the only code-related course offered in linguistics last semester. So there were a handful of people in the course with some programming skills. It was a challenge to provide exercises that kept the experienced students from getting too bored while not frustrating the newbies.
ChatGPT can be a significant crutch
ChatGPT was released halfway through the course. I had made the projects & in-class quizzes/challenges open-internet, thinking that students could search for help to solve problems, which is how I learned a lot of the techniques I use in my programming. After all, why reinvent the wheel? During the quiz and in assessing the assignments, however, I realized that many of the students were simply asking ChatGPT to write the code. This made me laugh, because the code, while it ran part of the time, often did not accomplish the task being requested. ChatGPT would sometimes reference libraries or functions that sounded plausible but didn’t exist, and it would take longer for the student to debug than to simply apply the knowledge they should have gained from their homework practice. When I made this clear, some of the students improved and stopped using ChatGPT, while others still used it as a crutch. I actually don’t have an issue with students using it as a tool, but we need to be clear that it will not help a beginner programmer learn (and practice!) the basics of logical thinking required for creating programs to solve problems. I figured that if a student wants to lean on a crutch, they will simply not learn much from the course and there’s not much I can do about that.
Teach for critical thinking
Much of programming comes down to understanding 3 things: A) the problem you are trying to solve, B) the tools you have at your disposal, and C) the inputs/outputs. Often the first step is simply to try and think through each of these aspects and consider what solutions currently exist. Thinking through the problem in this way can save you hours of work and debugging down the road. This process is common to many different tasks, not just programming, and it’s one of the main things I tried to impart through the course and my feedback to students.
Use tools that make things easier, but also harder
Here I’m taking a leaf from Zed Shaw’s Python books/courses: sometimes the best way to learn is to do things “the hard way”. The previous instructor used VSCode, Jupyter notebooks, and Github Classroom. All are good tools but with caveats. VSCode is cross-platform so everyone has the same IDLE experience, which is great. But students may use the widgets and menus that obscure what’s actually happening under the hood, making things harder in the long run. Jupyter notebooks are great for illustration, but the fact that code blocks can be run out of sequence once it’s all in memory gets in the way of learning how to write working scripts. Github Classroom is an excellent way to keep assigments/projects/quizzes organized and to implement code tests/checks, while also introducing students to tracking/collaboration tools like Git. But for some the requirements of add/commit/push were hard to grasp. Going forward, I’ll probably continue to use VSCode for its cross-platform support, but will make Zed Shaw’s introductory chapters required reading and emphasize the terminal-editor-terminal workflow. I’ll avoid using Jupyter notebooks in teaching and will simply highlight their existence. I’ll continue to use Github classroom but will emphasize the command-line-interface rather than the VSCode widgets.
- students are starting out with less knowledge of how a computer actually works than I expected, since their experiences are mediated through UI that obfuscates things.
- good workflow processes need to be practiced/emphasized.
- assignments should be achievable but challenging.
- the limitations of tools like ChatGPT should be highlighted.
- critical thinking and problem-solving are key to successful programming.
- use tools that help with instruction, but not when they prevent learning on the part of the students.
Thanks for reading, and feel free to comment on any of this! Some of my takeaways are definitely related to what works for me in the context where I’m teaching, so take it with a grain of salt. What has worked for you, and what have you learned from teaching an intro Python/NLP/Data Science course?
In case you’re interested, all the material is online here: hg2051-ntu.github.io (scroll to the bottom for content from previous years), though as always the value of taking it in-person is the individualized feedback you receive.
Also, shout out to Drs Goodman and Bond for all the fabulous work they’ve done in previous years!