How to Build an iOS App in 72 Hours

I’ve been at ThoughtSpot since almost the beginning, and I’m continually amazed by what this team is able to accomplish. Our third year of life has been an especially big one for the engineering team. Over the past year, we’ve launched over 200 new features, including DataRank, AutoJoins, and PopCharts, that are changing the way business professionals access and use their data.

To celebrate all the work we’ve done this year, we decided to take a break from our day-to-day jobs and spent a few days on something completely different with a 3-day hackathon. Could each team build something meaningful for the company in less than a week?

My team was made up of six developers, a designer, a product manager, and our VP of marketing, and our hackathon project interests were just as diverse. Our initial list ranged from building a meme generator to writing a posix filesystem over Cassandra.

What we could agree on was this: We all wanted to...

  1. Lay the foundation for something that would add value for our customers;

  2. Learn something new beyond our day-to-day work; and

  3. Have fun.

After much debate, we decided to build an iOS app for ThoughtSpot. The only problem? None of us had built anything like it before, let alone an app based on software with a ton of sophistication under the hood. Here’s how we did it.

Step 1: Remember that quality matters most

Over the past three years, our UI team has worked hard to build a beautiful, slick HTML5-based web app for ThoughtSpot. But let’s be realistic: replicating all that work for iOS in just three days was next to impossible and would result in a half-baked application at best. So we elected to do fewer things in the app, but do them well. We wanted to the lay foundation for ThoughtSpot’s mobile development team and didn’t want to do throw-away work. Aiming to produce something that will have a lasting effect can keep you motivated through the sleepy or frustrating moments.

Step 2: Learn Swift

With the list of key features ready, we needed to start learning about iOS programming. We decided to use Apple’s recently released Swift, a modern programming language with the terseness of a scripting language, that is also strictly typed and compiled. As we started exploring iOS development and Swift, we came across some great resources. We found Stanford’s CS193P and Ray Wenderlich’s tutorials to be particularly helpful. Be sure to check those out if you attempt a similar project.

Step 3: Divide and conquer

After gaining a basic understanding of the platform, we decided to divide the work and each focus on learning about a specific functionality. My task was to design the app’s UI and add animations, both of which were foreign to a backend engineer like me. Other teammates focused on building transitions and animations, data charting, metadata modeling, push notifications, and our tabular data viewer. Over the three days, we were able to write over 10,000 lines of Swift code, submit 140 commits, and cumulatively put in over 350 man hours.

Step 4: Prepare for... some rough patches

There’s nothing easy about building an app in 72 hours. It’s ambitious. While we made sure to celebrate each new feature, we also spent hours upon hours root-causing bugs. To give you a sense, on the final night of the hackathon, we spent five hours fixing a single issue with chart displays. With the presentation only a few hours away, and no fix in sight, for a moment it seemed like our hard work was all in vain. But there was no way we’d settle for presenting our app with such a jarring bug. Fortunately, after a painful late-night scramble, we were able to fix the issue. We spent the final hours polishing the app and were able to present proudly. Lesson learned: Prepare to be tested.

Step 5: Sell it

You’ve put in the blood, sweat, and tears. You’ve made something you’re proud of. The next step is making others want it, too. It might seem simple, but there’s an art to presenting your project in the right way that’s tough to nail down (especially after three sleepless days). This is where our VP of Marketing was a big help. He helped us script a story that highlighted all the features we built in a compelling way, all told in a “day-in-the-life” narrative. This really helped all the judges (i.e., the rest of the company) understand how the app would be used in the real world.

Step 6: Collect user feedback

Our final app was simple, but it worked! It helped to include a couple of slick features like charts that animate when they load. The team loved our presentation and voted us as the winner of the hackathon. Sales executives were especially thrilled by the possibilities of shipping it to customers this year (imagine interacting with all your favorite charts from your phone on the train to work!). But we also received critical feedback, which is an often overlooked element of any hackathon. Don’t forget it. For example, we weren’t able to add the search bar to our app in three days, which is easily the most differentiating feature of our web app. Our colleagues reminded us that without search functionality, users can’t really drill down and analyze the data - they can only consume it - which goes against our mission to bring business intelligence to everyone. Building this feature into the iOS app is a necessary next step for our core product team.

It was a wild ride. From brainstorming ideas to building a team, executing well, and “selling” the product to the company, the spirit of a hackathon is almost like going through an entire startup lifecycle in just three days. Besides building awesome systems, this is something most people at ThoughtSpot have in common - learning things that’d help us launch our own startups in the future. Crazy as it might sound, this is in line with our CEO’s vision: to see at least ten successful startups come out of ThoughtSpot in the next ten years.