Houston Hackathon 2017

May 21, 2017

This weekend I participated in the 5th annual Houston Hackathon, which is focused on developing solutions for civic issues. It's organized by Sketch City, and hosted by the Houston Technology Center. I'd been to a few hackathons before, but this was by far the biggest (300+ people!) and it was also the first that I was fully committed to seeing through to the end.

I showed up on Saturday morning without an idea and without a team. I felt a little anxiety because I didn't want to commit the next 24 hours of my life to something that I felt either wouldn't make it to the finish line, or wouldn't have an impact. For some hackathons, I'd say showing up without an idea or team is a recipe for flopping, but the Houston Hackathon volunteers were great about emphasizing inclusivity and collaboration, and to kick off the event they organized some informal networking and "speed dating" to find teammates. By about 1pm, most of the participants have found teams and started working.

The Problem

In my case, I was lucky enough to join a team of people that were both extremely talented and had already done some thinking about the problem they wanted to solve. The idea in brief was that:

  • Houston residents have access to both Harris County and City of Houston Libraries, but the digital content they offer is spread across two separate web portals (one for each library),
  • and the aforementioned web portals have some serious web accessibility issues, creating barriers to access to this content for Houston residents with disabilites.

Our goal was to build a single, intuitive interface for accessing all Houston libary digital content that also met web accessibility standards.

The Houston Book Link Team

The Build

We split up into two sub-teams, to work on the frontend and backend of our app. I ended up working mostly on the backend.

On the backend team, our first order of business was extracting all the book data from the two web portals. We considered building an API that would just forward requests to each content portal, but we wanted to be able to merge duplicate content in a useful way, so we decided we needed our own copy of the data. We used a simple Python script and the requests library to paginate through all the book content for both web portals, and store it in JSON files. Using another Python script, we loaded these JSON objects into a Postgres database. For the curious, the code for this part of the process is here.

At this stage, we re-convened with the rest of the team. They had been busy building out the actual app using Express.js for a simple API server and React.js for client side rendering. After a bit of deliberation, we decided to just rely on Postgres's full-text search to power our searching functionality. Once we were happy with the results that were coming back from our test queries, we tied everything together by translating query params into a valid Postgres query. We used http://bookshelfjs.org/ as a ORM. It was a little bit of a pain to get our complicated queries working, but using the ORM turned out to be the right decision because it abstracted away some querying on related tables that would have been painful to implement ourselves, given our time constraints.

It was around 1AM and we felt pretty good about where the app was, so we headed home for sleep. The following morning, we smoothed out a few UI things and tried getting it deployed, but had trouble with connecting to Postgres on AWS EC2, so we ended up using ngrok to serve the app from one of our teammates laptops for demo purposes. The first live demo URL was local.cameron.pizza :D.

Wrap up

Our teammates did a fantastic job pitching our project and emphasizing the importance of accessibility standards. I was extremely proud of what our team was able to accomplish in just 24 hours and our live demo went great! I don't even think many people noticed our ridiculous domain name.

After everyone presented, the judges took some time to deliberate, and then the 3 winners were announced. Out of 20+ teams, our project was one of the winners! It was extremely gratifying to be recognized for our hard work over the past day. The prize for winning is a 20 min time slot to pitch the Mayor on our idea. I'm definitely looking forward to meeting with him, and taking on more projects with a civic focus in the future!

Resources