I want to use all of my ridiculously many meal swipes
January 16, 2022
Tufts University requires all freshmen to be on its ✨Premium✨ meal plan, which includes 400 meal swipes per semester.
Divided out, that’s 3.5 a day. But using them all is a challenge — there’s many weekends last semester when I would eat one or two meals in Boston, and tons of mornings that I skipped breakfast. I ended the semester having only used 270 of my meal swipes, despite my best efforts.
Next semester, I want to use all of them.
At the end of last semester, I already started making lots of trips to the campus “grocery store” to buy extra granola bars, chips, and snacks to use up all of my swipes. But it was too little too late. (Also, in all honesty, I got embarrassed of how often I was going there.)
But this semester, I’m starting with a goal from the beginning. I’ve even created a page on my website to keep me on track: benborgers.com/swipes
The page grabs realtime data from my meal plan account, and also shows me how many swipes I should have used by now to be on track.
That way, I know exactly how many swipes I should be using to grow my excessive granola bar collection.
The technical details
If you’re curious about how this all works:
I wrote a Node.js script that uses Puppeteer to simulate a fake Google Chrome browser and log into JumboCash (Tufts’ meal plan website) using my username and password. It scrapes the number of meal swipes off the page and reports it to my website, which stores it in Cloudflare Workers KV.
When you load benborgers.com/swipes, it fetches the number of meal swipes I’ve used out of Workers KV and uses that data to construct the page.