The largest hackathon in Canada is Hack the North, hosted by the University of Waterloo. I was fortunate enough to be able to attend it this year for its 10th anniversary, the weekend of September 16th, 2023. Hack the North is a 32-hour hack, starting at midnight on Friday and ending at 8 am on Sunday.

Pre-Hacking

As with most hackathons, applications for the event are done prior to the event. I applied in August and received notice of my acceptance in early September. I was lucky to know other computer science students at UofT (Ari, Kaylee, and Rudy) who were attending so that we could build a 4-person team in advance.

Of course, if you are unable to get a full team prior to the first day, there are hackathon-hosted team-building events, both in-person and on the hackathon Slack. I personally would recommend finding like-minded people on Slack first; this worked out rather well for me in 2022!

My team and I actually had a couple of Discord calls prior to the hackathon weekend to scope out past years’ projects and come up with ideas. Most hackathons, but Hack the North especially, have a number of hardware sponsors. This year, some examples included: AdHawk Mindlink glasses (eye-tracking/vision glasses), Neurosity Crown (EEG sensors), Viam rover kits, and various drones and robots. There was supposed to be quite the selection for hardware-based hacks, and my team and I were quite excited to get our hands on some of this hardware. We had at least five separate ideas for using the Mindlink glasses…

Friday Night

Hack the North provides free bus rides for a select number of areas, the downtown Toronto area capturing UofT and TMU being them. They also offer remuneration up to a certain amount for those arriving by other means, such as if you were to fly in.

As we were coming from downtown Toronto, my team and I boarded the sponsored bus on Friday at 3 pm. Well, it was more like 4 pm by the time we actually got on the bus and left campus, but we ended up in Waterloo at 6 pm as expected. There were actually quite a few non-UofT students on the bus! A number of UBC students had flown into Toronto and were on our bus. Regardless, opening ceremonies were at 8 pm, so there was enough time to get settled in. We found a nice room to store all of our stuff and where we expected to code for 32 hours straight.

Near the end of the night, the hardware was starting to be handed out. Some essentials are free to grab, like transistors, LED lights, photo-resistors, etc., but we’re hoping for one of the aforementioned sponsor items. But these items are the most popular; Hack the North announced that they would have to give them out on a lottery basis.

Idea Generation, Part III

Midnight arrives just when we realize that we likely won’t receive the hardware for our idea, which is when the hackathon officially begins. Without these items, it would be very difficult to complete our intended project. Students of course are welcome to bring their own materials, but we didn’t have much between ourselves.

At the same time, a funnel cake stand arrived. (As an aside: if you have a sweet tooth, Hack the North is the place to be. The two days were jam-packed with a variety of candy and other sweets.) We decide to wait for our materials… outside in the funnel cake stand line. It is very cold outside. We agree amongst ourselves that if 1 am passes and we have yet to receive hardware (or, to be honest, we get our funnel cakes with no notification, as the line is pretty long), we will pick a different project. We begin brainstorming frantically.

Even still, I’m not sure who brought up the initial idea or what it even was, but with four relatively tired brains, we came up with the idea of making people code through dance. Get up and dance in front of your computer screen, and then out comes Python code… won’t it be so efficient? Won’t you get so much exercise done?

With the idea settled, the next item on the itinerary is naming our project. By the time we get our funnel cakes, it’s just past 1 am and we’ve settled on ShiftyTech as our final product.

Actually Coding

Now, it’s just time for the hard part. I won’t get into the nitty-gritty details of each and every roadblock, but none of us have worked with pose estimation before, so it was quite the experience.

To sum it all up: we look up models, learn about the difference between pose estimation and instance segmentation (instance segmentation wasn’t very helpful for our use case), and try valiantly to use an instantiation of Google Cloud’s virtual machine. It’s a lot of trial and error, but eventually we get TensorFlow’s MoveNet Lightning model to work. For each pose, this returns a multi-dimensional tensor of size [1, 1, 17, 3], with points corresponding to various key figures on the body. A large number of them are focused on the face, such as the eyes, nose, and ears. There are also joints such as the shoulders, elbows, knees, and so on. We try to first visualize these tensors onto the image input for a sanity check, and then sort through a set of pre-determined poses to classify new inputs. We spend the night asking mentors how to optimize sorting matrices as opposed to working solely with flattened vectors.

Most hackathons have a robust mentor system; these are people with a variety of skills and experiences who are volunteering their time to help teams troubleshoot their issues. Whenever we got stuck, we filled out a ticket on the Hack the North website and would shortly get matched with a mentor on Slack. Even if our problem wasn’t quite in the mentor’s area of expertise, sometimes it is helpful to get an outside perspective on your problem.

During the day, we spend most of it testing and improving our accuracy. There are at least a hundred pictures of me out there somewhere in random poses, as we were creating our own dataset to fine-tune the classification problem. We changed our model from TensorFlow MoveNet Lightning to Thunder, and learned how to normalize the vector representations of the poses. This improved our accuracy by an incredible amount. We were also manually fine-tuning the poses so that we picked ones that were easily discernible by the model. It was nearing the end of the day when we finally settled on the pose estimation process.

Now, it was only time to… connect everything together? With the remaining hours of the day, we spend all our time trying to connect our model and the computer’s camera to actually map the pose inputs to Python code. We connect the camera and the classifier to Replit, which is a wonderful online and collaborative IDE. We spend a number of hours, multiple times, to realize that the source of our errors is a difference in personal laptop settings. Oops.

By the time 4 am rolls around, we are mostly done coding. When we test our work, it largely runs as expected. Now, it is time to put together the final presentation. In a hackathon submission, you typically have to create a demo video; a short write-up describing your project’s motivations and implementation; challenges you’ve encountered, and so on. So we run around the building, recruiting mentors, volunteers, and even some very generous hackers to be in our demo videos. We edit the video and submit it just past 7 am. We sleep.

Jobs & Such

All the while on Saturday, I learned that companies actually hire at hackathons. Talent acquisition from TD reached out late Friday night, and I am suddenly scheduled for an interview on Saturday morning. The interview lasted about 45 minutes, where I mostly learned about the position and got to walk around the Waterloo campus. Offer details were finalized later that evening. I’m very grateful for the opportunity to learn more about such opportunities in Waterloo, and though I ended up not accepting the position, I learned that hackathons can truly help in getting your foot in the door. Be sure to send your hackathons your resume when they ask.

Presentations, Judging, … Winning?

In addition to the video and write-up submission, teams present from around 9 am to noon. Everyone presents to the Hack the North judges, but if you feel your project aligns with one of the sponsor prizes, you can also choose to present to them. We wake up just in time to present, in quick succession, to the MLH representative, the Hack the North judges, and then the Replit team. We fall asleep right after.

…Consequently, we miss closing ceremonies. It’s around 4 pm when we wake up, and see the following message on our Devpost.

A comment interaction showing that the team overslept

Needless to say, we were quite confused. It’s only then that we realize… we won the Best Hack Built on Replit category! I think we were all in shock for the three-hour bus ride back… it was a great moment.

Acknowledgements

Huge thank you to my teammates for making ShiftyTech possible, all the mentors for putting up with our incessant questions, all the patient volunteers for helping out in our demo videos, and the Replit team for enjoying our project! And Hack the North 2023 for putting all this together, of course.

Hack the North and hackathons in general are great opportunities to meet other people, grow your technical coding skills, and all around make some fun memories.