Zachary W. Huang

Home Projects Blog Guides Resume

A Caltech Course Scheduler (caltech.dev)

The source code can be found here

During the summer before my freshman year at Caltech, I was having trouble figuring out which courses I wanted to take and which ones would fit into my schedule. In hindsight, this was not really something worth worrying about, as the majority of Caltech freshman take the same core classes regardless of major, but it gave me something to do. However, the main problem was that there was no easy way of determining if the courses we were taking (which had multiple sections at different times) had any conflicts.

In the process of figuring out my classes, I met Rahul and Eric, and we decided to make a new course scheduler that could automatically select course sections without time conflicts. We were inspired by turtle-pond.com, an existing but broken course scheduler, and the Donut scheduler, which was decent but not always up to date.

After a bit of experimentation, we wrote some Python scripts that could parse the course data from the Caltech course catalog, and we made a web application that allowed users to select courses, choose sections, display course info, etc. Personally, I wanted the UI to be similar to that of a video editor or DAW in that you could add elements, change their properties, and see the results visually. In the end, I was really happy with the result.

The current UI for caltech.dev

The main feature was, of course, the automatic course scheduler, which would try each combination of sections for each class and let you choose the one you liked best. The intended workflow was: 1) add courses using the search box and 2) browse the possible arrangements without time conflicts. If you wanted to keep a certain section for sure, you could also “lock in” the section manually.

Browsing some valid arrangements for a typical freshman CS major's spring term schedule.

After this core feature was done, everything else was simply to improve the quality of life. We used the localStorage browser API to allow a schedule to persist across sessions, added a text-based import/export feature, and added an info button to show additional course info such as the course description, recommended prerequisites, and student rating. We played around with a few different fuzzy-finding engines for the search box, and we got the best results with fzf (yes, there’s a JavaScript port of fzf). We also made each course entry drag-and-droppable. A few additional contributors then made improvements to the CSS and added the ability to collapse course entries.

To keep the scheduler maintained, I just re-scrape the course catalog a few times each term and update the data. In the end, this was a fun project, and I genuinely use the scheduler every term when I’m figuring out my courses. It turns out that non-freshman courses typically only have 1 section, so the automatic scheduler is not as useful as I thought it would be, but I think the other features make the app really nice to use regardless (especially the ability to have separate “workspaces” for different possible schedules).

RSS icon github logo linkedin logo

Zachary W. Huang © 2021-2024