Saturday, December 27, 2008

The Grown-Up Purity Test!


During the company ski trip last year, we somehow found ourselves taking purity tests, something we hadn't done since college. Much fun was had (at least until Akshay turned off the Internet in a fit of rage, and we had to score the tests using the Firebug console). Many, many drinks later, we somehow decided that what the world really needed was a hip web-2.0ish purity test, with keyboard shortcuts and big fonts and statistics comparing you to other test takers and fewer "have you ever held hands with a MOS?" type questions. So I registered tgupt.com for The Grown-Up Purity Test (pronounced tee-gupt) and figured it couldn't take more than a weekend of hacking to do.

Since it's now a year later, it's clear I severely underestimated what was involved. Writing the questions was surprisingly hard, and took a lot of feedback and help from various folks, especially David. I'm still not 100% happy with them, but this project has dragged out much longer than anything this frivolous and puerile ever should.

<technical details>
Also tricky was figuring out how to work around the limitations of the App Engine data store. In a relational database, it would be pretty easy to go from normalized data to selecting the mean score for some demographic group. But App Engine doesn't offer aggregation functions, doesn't do joins, and doesn't fetch more than 1,000 rows. I ended up doing several writes on each answered question and each finished test. If a 27-year-old male answered yes to Question 1, I write the following:

AggregateQuestion
Question 1, Yes: 1, Total: 1
Question 1, Gender: male, Orientation: straight, Yes: 1, Total: 1
Question 1, Gender: male, Orientation: straight, Age: 27 Yes: 1, Total: 1

Initially, I thought I would have to store all combinations of gender, orientation, and age as separate aggregates to future-proof myself for any graphs I might want to make. This was really slow, especially with atomic writes. Then I realized that for attributes with few possible values, like gender and orientation, I could fetch, say, both the male and female values from the datastore and combine them in the application code to create a gender-neutral statistic as needed. For overall scores, I updated both a global mean as well a set of score buckets in order to make histograms easier to generate. There's more discussion of these sorts of solutions here and here. You can check out the TGUPT code at code.google.com
</technical details>

Anyway, go take the test and let me know what you think.

Sunday, October 12, 2008

Animals in streets

I've been up to various exciting things lately, like Austin City Limits and running a half-marathon this morning (albeit verrry slowly). But at the moment I really want to discuss pictures of animals in streets. So far I only have two of them. But they make me giggle. Please share more.



Wednesday, September 3, 2008

Oo, my blog's back!

Richard thinks there was some DOS attack. Spammers piss me off. If I were the police, and I had the choice of say, arresting someone for smoking marijuana, or castrating a spammer, I would not be especially torn. But since Google's better at fighting spam than Richard is, should I switch to blogger?

Anyway, I was all excited to blog about running the Nike Human Race 10K (a race with a pun!) this weekend. It was crowded and started late, but people pretty much lined up at the right pace points, unlike NYRR races, making the race itself pretty smooth. I overshot, trying to run a 8:15 and running 8:43 instead. Nike even gave us split times, clearly showing me starting off too fast, slowing wayyy down, and then picking it up at the end. It helped that the Naked Cowboy and people drumming on plastic drums were there to cheer us along. And the individually-numbered race shirts and disposable paper timing chips were snazzy. Pro-tip: don't take the bus to Randall's Island. It's slow and crowded and $5, while the walk is pretty and pleasant.

Monday, July 14, 2008

In hindsight, a drinks-to-hours-asleep ratio exceeding 2:1 is not good race preparation

photo.jpg
This weekend, Jon and I had a co-birthday, with pre-drinking, the Girl Talk album, Anchor Steam Porter, margs, remote.app, popcorn, and cake manipulation at my place and then dancing at The Delancey. I was sporting my new shirt from French Connection, which turns out to make small and extra-small shirts that fit me(!). A good time was had by all (based on twittering, which is the new picture-taking), although apparently I am not very good at clapping on the beat. Beats are for suckers, anyway. Also, we had to pay the bouncers $40 to get the last five people in, which is like a total scam. I think there might have been shots involved...

...because when I woke up 4 hours later to go to the Park to Park race (with the fun free trip to the pool at the end), I didn't feel so good. I didn't make it in time to attach my chip or number, but I finished alive and kept pace with a slightly-gimpy Bolin. Sadly, the NYRR website claims I didn't finish the race. We had a tasty brunch at the cafe from You've Got Mail, which has awesome eggs-with-herbs, but I couldn't finish it, due to aforementioned yucky-feelingness. I went home and went back to bed.

Anyway, that was my weekend. I hope we all learned a valuable lesson about how much more badass you feel running a race after a night of crazy partying, or something.

Sunday, June 29, 2008

Confusingly, Portland is full of beer, not port

photo.jpg
During this week's mini-vacation, I learned about many fine things Portland produces, mostly in the form of alcohol. Notably, Emma (another fine thing Portland has produced) and I consumed Pinot Gris and Pinot Noir at Sokol Blosser, Chardonnay and Pinot Noir at Lange (along with an excellent view), Foggy Notion Weissbier at Bill's Tavern, Rope Walk Amber at Bridgeport Brewery, and Black Butte XX at Deschutes. (We also went to the Erath Winery, but weren't impressed by anything.) There seems to be a microbrewery on every corner in Portland, which is awesome.

To wash all this down, we had great taffy and pizza in Cannon Beach, tacos and tamales at Por Que No?, mango gelato at Mia Gelato, polenta at Lovely Hula Hands (restaurants have funny names in Portland), and various tasty things at Emma's parents'. Our trip was not limited to eating, however. We also walked and ran on Cannon Beach, which has a giant rock (pictured here) called Haystack Rock, and we wandered the Rose Garden and the Pearl during Portland's record heat. Luckily, Portland has a giant water fountain where you can sit and have water massage your feet. As an added bonus, the square is filled with a bunch of dazed newfound fathers letting their babies loose in the mini-pool the fountain creates.

But going for a run tonight reminded me why New York is still awesome. It turns out the crazy public art waterfall thing is a few blocks from my apartment, and totally breathtaking, and worth dragging your lazy butt to go see. (I also saw a graceful and fun temporary building made of wood set up for citysol up at 23rd.)

Thursday, June 12, 2008

Gramercy Tavern + Anniversary = Happy Kushal

photo.jpgOne big challenge as a vegetarian is finding fancy restaurants that have tasty vegetarian options. (yes yes, I know, life is sooo hard) Some places don't list anything on the menu, but can whip up amazing things, like the crazy olive and pine nut concoction on the vegetable plate at Allen & Delancey. Some places have boring vegetable plates, so unmemorable I can't even remember where I had them. And Italian places like Babbo are awesome, but variety is nice. Wandering through the list of New York Michelin restaurants (how many have you been to? I've been to five. looking at the list reminds me, Saul also did a great job putting together something vegetarian, as did Grocery. yay Brooklyn! all I remember about Cafe Bouloud was the bread, though)...where was I? Oh yeah, going through the list reminded me that Gramercy Tavern always looks so gorgeous when I run past it on my 20th st loop. When I saw the vegetarian tasting menu that had nothing I was allergic to, many of my favorite things, and some removable seafood, it was love at first sight. (Per Se also has a vegetarian tasting menu, but I don't think I'm quite ready to take it to that level yet.) Emma made a reservation for our one-year anniversary (one year? really? wow! Hi Emma!), which is technically later this week, but which we celebrated yesterday.

So how was the tasting menu? Yummmmmy. Our favorites were the nettle soup with pea shoots, and the mushroom ravioli in balsalmic, but the range of treatments of radishes, asparagus, and ramps were also really exciting. (The gelatin in the asparagus terrine was a little off, though, and the desserts were just good, not amazing). The celery in the lemon risotto had a nice bite to it, and the rice was perfectly cooked. It felt like we were in Top Chef! (Which we watched when we got home. Yay <spoiler>Stephanie!</spoiler>.)

This was just the latest in a range of recent adventures that have kept me too busy to blog, including Coney Island, Passing Strange, the Brooklyn Botanical Garden, Little Branch, Angel's Share, Flatiron Lounge, Cookshop, Po, Alvin Ailey, I'm From Barcelona, Barrio Chino, a new favorite wine bar, hiking, arm wrestling, a not-so-fry party, a chocolate fountain, caparinhas, tasty house-cooling goat cheese tarts, and BSG & margs. I'm exhausted just thinking about it.

Wednesday, April 30, 2008

Introducing the Millidunst calculator

I have long (jokingly) maintained that Kirsten Dunst is the standard against which all other hot celebrities should be measured. This is partially because measuring actresses in "millidunsts" kinda rolls off of the tongue, as in "Michelle Trachtenberg is like 500 millidunsts." Dolapo begs to differ, though. He's completely obsessed with her, and is unswayed by the dark side she displayed on Gossip Girl this week. Clearly, we need an objective source of truth. Enter xrank from Microsoft, which is like Google Trends, but easier to scrape and more celebrity-focused. I was looking for a way to play with App Engine (which is amazingly easy to work with, by the way), and this seemed liked a good choice. Behold, the (slightly slow) Millidunst calculator! Enjoy.

Sunday, February 17, 2008

Belize, Part 3: Sea-ing is belize-ing

Day 6, Thursday. We take a cab to Placencia at 8 in the morning, which feels less ungodly when you go to bed at 10. We check in at Westwind and head to the snorkeling shop (Nite Wind) where the nice lady sets up with some gear and takes a fair amount of our money. We're headed to the Silk Cayes, which are supposed to be on an excellent barrier reef. The boat is fast and bumpy and our guide is improbably named Engelbert. But there's a storm coming and wetake shelter on a random caye, where we get to know our fellow snorkelers. They include some college kids from Belgium living in Guatemala and some folks from LA staying at the really expensive Coppola resort up the road. We also get to know some hermit crabs, a rooster, and bugs that leave behind these gnarly looking bites with white circles around them. Thank god for DEET. We learn that no alcohol will be served in Belize until 6 when the polls close! This is amazing since until now there appear to be no laws related to the time, location, or age of alcohol consumption. (I am sure that American moralists will be shocked to discover that despite all this we encountered nary a drunken brawl or orgy.) We are glad we picked today to snorkel, despite the storm, since being stuck in town without booze would have left us pretty directionless. The storm lasts longer than planned, but soon we're on our way. I can't swim so well, and I figure there's a good chance of dying untimelyly today. But it turns out I can snorkel with a life vest, and life is good. Snorkeling is fun, but a little tricky when you're not allowed to wear your glasses and the waves are pushing you in the wrong direction. Also, the salt water keeps attacking my gums. The nice people help us around the reef, and we see a shark, and some purple fish going to school (we wave, but they don't wave back), some rainbow-colored fish, and a fish with a mohawk. The coral itself is awesome, just like on TV, but trying not to touch it is tricky because of the goggles' disorienting magnification. We eat a barbecue lunch cooked on burning coconut husks, and then we head to another caye. The reef here is a bit less vibrant, and most of the cool stuff is blurry to nearsighted ol' me. Engelbert pulls out a sea cucumber and a conch for us to examine. We head back, and on the way we see dolphins! Yay dolphins. Dolphins look a lot like waves and are tricky to spot. We also feel the beginning of a narly sunburn. Back in town, the bars are still closed! A lot of the bars and restaurants do not bother to open even at 6, through some combination of political fervor and economic resignation. We eat tasty Italian food because it is the only remotely vegetarian thing open. I introduce Emma to the mudslide at the one open beach bar, and she is enamored. It is unclear how Emma has never met the mudslide before.

Day 7, Friday. The whole day is allocated to relaxing. We start with fry jacks at De Tatch. Fry jacks are fried tortillas that you dip in honey, a Belizean version of fried dough that has somehow made it past the breakfast food censors. We stroll around town visiting shops. In one shop, we hear the music of Andy Palacio, which I will download on eMusic next week and listen to incessantly. We drink at the Barefoot Beach Bar again, and go for a several mile walk on the beach, checking out the resorts in town and burning whatever skin we had left. There is also some hanging out in hammocks. The food options are a bit limited and we end up eating Italian again, but the homemade pasta is delicious.

Day 8, Saturday. Time to leave, but first we wander around town and read in hammocks. The cab takes 10 minutes to take us to the airport, and it takes us about 10 seconds to check in. Our cab driver explains that the only difference between the two local airlines is that one pays its pilots per flight instead of per day, leading them to more willingly take off in inclement weather, which the cab driver considers a virtue. Lonely Planet informs us that, unsurprisingly, the airline has had more crashes. Our Cessna, thankfully, does not crash, and it flies low, giving us a chance to see a lot of Belize by air. At the airport, we spend our leftover money on snacks in anticipation of the hamburgers on Continental, which neither of us will eat. We also see t-shirts featuring every possible Belize pun - I feel very unoriginal. We notice a bit too late that everybody in the airport is drinking beer and rum punch. The airport has a bar and you can take the drinks with you! Emma, bored with her book and still waiting for me to finish What is the What, lines up and buys us beer with the last of our money. Hooray beer. Belize has been beautiful and fun and wonderfully remote, but I'm excited to get back to the Internet, television, restaurant options, and not getting sunburnt.

Monday, February 11, 2008

Belize, Part 2: B is for Belize, and for buses, beer, beaches, and bikes

(Addendum to part 1: Emma keeps a list of Questions for the Internet in her journal during the trip. This is a tradition begun during a disconnected ski trip last year, and it served us well. One of the questions for the Internet: how do I fold a towel elephant? Emma found the answer.)

Day 4, Tuesday. We say goodbye to our Caves Branch friends and walk to the road to catch a bus. We anxiously scan the horizon for buses so we have ample time to flag one we think will show up around 10:30. Somehow, we find the right bus, and we even transfer successfully to a second bus. Some hitchhiker tries to convince me to pay his bus fare, one of the few examples of someone being not nice, much less shady, during our entire trip. A little kid on the bus plays air guitar while drinking sprite and wearing giant yellow sunglasses. The trip is remarkably quick, although the last few miles to Placencia are unpaved and bumpy. We arrive with half the day left, check into our hotel, and head across the street to the beach. The beach has palapas at regular intervals, and we settle into cozy little hammocks. There are only a couple of people on the whole beach, but nearly as many dogs following us around. We get nachos and beer at the Green Parrot and then go back to doing nothing. I try running on the beach, but it turns out to suck for running through a combination of sloping, detritus, interruption by trees, and limited tidal differences. We hang out in the pool for a bit, looking out at the sea. Our room has a TV, and there is some bizarre movie on with Keira Knightley playing a bounty hunter, plus news about how Obama is doing. There appears to be no local content. We have dinner at the nicest restaurant in town. Emma has a watermelon margartia and sassy shrimp. I have a mojito and a bunch of tasty appetizers. Bedtime! We go to bed early here. It's pitch black on our walk back - no street lights and barely any lights at all - the stars are amazing.

Day 5, Wednesday. The hotel's kayaks look a bit ghetto, so we opt for their also-ghetto but less-likely-to-drown-us bikes. We bike the 7 miles to Placencia, which takes a couple of hours due to the terrible condition of the road and the blistering heat. Along the way, we stop by the dreary, untouristy Garifuna town of Seine Bight, where we follow an ad for Lola's Art. Emma buys a mask, we both buy beverages. We look both ways for airplanes and then bike across the airport. Placencia! Emma calls it surprisingly ramshackle, this sounds about right. It's a small town with one road and one "street" that is literally a sidewalk. We find a Barefoot Beach Bar and drink away the afternoon in the shade with our books. We make it back fairly quickly, checking out some restaurants on the way. We opt for dinner at the Green Parrot, which suspiciously and generically resembles their lunch. We try "premium" Belikin beer, which is less than a dollar more and tastes marginally better. Time for bed again - tomorrow will be a long day.

Sunday, February 10, 2008

Belize, Part I: In which the jungle generously decides not to kill us

Day 1, Saturday. Belize City's airport is small and squat and it takes two minutes to get through customs. The tropical/post-colonial architecture and typography is reminiscent of India. Our cab driver is excited because the election is on Thursday and they're hoping to replace the PUP, believed to be corrupt and selling out the country's assets, with the UDP. (Sadly, there are no engineers around to make UDP jokes to.) We quickly learn that Belizean English is highly accented, and is even written with Caribbean slang. Also, the Belizean dollar is pegged at half a US dollar, but prices are sometimes listed in US dollars, requiring a double take when looking at any price.

The best way to get to Ian Anderson's Caves Branch is via bus. Bus schedules are under-codified, but the right bus eventually shows up. It's a former US school bus, but painted orange. The bus ride is a good time to learn new facts about Belize from our dear friend Mr. Lonely Planet: the entire country has 300,000 people, for example. Also, in the old days, some pirates got tired of stealing wood and become loggers in Belize instead, and some ants told the Mayans to stop their successful rebellion in Central America. We drive past farms and small towns and lush jungles on the main highway - two lanes.

Caves Branch greets us with a welcome drink of rum punch. Welcome drinks are fucking genius and every hotel should have them. Walking from the road to the resort, Emma notices a snake, which we photograph and walk past. On Day 3, we will discover that this is a fer-de-lance and getting bitten would have killed us immediately. Our room at Caves Branch has no windows, just mosquito netting, and no electric light, just beautiful-if-easily-damanged oil lamps. It's made of gorgeous dark wood, has a real thatch roof, and the towels are folded into elephant shapes and are bearing flowers. At dinner, we make friends with some fun guys from Amazon, who tip us off to the idea of making cookie dough without the eggs for safe-dough-eating, among other things. We first encounter Belikin, the national beer.

Day 2, Sunday. We're signed up for the Black Hole Drop, which is a long hike up in the jungle, rappelling down into a canyon left by the collapse of a ginormous limestone cave, hiking around the caves, looking at some petroglyphs, and then hiking back out. We see a range of palm trees, plus two hazardous trees that grow conveniently next to their antidotes. The weather is great and there are surprisingly few bugs. Lunch is thick tortillas with fresh vegetables and cheese. Delicious. Our guide's grandparents are founders of the neighboring town that is now trying without success to institute a tax on its residents. The other person on our trip is a nice young woman from Montreal named Manon. Emma tries to eat an orange from the orange fields while we wait to go home but can't get through the tough skin. We take our first outdoor showers. There is enough time for a nap before chips and drinks at 6. The schedule they've set up is great, and the all-inclusive package means stress-free drinking. This is my first Times-inspired vacation, and it's yuppily wonderful.

Day 3, Monday. Today's activity is cave tubing. We stand on a flatbed pulled by a tractor, which fords 3 rivers in the course of our journey. It's like living the Oregon Trail. Cave tubing turns out not to be the leisurely activity we imagined, and our arms are tired of paddling our innertubes around the same time the novelty wears off. The caves have the occasional bats and verdant windows into the outside world, but are mostly pretty homogeneous. I fall out of my tube in some wussy rapids. We drop by the local cenote, the Blue Hole, and then it's time for last of free drinking before we head for the beach in the morning. The mango and rum drink is tasty. Ian Anderson tells us about all the scary animals on the premises, including aforementioned deadly snake. The guys from Amazon tell us that a transit system in Seattle was briefly called SLUT.

Coming soon: part 2, and pictures.

Thursday, January 3, 2008

Acrophobe!


Everyone needs a coding project over winter vacation, right? Mine started out as a Facebook game called Sentences, where you'd get a random set of words, try to make a sentence out of them, and then vote for your favorite of the ones you friends wrote. I spent a bunch of time collecting word frequency lists and trying to pick words with different frequencies, but in the end the game actually didn't seem like it would be fun. You can try playing against your self here. Anyway, I got talked into writing a simple Acrophobia clone, which actually let me reuse a lot of the code. It still took longer than I'd expected, mostly because PHP is a terrible, terrible language - a lot of weird silent failures, odd object-copying semantics, etc. Anyway, Acrophobe's done! It hasn't been played that many times, so you may encounter some bugs. There's also a notebook with notes from my wanderings, including various word and letter frequency lists. (It was actually hard to find a numeric list of initial letter frequency, so the numbers I'm using for Acrophobe are sort of inferred from the few sources I found.) The app is even hosted by Joyent's free hosting, which was relatively easy to set up and probably more reliable than the server for this blog is. ;-)