HS Day 31: Back to School

Monday morning – I woke up at 8:30 to my alarm and got ready for the day. Took the R to Atlantic/Barclays station alongside my roommate, who happened to be leaving at the same time for Maine. Sometime in the next few days I’m moving down the hall to Imogen’s room, since she’s moving back to London. So it’ll just be Levi and I in the apartment for a few days.

Transferred to the D, which is my new route to get to school – it’s faster than the N, especially because the station in Manhattan for the D is much closer to Hacker School. The D also goes over the Brooklyn Bridge, meaning that there’s some sunlight and sightseeing on my way to/from Hacker School every day.

Well, “sunlight”. Today it was pouring rain in Manhattan – enough to warrant a weather alert on my phone (which somehow arrived even though I was in airplane mode!).

Spent the morning napping in a beanbag since I was too tired to work. Brandon Rhodes and Peter Norvig are our residents this week; the former is the author of some Python libraries and books, and the latter is a Google employee and one of the foremost AI researchers. I’ve been geeking out a bit about the fact that I get to work with Peter, and I noticed that he was about to go to lunch with a group of Hacker Schoolers. I had to go to the restroom after waking up from my nap and by the time I returned, they had already left. Ah well – I grabbed a hot sandwich at Pret and returned to Hacker School.

Decided to pair with some people for the day – Budgeted and NodeTag are getting bogged down in details.

I was about to put up a message about pairing on our internal chat application when Doron asked me to help him with a database project – he was testing various queries in SQLite and measuring their performance. He was noticing some weird behavior – when he executed a SELECT * FROM table WHERE unique_element = 'abc', it was performing the same as SELECT * FROM table WHERE unique_element = 'xyz', where ‘abc’ was at the beginning of the table and ‘xyz’ was at the end (and something else was the primary key). Since there was no index on unique_element, he expected the ‘xyz’ query to take longer. I came up with a few ways that the database might be optimizing, but in the end it turns out our sample size was probably too small and the difference was getting lost in the noise. We did learn, however, that trying to put 500k rows in a table with a unique element gets really really slow around the 10kth element – since each insert needs to check if there is already something with the same unique element in the table. Thus trying to quickly insert a bunch of rows quickly gets to O(n2). Lesson: don’t use Unique rows unless you really really have to. And then index them.

I pair programmed with Peter on a NumPy program to draw topological maps given a set of elevation data (Project idea: Do this for Minecraft!). A neat problem that I had just a few ideas on – turns out that tracing a non-convex hull is a hard problem. He messaged me later and seemed to have found a good library to generate the hulls for him.

Pair programmed with Michael for a while on an architecture for a full-stack web and iPhone app. Based on our conversation, I’m not sure he realized how large of a system he was panning on building. I wish him the best of luck in completing his project.

I got to talk with Peter Norvig for a while – he was wearing a Hawaiian shirt so I figured it was okay to call him Peter – about writing an AI for Risk (something I’m planning on working on soon) and also Genetic Algorithms, which was super neat.

Read up on Risk AI for a while, then took the subway with everyone to ebay for Brandon’s presentation on “Copernican Refactoring” – essentially, thinking about a problem as having a different center for a new perspective (i.e. the earth orbits the sun instead of the other way around, and this makes the math for the motion of the planets a lot prettier). It was a neat talk and it gave me some really cool perspective and problem solving ideas.

Afterward, I walked with Erik to Toys R Us and Barnes and Noble, where we tried to find a copy of the board game Risk. We couldn’t, so I took the N from Union Square to Atlantic/Barclays and picked up a copy there. Walked home and played some SC2 (0 for 3 🙁 ). Chatted with sleepy Greta for a long time, then went to bed around 1.

As you can probably tell from the length of this post, my motivation is quickly returning! I’m looking forward to working on the Risk AI today!

From Manhattan,

Erty

 


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *