Yelp Hackathon 15: Sharks, Sock Puppets and Spectacular Projects
Srivatsan S., Engineering Manager
- Nov 26, 2014
We recently held the 15th edition of Hackathon, a two-day event comprising of pure, unadulterated hacking, innovation, creativity and fun. Folks clustered together, hammering on their keyboards, scribbling on whiteboards, and some electrical engineers were plugging away on their breadboards. The kitchens were filled with delicious catered food, and fresh fruits and snacks lined up in the common spaces. We even had a school of remote-controlled sharks lurking around the office and taking over the meeting rooms.
Close to 60 great projects came out of the event from our offices in San Francisco, Palo Alto, Hamburg, and London - projects that ranged from cool data mining and visualizations, useful product features, funny utilities, and some serious hardcore hacking.
Speaking of hardcore hacking, a team of engineers comprised of Cameron P., Ben B. and Kevin L. designed an 8-bit ISA (Instruction Set Architecture) with a 16-bit stack-based math co-processor. They implemented an emulator for the architecture and also designed/built an assembler to target it. With their assembler they built an interpreter for Brainfuck, a popular esoteric and Turing-complete language. To top it all off, they wrote their emulator and assembler in Go. Their project idea echoes a collective sentiment that runs through the fabric of our engineering team: taking on a hard challenge! Could they design a useful ISA in the constrained space of 8-bit fixed width instructions? If they designed it could they actually build it? And if they built it could they make a non-trivial program to prove it was useful? For them, it was fun just trying to accomplish all of that.
Like most of our Hackathons in the past, this one resulted in a whole array of projects focussed on Yelp data. Why? Well, we have a fantastic dataset generated by a passionate and dedicated community of Yelpers around the world. A team of data scientists and product managers comprised of Farid H., Natarajan S. and Daniel F. built a pretty cool tool that allows users to explore a city by its neighborhoods. Say you’re a tourist visiting San Francisco and want to dine in a touristy neighborhood with fancy restaurants. Or maybe you are a budget traveller and want to check out the local nightlife scene. All you need to do is to tweak the filters on this nifty tool, and voila!
To build this tool, the team wrote an algorithm to compute different attribute scores. For example, this algorithm would compute a tourist_score by analyzing the percentage of reviews for businesses in a given neighborhood written by someone who is not from that city.
As engineers, the words reliability and performance are near and dear to our hearts, so much so that some of us use Hackathon as a time to dive into our codebase and explore ways to speed things up. A team of mobile developers comprising of Alex H., Mason G. and Ben A. did just exactly that with some serious iOS hacking.
One of the most complex views on the Yelp iOS app is the business view, the page that lets you learn all about the business you searched for. A lot of the complexity comes from all of the features it has which includes rendering maps, reviews, review highlights, and a swipe-able photoview, just to name a few. How could they make this faster?
Well, they figured out that the bottleneck was due to large amounts of both layout and CPU-bound drawing. The team rebuilt the entire view with collection cell automatic sizing and caching (which is available on iOS 8 and has a fallback available for iOS 7 users). This gave them incremental layout and rendering instead of full view layout and rendering, which sped things up!
They modernized the view to be fully compatible with future screen size changes by using Auto Layout instead of frame based layouts. Even though an analogous Auto Layout view is slower than a similar frame based layout, they still saw large performance improvements from the incremental rendering and rewritten views. These changes dropped rendering times and cut memory usage by roughly 50%.
Good job, everyone! Or as Darwin would say with staunch approval, “Woof! Woof!”
Thinking about that next killer Hackathon idea, aren’t you? Check out our exciting product and engineering job openings at www.yelp.com/careers and apply today. Hackathon 16 isn’t too far off!