February 23, 2014
What is the most fascinating thing you’ve learned in the past month?

Say your friend picks a number from 0-999,999 and you need to guess that number with 20 yes-or-no questions (Qs). You realize that you can ask max 20 Qs, instead of 1,000,000, if you eliminate half the numbers with each question with a binary search.

You succeed, but you realize that each Q depends on the result of the previous Q. You need to know your friend’s answer to the current Q to determine the next number to ask about. You wonder: how can I write Qs so they don’t depend on order? Can I can give them all to my friend, then generate her number? It’s possible, since each yes/no answer yields 1 bit of information, 20 Qs yields 20 bits, and (2 possibilities)^(20 bits) determines 1,048,576 possibilities (> 1,000,000 numbers).

You realize that 20 bits to determine a possibility sounds like the number in binary! Each number from 0-999,999 would be uniquely determined by 20 or fewer 1s or 0s. Using this, you can write 20 order-independent Qs. Each asks whether each successive digit in the binary representation is 0 or 1. (Is the 1st binary digit 1? etc.) With your friend’s answers, you can find the number by converting the number back to base 10.

If your friend can’t convert to binary, you convert each Q to base 10: Is the 2nd binary digit 1? → Is the number 2, 3, 6, 7, 10, … ? etc.

This tactic underlies a magic trick in which the participant picks a number from 1-50, the magician shows her 6 cards, the participant responds if her number is on the card, and the magician divines her number.

(I wrote this last year for Hacker School and recently dug it up. It’s terse because there was a word limit. Thanks to Professor Bhargava for teaching me this!)

February 8, 2014
fun with (fun with recursion)

Here are the slides for a short talk I gave at Code@Night. You can find the PDF here (in-browser). I only assume knowledge of recursion and arithmetic, so I hope it’s very accessible.

You can find some of my solutions to the ending exercises here. Let me know if you come up with more! And yes, the title is an ML pun.

January 29, 2014
Constructing a perfect comma

Click for larger

Click for larger.

The construction uses only a compass and straightedge, and I did it using Ancient Greek Geometry. This was inspired by the geometry of Twitter’s logo.

The fonts are Bodoni Std Poster Italic and Bodoni Std Book Italic.

September 2, 2013

It’s hard to describe what Hacker School is, but I think “a writers’ retreat for programmers” comes closest. Here are some things I did this summer:


Along the way, I met (and received lots of help from) the excellent people of the Hacker School community: facilitators, residents, fellow batchlings, and alumni. I had a great summer. If you’re interested in joining this community, applications for fall 2013 are still open. :-)

April 28, 2013
Things

Made a Twine game for this weekend’s Ludum Dare competition, whose theme was “minimalism.” You can view the entry here and play it here. As always, I’d love to know what you think.

Also, I’ll be at Hacker School this summer! Looking forward to being a batchling :)

(Note: this blog is mostly to document things I’m making / doing / learning. Maybe I’ll add opinions later.)

February 19, 2013
What I’ve been working on

I made a story/game experiment with Twine. You can read/play it here: Testimony

Let me know what you think!

If you liked Testimony, you might also like hypotext. I’ll write more about these and other writing+coding projects later.

Also added new non-artsy things to my GitHub.

January 24, 2013

In the beginning of January, I was lucky enough to be able to attend Square Code Camp, a 4-day program created by Square to immerse female engineering students (17 from universities across the US) in startup culture and computer science. Here are some of the highlights of the activities that our awesome organizers, Rachel Constable and Vanessa Slavich, planned for us:

Meeting Jack Dorsey

Jack Dorsey + Code Camp + Gandhi

I’d been curious about Jack, the founder of Twitter and Square and man of many interests, for a while. The morning of the first full day, he gave us the Square talk and walked us through the rumored “Gandhi Walk.” I can’t comment on what he said, but I was impressed by the subtlety and depth of Square’s credo.

Tech Trek: Security Workshop

Security Workshop

The motto of this workshop could have been “move fast and break things.” In just two and a half hours, the head of security at Square showed us a simple credit-transferring web app he had built, gave us time to hijack it, taught us how to properly hijack it, and told us awesome security war stories. Now I know to look for any opportunity for user input (username, password, email, file upload, filename, numbers, etc.) and think about breaking out of the environment to inject malicious code, the goal being to run arbitrary code. In one of my favorite hacks, we realized that when the web app uploaded files, it would do so like this:

PATH = (get user-inputted filename)
upload (get user-uploaded file) to ~\somedirectory\PATH

If you named your file starting with arbitrary chars set off by a semicolon or &&, you would break out of the upload command into a shell that could run any commands you wanted:

'(arbitrary chars here); (arbitrary commands here)'
'dfhgfkajsh; ls; rm exampledir.db; ls'

So, as seen above, Leah and I deleted the database and killed the web app. Move fast and break everything.

Dev Day

Imagine that you have little to no experience with web development and Ruby on Rails. Then you’re put on a team with two Code Campers who also don’t have Rails experience, plus one engineer from Square, and asked to build a full-fledged event management Rails app for Square in six hours. Thankfully, Erica Kwan, the lady running Dev Day, had built some of the hard parts for each of the teams already, but we still found it tough (and rewarding). We worked with Square engineers Jack Danger and Sean Sorrell, and you can see what Stephanie, Sumaiya, and I built with their help here. Pair-programming with Sean was awesome. In addition to showing us how Rails and the MVC model worked, he also showed me the CMD+` (Safari) and CTRL+TAB (Chrome) shortcuts, saving me years of Mac tab-switching frustration.

Square’s Design and People

Hardware Workshop

There’s much more I haven’t mentioned, but everything we did and saw was touched by Square’s sense of design. Besides the sleek, crisp site and app, I was impressed by the presentations and workshops. I haven’t met many presenters who follow these unwritten rules: that the slides should consist of as many pictures and as few words as possible (five or less, if possible), that there should be opportunities for participants to guess the answer before presenting the real answer, that the presenter should keep it simple and build a narrative with metaphor. All of the presentations at Square followed these principles, but Jim McKelvey, one of the co-founders of Square, gave a talk on glassblowing that transcended slides. 

Also, shout-out to my mentor, Vida Ha! I had great conversations about start-up culture and San Francisco with her, and she gave me invaluable advice. 

If you’re a woman in college majoring in CS/EE/math and you’re reading this, I would definitely recommend applying to Square Code Camp. If not, I’d recommend trying  Square’s app and reader. They’ve put a lot of care into the design, and it shows.

December 30, 2012

Some of the awesome people at Random Hacks of Kindness @ Princeton 2012! Click to see descriptions. Ryan Integlia, founder of em[POWER], took the pictures.

RHoK is a global movement that brings hackers and organizations together to solve technical problems and create real social change. RHoK “hackathons for humanity” took place all over the world from December 1-2, 2012, and RHoK @ Princeton was run by Alex Ogier, me, and Xin Yang Yak. We’re the hackathon leaders at the Princeton Social Entrepreneurship Initiative

I made an interactive Daphnia for BioBus, an organization that aims to spread the love of science to kids by bringing them a science lab on wheels! (Mouseover the creature’s organs and click around. You can see the code here.) Dr. Latasha Wright provided the images, text, and cute live specimens of Daphnia on-site.