09.11.12

9/11 Journal

Posted in personal at 5:22 pm by danvk

9/11 LightsWhile looking through some old journals last night, I found my entry from 9/11/2001. There are some bits that I remember (my French teacher deciding to finish class and not tell us, hearing about what had happened by my locker) and many that I had forgotten (all the misinformation—“10,000 dead”—and the standardized test which prevented any school-wide announcements).

Here it is:

Wow, what a crazy day. Mrs. Miller came into our French class around 8:40 and told Mrs. Sullivan what happened. Mrs. Sullivan didn’t say anything and just went on with class, which I find mind-boggling. Then in the hall I saw a bunch of people, including Jen Keber around Eileen’s locker telling her something, so I knew something had happened. I asked what, and Colin Walsh said “They blew up both World Trade Towers and the Pentagon”. I thought he was joking, but boy was I surprised. We listened some on the radio in Mr. Gerencher’s room, then went to the cafeteria for a few periods, and watched various stations for the rest of the day in all our classes. There was some confusion at the start because the sophomores were taking ISTEPs and Mrs. Ratliff didn’t want them to know. Then when they were done she came on the PA and said what had happened. Then we had a mass after school led by Fr. Bly and I had tennis as usual.

It still seems like something that couldn’t really happen. Everyone kept saying that the images we were seeing looked like they were straight out of a movie, and they’re right. The whole of New York City was completely covered in a giant smoke-cloud. The most amazing thing though was the videos that actually showed the second plane curving in and hitting the South Tower. I think my mom found it the most troubling that they sent in rescue teams, and then the towers collapsed, killing about half of New York’s fire fighters (about 200 dead they think now). Right now they’re saying that about 10,000 are presumed dead from the tower, 266 from the planes, and a few dozen from the pentagon. At one point Brother Robert said that they had bombed the supreme court too, but that turned out to be wrong. It really did strike me though, since it seems like buildings like that have been there forever—they’re really icons of our civilization. I suppose something like the Pentagon or the World Trade Towers are too, but those were built in the last fifty years or so. Tina said that Nate’s roommate’s girlfriend was flying from Boston to LA today, so she was pretty shaken by the whole thing. Apparently it’s the first time in history that they’ve closed down all American flights. It was quite a moment when we knew what had happened and tons of reports, both true and false were coming in from everywhere. Apparently, the White House, the Supreme Court, the USA Today building, the Defense Department and a bunch of other places were suppposedly bombed, but none of those actually happened. It really must be hard to sort truth from rumor in those sorts of cases.

They’ve had continuous coverage for almost 15 hours now, and I don’t see it stopping. We missed Bush’s speech to go to the Prayer Service at Church, and I think I’ll keep the bulletin—it’s an interesting piece of history. I guess today is a pretty significant piece of history too. It’s just absolutely insane.

08.14.12

National Popular Vote States

Posted in politics at 9:06 pm by danvk

I’m a big fan of the National Popular Vote Bill, which seeks to do away with the Electoral College without amending the Constitution. Here’s the three-sentence explanation from their web site:

Under the U.S. Constitution, the states have exclusive and plenary (complete) power to allocate their electoral votes, and may change their state laws concerning the awarding of their electoral votes at any time. Under the National Popular Vote bill, all of the state’s electoral votes would be awarded to the presidential candidate who receives the most popular votes in all 50 states and the District of Columbia. The bill would take effect only when enacted, in identical form, by states possessing a majority of the electoral votes—that is, enough electoral votes to elect a President (270 of 538).

Intuitively, you’d expect this bill to be popular in states with:

  1. Large populations
  2. Very predictable voting patterns

These are the states like California and Texas which are large, but completely neglected under the current presidential voting system. Putting on our Nate Silver hat, we can try to quantify this. A state is large if it has lots of Electoral Votes. A state has predictable voting patterns if it differed considerably from the national popular vote in the last election. A state should support the NPV bill if it ranks highly in both of these senses:

How much sense does the NPV bill make in each state?

For example, California ranks #1 in Electoral Votes (it has 55). It voted for Obama by a margin of 24% in 2008. The nation as a whole voted for Obama by a margin of 7%, so we say that California leans Democratic by 17%. Amongst all states, this is the 25th largest lean. California’s score is the larger of these two numbers (25). Repeat this analysis for all 50 states and the District of Columbia and you’ll get the chart above.

It’s not surprising to see California, Texas and New York near the top of the list. These are the three largest states, but they do not factor into presidential elections at all. Tennessee surprised me at the top of the list, but with 11 EVs and a 20+ point Republican lean, it would clearly benefit from a change in the system.

If the top three states in this list (Tennessee, Texas, New York) all passed the NPV bill, it would have 210 of the 270 EVs it needs to go into effect. Were that to happen, I believe we’d start to hear a lot more about it in the media.

Raw data here (Excel format). For what it’s worth, I now understand why Nate uses images for the tables on his blog: getting a formatted table out of Excel in any other format is nearly impossible!

07.03.12

Updated Online Boggle Solver

Posted in boggle, web at 10:42 am by danvk

See that Online Boggle Solver link on the right? Bet you’ve never clicked it!

I built the online solver back in 2006, mostly just for fun. In the six years since, I’ve wound up using it almost exclusively on my phone during real-life Boggle games. The iPhone didn’t exist when I built that page, and it is a device for which its fancy design (with hover effects and fixed position elements) is very ill-suited. Minimal designs tend to work better on Mobile, and I’ve just pushed out a new version for phones which is very minimal indeed.

The code behind this boggle solver differs from my other boggle code in that it’s designed for low latency rather than high throughput. This is precisely what you want from a web solver. You’re only finding the words on a single board, so time spent loading the word list dominates time spent finding words on the board. The current version uses a custom dictionary which can be MMAPped. This winds up being about 3x faster than reading a dictionary text file and building a Trie on every invocation.

I haven’t worked on Boggle in the past three years, so the state of the art in finding the highest-scoring boards is still where it was when I made my last blog post about breaking 3×3 Boggle. The interesting development then was that you could get something like a 1000x speedup by upper-bounding whole classes of boards rather than scoring each board individually. This is a big enough speed boost to make 3×3 Boggle “solvable” in a day on a desktop computer, but not enough to make 3×4 or 4×4 solvable, even on a big cluster of computers. I was optimistic that memoization could give some more big wins, but when those failed to materialize I got frustrated and stopped working on the project.

07.01.12

OhLife

Posted in personal at 7:00 am by danvk

My friend April recently introduced me to OhLife, a dead-simple daily journaling service. You get an email each day with a previous journal entry. At first it’s yesterday’s entry, then last week’s, last month’s and last year’s. You respond to the email with today’s journal entry.

The thing I really love about this is how it subtly encourages good journaling habits. It took many years of journal-writing for me to learn these two important truths:

  1. Whenever you write, you should have a reader in mind. For a journal, the reader is your future self. Future You is the only person who will ever care to read this.
  2. The only way to become a better journaler is to read your old journals. Put another way: you won’t write boring entries for months on end if you’re forced to read them!

By sending you a past journal entry with each prompt, OhLife nails both of these.

Another journaling trap is to make each entry a list of the things you did today. This will be quite dull for your future self to read. What’s more interesting is the internal stuff: what are you looking forward to? how do you feel about other people and events? You’re likely to forget how you felt in the past as new information comes in.

How could OhLife discourage thing-listing? Perhaps by including content from Timehop. If your year-ago journal entry automatically included all your Foursquare check-ins and your texts, you’d be less tempted to list them out in today’s journal entry.

If journaling is your cup of tea, I would highly recommend OhLife!

06.25.12

Lonely Hangouts

Posted in programming at 2:35 pm by danvk

While working on Puzzle+, my crossword application for Google+ Hangouts, I couldn’t help but notice what a colossal pain it was to develop against the Hangouts API. It has a few things going against it:

  • Testing your changes requires pushing them to a remote HTTPS server.
  • Your application is buried in a ton of iframes, which makes the JS console harder to use.
  • Opening up Google+ Hangouts runs a browser plugin, turns on your camera, and makes your computer nice and toasty-hot.
  • It’s impossible to test multiplayer scenarios without multiple Google+ accounts and multiple computers (since opening a hangout requires exclusive access to your camera).

To make myself less sad, I developed a small node.js server which emulates the Google+ Hangouts API. This lets you do all your development (both single- and multi-player) locally, without any of the AV overhead that Hangouts usually bring in.

In case anyone else finds themselves in a similar predicament, I’ve released this code as Lonely Hangouts on github.

« Previous Page« Previous entries Next entries »Next Page »