Our Inspriation for this project came from our teammate Yu Peng who (for some reason) have decided to take 42 MCs this semester. After watching him struggle to plan his schedule especially when he got tutrekt (did not manage to secure the tutorials he wanted) and had to completely replan his schedule. However, he also lives quite far away and would like to minimise the number of days he spent in school.

Additionally, as we found that there were lessons we need not be present for, such as E-Learning sessions, we decided that it would also be useful to have an option to hide said lessons, so that they won't be counted towards the time spent in school.

As such we decided to make this timetable optimizer to do the job for us quickly.

What it does

Given a set of modules to take, it gives the user a set of "optimal" timetables for the modules. Optimality is defined by fewest days spent in school (excluding hidden lessons), tie-broken by time spent in school, where time spent in school is defined by the number of hours from the first lesson to the last lesson in each day.

Each lesson can be set to 3 configurations: Fixed, Normal, Hidden. Fixed means that we definitely want that class slot (and will be physically present for it), and as such the optimizer will ensure the class is fixed in the place chosen. Normal means we have to be present for the class, and Hidden means we do not have to be physically present for the class.

How we built it

We chose to implement this feature via a chrome extension instead of forking NUSMods as we thought it would be easier without needing to understand the NUSMods codebase. This also allows us to be able to use it for ourselves immediately :D. We built it with Typescript, React, and Chakra UI.

Challenges we ran into

We weren't very familiar with front-end development, and as such ran into many issues while trying to design the UI for the extension. Additionally, we initially wanted to implement a feature to let users choose timeslots which they want to block out, so that no physical lessons will be scheduled at those times, but due to us choosing to use a Chrome Extension instead of forking, we were unable to implement this in a nice way. We also had to fight with React's control over DOM elements, as we needed to reinject our custom changes after each render (we realised in hindsight that forking the repo would have let us modify the React components directly, which was not possible as an extension).

Accomplishments that we're proud of

We can optimize our timetables now :)

We completed our first hackathon :D

What we learned

We were not very familiar with frontend development and especially chrome extension and had to find work arounds and "hacks" to implement some of our features given the limited time we were given.

We learnt more about Typescript and how to develop a Chrome Extension as well as developing together as a team with git.

What's next for NUSMods Timetable Optimizer

1) Add the feature to block out timeslots in the schedule.

2) Sorting optimal schedules in decreasing minimum vacancy for higher likelihood of getting the desired slots

3) Taking into account location of venues to consider travelling time between lessons.

Share this project: