Canadian Hack U Magic Leads to Pagical

Editor's Note: Last month, the Hack U program made a stop in Canada, and hosted a week of tech sessions and hacking for students at the University of Toronto and the University of Waterloo. Waterloo alum Rasmus Lerdorf was there, along with fellow Canadians Paul Tarjan and Jon LeBlanc. The winning hack was titled "Docuvine" and was built by a team of three: Aran Donohue, Andrew Trusty, and Rory Tulk. Outside of school, Aran enjoys playing jazz saxophone, rollerblading and exploring Toronto cafés; Andrew is a graduate student by day, entrepreneur by night; and Rory blogs about many things including computer science and canoeing.

After HackU, the Docuvine hack caught the attention of YCombinator and the team changed its name to Pagical and kept building it out. Paul Tarjan put together some interview questions and we emailed Aran. Here's a transcript of that online conversation.

Aran and team are interested in building a business around what began as a hack, so all feedback, ideas, and use cases for Pagical are welcome.

What does Docuvine Pagical do for me as a user?
First things first, we decided to rename to Pagical (Page + Magical) so we could own the .com. So Pagical == Docuvine 0.02 :)

Pagical lets you easily make documents that stay up to date automagically, whether you pull in data from a Google Spreadsheet, Twitter, or any other web page. That saves a lot of work when you write a report that depends on spreadsheets or other business data. It also makes it really easy make a quick mashup of your daily reading. 

The way it works is: go to a web page that has something you want, click on the piece you want, and poof! That piece is now in your document. Then, when the web page changes, we detect that, and we update your document automagically.

You can work on your documents at the same time as other people, which turns out to be a lot of fun, especially when one of those people is Paul Tarjan.

People who have websites can use a really nice Pagical feature that embeds a Pagical document into any page. The whole thing takes about ten seconds to set up, and then editing your Pagical document instantly updates the page for all your visitors. This is something new we added after the hack competition was over.

It's one of these things that you really need to see. Once you do, you'll sort of go, "Why doesn't everything work like this?"

What makes Pagical cool technically?
Pagical is technically neat for two reasons. First, we put up the first version after 24 hours of work and the second version after just two more weeks of work. So we're taking the idea of quick releases to the extreme. Yahoo! HackU really infused us with this spirit of hardcore prioritization and getting lots done fast.

Second, we're combining distributed synchronization and dataflow programming in ways that we haven't seen before, and then we're covering it up with a super-simple user interface. I think as we grow we're going to run into totally novel computer science challenges. That's exciting.
Which giants' shoulders did you stand on?
Our HackU entry was basically a job of creatively gluing together existing pieces from different places. 

    In no particular order:
  • Google App Engine gave a us a free, high performance place to host our code.
  • Django gave us the framework to whip together the structure of the application.
  • MobWrite, an open-source project by Neil Fraser, gave us a straightforward way of doing near-real-time collaboration. We hacked it up heavily, though.
  • Mercurial gave us the confidence to try experimental ideas in the middle of the night, because we knew we could go back to a working version. It was also how we shared code. It sounds silly but Mercurial was critical.
  • SelectorGadget is how users choose the pieces of web pages.

Seeing YQL gave us the spark to see how the whole thing would fit together. It's the glue between our documents and the rest of the web.

Hardest, easiest parts?
The hardest part was getting the synchronization between copies of documents to work properly with pushing data from the web into documents. We had a couple false starts. 

The easiest part was falling asleep after the competition was over.

Most hacky part?
That's like asking a thunderstorm which part is wettest.
How many hours into hack day did it start working?
We got both major pieces working around 2:30am. So that's fourteen hours and a half.

How many minutes before judging was your last code change? 
You should probably ask that question in seconds.

How long was this running before it broke?
Well, the demo held up for a minute or two, before I announced the collaboration feature. Once everyone jumped in it got a bit chaotic, but I think it kept running. It was game over when I opened up Paul's document.

Paul asks, "How badly did I break your system with a recursive insert?:)"
I had better explain the question. Pagical lets you embed pieces of web pages into your documents. Pagical documents are also web pages. Paul noticed this and put a photo of himself into a document. Then he put the whole document into itself. If that blows your mind, don't worry. It blew Pagical's mind too.

Actually, we knew it was a possibility. We had just hoped nobody would think of trying it. Oops...

Aran Donohue - @aran_donohue
Andrew Trusty - @andrewtrusty
Rory Tulk - @rtulk