MHacks 6.

I applied for MHacks 6 the day applications were open. I checked my e-mail anxiously, probably 3–4 times a day looking for announcements from MHacks. Needless to say, I was excited.


Pre-Game

The team I worked with at MHacks V was full of really great people. We worked well together, and built a winning project; Eventose. Although we decided to discard that project, we kept in touch, and when MHacks 6 rolled around, we decided to work together again. Over the course of a couple months, we tossed several ideas back and forth. Everything from a reverse-eBay, to an app that allowed individuals to rent advertising space. We never really decided on a project, and the night before MH6, we decided, that in true hackathon fashion, we were just going to wing it.

I arrived at Pierpont Commons, about 2 hours before registration started. I always arrive early, because I do NOT want to wait 3 hours in a line that wraps around the block, yet this years registration process was delightfully simple. You told them your name, they passed a badge over a NFC reader, and you were in. I immediately went to the BBB building, where we had space reserved in the iOS cortex. We all said hello, got dinner, and started to think.

Missed Details

Soon after we started to discuss our idea, a someone pointed out a critical detail that we had all overlooked. MHacks reduced the maximum people on a team to four, instead of five. At first, we were all quiet, but we all knew what needed to happen. Someone had to leave, and find another project to work on.

I certainly wasn’t the first to jump up and volunteer, but me leaving the team just made sense. All four of those guys knew Java, and I knew Objective-C. Not only would my skills be better put towards a project built with other iOS developers, but they could put together an awesome Android app, and I would be useless to them. I said my goodbyes, wished them the best of luck, and went on my way.


Meeting Sean

A friend and mentor of mine, who happened to be mentoring at MHacks, sat down with me. I explained my situation to him, and he told me about a really cool guy he’d met earlier, at the API expo. At that time, I was really looking for an iOS team to work with, and this guy knew Node.js, and HTML. I didn’t think his skillset and mine were compatible , but I had no team, and hacking was already 3 hours underway.

The 3 of us sat down, and Sean and I started to toss ideas back and forth. I mentioned an idea I had for an Apple Watch app that helped you perform CPR by tapping the correct compression rate on your wrist, using the Haptic Engine. We decided that that project wasn’t really going to require any backend services, and therefore, would be better tackled by a completely iOS team, but that there definitely was a lack of healthcare related applications for the Apple Watch, and we really wanted to address that issue.

We came up with an idea, that would measure patients heart rates using the Apple Watch, without them being anywhere near a doctors office. Then, the doctor could view his patients heart rates on a web panel, as they’re live streamed to a Node.js backend, and plotted then on a graph. Sean took care of the backend, and made a really nice frontend for the doctor to view. I did the Apple Watch app, and worked on the code to send the heart rates to the server.

Issues.

Our idea looked fantastic in our heads, but we had quite a few problems turning it into reality. From issues with WatchKit, to changes in the iOS SDK that Apple just announced, everything that could have been difficult, was.

The first, and most challenging thing we had to overcome, was using WatchKit to take a heart-rate from the patient. At this time, my Apple Watch was still running a beta of watchOS 2, and I had never built a native Watch app. I was completely lost when it came to taking a heart rate, and displaying it on the watch. The Apple Engineers in the iOS cortex were helpful, but mostly pointed me to GitHub, and StackOverflow. As I cycled my way through all of them, I finally stumbled upon one with WatchKit experience. He sat down with me, and we slowly put together the Watch portion of our app. When it was finished, we had issues getting the BPM to display on the screen, but he debugged the code with me, and we found the problem. Within a couple of hours, I had the majority of our project finished.

While I was working on our Watch App, Sean had been creating the backend, and the Web Panel. The two components of our app were done, but they needed to be connected. We thought this would be simple, using a GET request over HTTP. I quickly set this up, compiled, and waited. My Watch showed my heart rate, and so did the app on my iPhone, but there was nothing showing up in the server log. Confused, I once again approached the Engineers, looking for help.

A couple of them told me that my code looked fine, and suggested looking over the server code for errors, but one of them overheard our discussion, and told us about a new security feature in the iOS SDK, that only allowed outgoing traffic over HTTPS. This was a huge shock to us, the entire project relied on being able to send the data over HTTP. We were stuck.

We spent the next couple of hours trying to think of ways to accomplish the same task without completely abandoning everything we had created, but we had nothing. I decided to go on StackOverflow, and found out that you can whitelist certain URLs, and allow http traffic to be sent to them. A few minutes later, we had written an exception in our projects info.plist. I recompiled, put on my watch, and my heart-rate started to show up in the server log.

We finished our project with several hours left, and so after we submitted to DevPost, we didn’t really know what to do. The last 12 hours seemed to be filled with almost everything going wrong, and next to nothing going right, but we finally got it to work, and we were finished. We talked about adding more features, but instead, we did exactly what everyone else wanted to be doing.

Tile floors aren’t bad when you haven’t slept in 30 hours.

The alarm on my watch went off 1 hour before we were supposed to demo. I checked my email for our table number, and we made sure everything was functional one last time before departing for the expo.

The Expo

We arrived at our table a little late, and just as we were finishing setting up, judges started to make their way around. We applied for quite a few sponsored prizes, but a few of the companies really stood out as very interested in what we did. Apple, and MongoDB seemed really curious about how we got the website and the app to relay data. We were pretty sure that Apple just thought it was cool, and wanted to see stuff running on watchOS 2, but MongoDB talked to us for quite a while about how we used Mongo to store heart rates as they were displayed across the graphs.

After answering countless questions, and explaining the entire product to person after person, the expo was over, and everyone started to pack up. This was a moment that you experience every time you attend a Hackathon. It’s like finishing a marathon. The whole thing was entirely exhausting, and it took a lot out of you, but once it’s over, it becomes immediately worth it.


MHacks 6 was by far the best Hackathon I’ve attended so far, and it was a fantastic weekend, full of awesome people. The organizers who take on the daunting task of planning this event as a near full time job, all so that people can come together, and build amazing things, are awesome. Without people like you, Hackathons wouldn’t exist. Thank you!