How I Earned $400/Week for Doing My Homework

A Story from My College Life

Mayank Bansal
7 min readApr 8, 2021

I was recently going through old pictures and some of my old projects, and I stumbled on some content that made me want to write this article!

While I was a rising senior at Illinois Tech, I decided to spend the summer doing some extra classes to graduate one semester early the following year.

Summer classes were offered in three batches starting a few weeks after the Spring semester ended. After an exhausting spring semester, I wanted to fly home to India and spend a few weeks with my family. I had come back to the U.S. just in time for the third batch of summer classes starting the last week of June.

At the time, I did have a part-time job as a Student Assistant at the residence halls where I had to sit at a front desk and help students with any residence-hall-related issues and help with emergency evacuations if necessary. Since our campus wasn’t gated, I had to make sure there weren’t any unauthorized people entering. 90% of the time, I wouldn’t really have to do much — especially during odd hours. Most of my shifts were from 12:00 AM to 3:00 AM and/or 3:00 AM to 6:00 AM. I spent all of that free time doing homework or assignments anyway!

This is what my schedule looked like! Yes, I was nocturnal.🦉

As most international students will know: students on F1 Visas can only work 20 hrs/week during the semester and 40 hrs/week during the summer. All of the students doing this job would meet at the beginning of each semester to set schedules that worked for them based on their class schedules. With 20 hrs/week, students could expect roughly $220/week at $11.00/hr (minimum wage in Chicago — 2017).

My midnight workspace at the residence hall! On the right, we have an example of how your friends would show up and distract you!

Since I went home for the first half of the summer, I missed the meeting where everyone worked out their summer schedules and assigned shifts for the whole summer. When I came back, I had nothing assigned to me, and as a student in Chicago (or anywhere really), I wanted that extra money to enjoy the sunny Chicago summer.

The beautiful Chicago Summer!

The only way to pick up shifts was using this online shift management tool called WhenToWork. Obviously, many students lived on-campus during the summer, and those who had this part-time job made sure their schedules were full with 40 hours worth of shifts every week — some booking a 12:00 AM to 8:00 AM shift five days a week to make up their 40 hours. The employees that had made plans with their friends during the day would cancel their shift, and it would go back on the online shift board for someone else to pick up.

Now I just had to pick up these canceled shifts and try to fill up my schedule. Easy, right? Nope.

The problem

Now, I wasn’t the only employee that didn’t have a 40hr/week schedule filled. In fact, I wasn’t the only one with 0 hrs/week. All the desks had a computer that the assistants would use to check in guests and see any alerts. They would also have a browser tab open on WhenToWork so that if someone canceled a shift, they could pick it up. Since they were on their phone for most of their shift, they would get notifications for emails that WhenToWork would send everyone when a new shift was added to the board. There were six of these assistants across campus at any given point in time. If I was cooking or taking a nap and saw my phone five minutes after the ‘Shift Available’ email was sent, 99% of the time, the shift would have already been picked up by someone else (the ones at the desks already). It was brutal!

The solution

I’m going to preface this part by surfacing this quote:

“Software is the language of automation.” — Jensen Huang, Co-founder, President & CEO of Nvidia Corp.

Sorry, that was a very long introduction for a mini tech article detour. Now let’s dive into what I actually did! I was not jobless enough to keep my eyes on my inbox 24x7, but I was indeed jobless enough to write some code 😃.

To my amusement, this WhenToWork shift board was not rate-limited. You could refresh the page as many times as you wanted. The previous semester I took cs351-systems-programming and worked on building my first shell. Inspired by that assignment, I spent about a total of 3 hours learning to use selenium to write a small web-scraper with a CLI that looked at the job board every 3 seconds. It took in some command-line arguments, logged into your account in Chrome’s headless mode, and would view both the logged-in user’s schedule and the available shifts page. Whenever it found a shift that didn’t coincide with a shift I already had (in another building), it would attempt to pick it up through the UI. Based on my tests, its success rate was 100%!

Screenshot of the server doing its thing!

Why 3 seconds? After running some science experiments in debug mode, I realized that if you picked up shifts within 3 seconds of it appearing on the shift board, the asynchronous server task on WhenToWork that sent everyone the ‘Shift Available’ emails would get canceled. No one would even know that there was a dropped shift. 😈 This was crucial because the person who canceled their shift wouldn’t care who took it, whereas the person who opened one stale email after another would get suspicious after seeing my name a couple of times. I wish I had taken a screen recording in debug mode to be able to show this magic in action.

How far did I go?

Unfortunately, I wasn’t religious with version control. I didn’t push the last commit with some major improvements (it got lost on an older laptop) like class schedule management and safe acknowledge. It basically allowed me to put in my class schedule for the semester and make sure it didn’t automatically pick shifts that conflicted with one of my classes. Safe acknowledge ensured that it automatically canceled a shift if I didn’t acknowledge an auto-picked shift within one hour of the shift start time.

As you might find in the code TODOs, I wanted to use the tool to scrape my schedule and automatically enter it into my timesheet, but it wasn’t worth my time. The number of optimizations I was ready to build could’ve eventually made this a paid SaaS product. For example, I almost built a setting that prevented the tool from picking up shifts back-to-back in buildings located on the opposite sides of campus (because it would take you ~7 mins to walk there). Why do I have to do residence hall shifts when someone else could pay me to use my software? 😅

Warning: The code is insanely messy because I was learning at the time, and I needed something extremely rudimentary, but here is the (incomplete) Github repo — read at your own risk!

To those of my friends and colleagues who were Student Assistants at the residence halls while I was on campus: I’m soo sorry — there wasn’t really a way for you to beat this tool. For what it’s worth, I used it in its most aggressive settings only during the summer and used it sparingly during the semester after. Karma did get me, and I did get fired just before my final semester started, for being 1 hour late to my shift. I was overloading that semester — taking 21 credits (7 courses), so I guess it was a blessing in disguise?

❤️

Comment below and tell me about some of your projects that solved some unique problems in your day-to-day life. If you have feedback or want to connect with me, please reach out on Linkedin. Follow me on Instagram to see what I’m up to! Learn more about me on my website https://manky.me.

--

--

Mayank Bansal

Frontend Engineering | Design | Fintech | Freight | Logistics | Immigration | Helping build finance solutions for freight carriers @Outgo ! Ex-Convoy 🦄,