Category Archives: Teaching

Screenshot showing the corrections of video captions by Gemini. On the left are the original captions from YouTube, on the right are the corrections. Chemistry words like "diene" and "dienophile" are consistently fixed.

Fixing YouTube’s automatic captioning with AI

I use a lot of homemade YouTube videos as part of my lab courses. Most of the wet labs have a short (10–15 min) prelab video that covers whatever concept we’re exploring that week. Miami is also a little unusual (for US departments, at least), in that we teach the spectroscopy of organic compounds as part of the lab courses. In my classes, we do this using an inverted classroom approach, where the students watch longer (~40 min) lectures on IR spectroscopy, NMR spectroscopy, or mass spectrometry and then do an assignment in-class with help from me and the TAs.

So, there are a fair number of videos associated with these courses, most of which date from around the pandemic era. An ongoing problem, however, has been that the closed captions for these videos are just the ones generated automatically by YouTube, and they are terrible. Captioning by YouTube has improved in recent years, but 5 years ago it produced long, stream of consciousness rants free of punctuation or capitalization. Even for newly uploaded videos, the captions tend to have mistakes associated with misinterpreting chemistry words and are just too literal. I think the captions have more value if they edit out filler words (“um”) and correct misspeaking. (I have a bad habit of occasionally false starting sentences, double-speaking the first word or two. I don’t think it’s too bad in most of the videos, but I’d rather that the captions skip over mistakes like this.)

New standards associated with the Americans with Disabilities Act mean that all course videos now need to have quality captions. Honestly, though, I should have fixed these years ago. My wife and I can’t even watch Ted Lasso without turning on the closed captions. The value for students new to the chemistry “language” is obvious. The problem is that correcting hours of poorly constructed autogenerated captions by hand is extremely tedious.

I have recently become AI-curious, and this seemed like a good test project for an LLM. I am skeptical of most of the hype around LLMs, but if they are going to be useful for anything, surely it should be manipulating language.

Continue reading

Annotating lecture slides with an iPad and Sidecar, live and in recordings

I like to design my lectures around slides that can be annotated. When teaching standard organic chemistry courses, I leave lots of blank spaces (e.g., for mechanisms). This provides a bunch of advantages: it makes the students draw structures, which I think is important; it controls the pace of the lecture; and it substantially shortens lecture prep time by cutting down on all the ChemDraw.

Miami has installed smartboards in most of our lecture halls at this point, but I’ve never used them. I’m a bit too uncompromising as a Mac/Keynote user (this should work with PowerPoint too), and I’d much rather use an iPad. For years I used the Doceri app. This worked pretty well through many iterations of lecture classes, but I was never completely satisfied with Doceri; it does its job, but there were small nagging problems. For example, it has poor Apple Pencil support (at least as of a few years ago), and I never loved the way it would freeze the screen when you wanted to write something.

I spent a few years teaching mostly lab classes and put this sort of stuff aside. This spring, I was back to teaching second-semester sophomore organic chemistry and it seemed like a good time to revisit my options. I came up with a good working solution, then the COVID-19 outbreak hit and I had to move everything online. Fortunately, the same method works well for recording lectures and posting them to YouTube.

Continue reading

Modular, simple vector diagrams of glassware

Recently, I was working on an exam for a lab course, and wanted to ask a few questions about basic reaction setups. I had a harder time putting together simple figures than I would have expected. ChemDraw has some half-decent options but they’re useless if you need something they don’t already have and, let’s face it, those 3D flasks with the little logos are just trying to hard. After a few frustrating hours, I gave up, and decided that it wouldn’t be so hard to throw together the basics on my own.

Continue reading

A Python script for grading partial credit multiple choice: Part 4—The script

Here I thought I’d go through the script and explain its logic. The idea is that it could be modified to fit whatever format you get your MC output in or to change the information that it returns, hopefully even without a lot of programming experience.

Let me say at the outset that this was one of my first little Python projects. I make no claims that it’s particularly elegant or pythonic; in fact, I have plans for a newer version that will be a bit better organized. Criticisms always appreciated. That said, it does get the job done.

Continue reading

A Python script for grading partial credit multiple choice: Part 2—Using the script

So, in the last post, I introduced a little Python script that I use to process the output of Scantron forms. So how do you go about actually using it?

Python

The script is written in Python. I decided to pick it up a few years ago as a way to get back into simple computer programming and haven’t looked back. I use it a lot for little projects like this one and for some simple applications in my group’s publications (like nonlinear curve fitting). Unfortunately, Python’s not a compiled language so you’ll have to have it installed in order to use the script, which is written in Python 3, not Python 2.[1. Right now a slow transition is taking place from Python 2 to 3. There’s still a lot done in 2, but I chose to learn 3 because my need for external packages is limited. Also, Python 3 is the scripting language for Blender, which will be the subject of many future posts.]

Continue reading

A Python script for grading partial credit multiple choice: Part 1

In an ideal world, I think we’d all prefer faculty-graded, free-response style exams. Unfortunately, that’s just not really realistic for a chemistry professor teaching large service classes.[1. The largest classes I’ve taught have up to about 200 students.] While we do use online homework for the classes I teach, we’re not really set up to use these sorts of systems as a primary assessment tool. That leaves, of course, machine-graded, multiple choice (MC) as the go-to format for most (but not all) of my exam questions.

Continue reading