Nathan's Blog

These posts are largely technical writeups about past projects. I hope to add more interesting posts soon!


Posts

Spanning Tree, Matching, and TSP for Moving Points: Complexity and Regret

As part of my Master's Degree, I wrote a paper on optimal geometric structures for points in motion. The paper was accepted to CCCG 2023 and completed under the supervision of Prof. Subhash Suri. [...]

Controlling an Arduino from Python

There are a lot of tutorials online explaining how to control an Arduino from a computer using Python. Unfortunately, many of them are outdated (for Python 2), don't work on Windows/Linux, or are hard to extend to your use case. In this post, I'll show you how to control an Arduino from Python using camino, which offers fast performance over a simple API. [...]

cqdm

Python's high level of abstraction makes it an excellent language for succinctly writing complex code. But that convenience comes at a cost: compared to native code, pure Python can be orders of magnitude slower. Luckily, the CPython interpreter supports C-Extensions. These are natively compiled modules that allow Python to call performant C code. Almost every data science (numpy, scipy) or machine learning (tensorflow) package uses C-Extensions to get sensible levels of performance. And these use cases make a lot of sense, because they're performing big, expensive computations (like multiplying two large matrices). But can we also use C-Extensions to optimize small, cheap functions? In this post, I'll detail my progression to a 4.5x speed up of the popular tqdm library. [...]

Class Alerts

In high school (2016), a number of students started taking dual enrollment classes at a local city college. Dual enrollment students had the lowest registration priority, so our classes were always full and waitlisted. To help us get in, I made a script that would check the waitlists for availability and send an email when there was an opening. This proved to be very effective, and I ended up building a simple website around it. By senior year (2019) almost every student that was taking dual enrollment classes was using the website. During the summer before college, I rebuilt the project into Class Alerts, ultimately supporting eight colleges. [...]

Air Guitar

The Air Guitar is a self-playing electric guitar. It has a rack of 24 pneumatic pistons that it can move along the neck of the guitar. Using exclusively hammer-ons, it can play any MIDI file, automatically calculating a tabulation that minimizes motor movement. It includes a synthesizer to play backing instruments. [...]