Once forked a process in Reno just to watch it die.

May 27, 2009

Trying to Game Swoopo, dagnabit

Filed under: data, statistics, R, kinda maybe funny — Dave @ 12:14 am

Casinos love guys with systems.

Jeff Atwood and Ted Dzubia both hate Swoopo, so it’s roughly as bad as PHP. A quick overview: “auctions” start at $0.00 and each bid raises the price by pennies, the time remaining in the auction by 10 seconds and costs the bidder 75 cents to place.

If you can get the last bid in (and you only place a few), you can pick up a $1000 laptop for $30. I mostly ignored Swoopo until Joshua Stein tried to game it. He was thwarted by HTTP requests not being accurate to the sub-second (since Swoopo gives ties to the users who waste money on automatic bidding), and determined that bidding was indistinguishable from gambling.

But I’m not convinced it can’t be gamed, the key being that you want to game it with high probability rather than win any one auction.

Just as a first pass, I think you want to find auctions where:

  • Several are closing at the same time - so there’s less competition
  • At a particular time of the day - same reason
  • Only auctions for $500+ items selling for more than 90% off, so any accidental purchases can be safely sold at a profit (I don’t want to bother reselling DVDs)

So I used a greasemonkey script to download the last 10 000 winners into a spreadsheet.

Quick facts:

  • 9904 auctions were won by 4217 distinct users (7 by phone)
  • The average savings (vs the suggested price) was %65, although in 35 users paid more than the suggested price
  • 2853 auctions were open only to manual bidders, rather than the automatic bidbutler (the difference in savings %66 vs %66 isn’t significant).
  • Wins are spaced fairly evenly throughout the 24 hour clock
  • The average winner placed ~95 bids, thousands are not uncommon, one “winner” placed 2623 bids
  • Roughly one in ten auction winners placed only 1 or 2 bids.

Clearly the last point hints that it’s possible to win by sniping at the last minute.

Roughly 1 in 8 auctions was for items valued at more than $500, and won for less than 20% of the suggested price. “Winners” used an average of 311 bids — that doesn’t look good.

Next step, crack out the R.

Source: Swoopo dataset 3

October 20, 2008

TSA agents commit crimes

Filed under: misc, kinda maybe funny — Dave @ 9:36 am

Notable if only for the size: TSA agent steals $200K worth of gear, resells it on eBay

…one agent had single-handedly absconded with over $200,000 worth of travelers’ belongings, primarily cameras and laptops… travelers have no real means of protection when it comes to guarding against inside job thievery like this.

I’m going to assume that the amount stolen by a given TSA agent is a poisson distribution, so though I expect this agent is an outlier in terms of magnitude, he reflects a general laxity towards employing criminals in the TSA. To be fair, security is hard, and a job riffling through other people’s things with near immunity is going to attract thieves.

But to be clear, there’s something deeply disturbing about being treated like criminals by the TSA every time you fly through the USA, when the TSA employs criminals.

/grumpy.

Update (Nov 20): A helpful reader writes in to point out that air marshals are worse.

July 11, 2008

56 Megs for 5 words

Being a Vista user, I’m used to getting smacked in the face, and yet even I was curious when Vista wanted to download a 56 megabyte update — is it installing something completely new?

Massive download

So naturally I checked out the Knowledge base article:

The words “Friendster,” “Klum,” “Nazr,” “Obama,” and “Racicot” are not recognized when you check the spelling in Windows Vista and in Windows Server 2008

Oh, noes! That’s serious indeed. And worse: it applies to such critical applications as Windows Mail! — The Office apps seem to “correctly” accept all of these words.

So to re-iterate, 5 words weighing in at 34 bytes compresses down to 56 megs. Giving a compression factor of ~10^jeeze-louise-people!

Seriously guys, I don’t want to hear any more about how XML adds a lot of overhead.

p.s. I’m pretty sure I know why this happened. The PM in charge of this had two choices: EITHER have a dev write code to do a diff, and get an SDET to test it which could take a long time, and get slagged in the .01% of cases where something goes wrong OR just throw resources at it, in this case the bandwidth of millions of people. It might have actually been the right choice from their perspective, but it betrays some poor design somewhere.

p.p.s. Standard disclaimer: I used to work for the Borg as a PM, but I know nothing about this particular team.

June 27, 2008

I’m kind of a big deal around the blogosphere

Filed under: Blogroll, kinda maybe funny — Dave @ 7:01 pm

Apparently Ta-Nehisi Coates and I have a psychic link, because we have the same thoughts at the same time. But don’t take my word for it, take the words I cut and pasted from our conversation:

D: … “Study shows blacks don’t share similar views of world”…. Now I’m not sure what I feel, but seriously — that 39 million people don’t all agree is headline news? This needed studying rather than talking to 2 or more people? ….

T-N C: “haha! yeah you had about the same reaction i would. i’m posting about this right now.” [same link as above]

D: “I look forward to it. But I have to warn you, some whites may not. I’m not sure how well known it is, but often whites don’t all have similar views.”

T-N C: “lol”

June 21, 2008

Scratch (goto considered impossible)

Filed under: toys, programming, kinda maybe funny — Dave @ 3:26 am

I spent an hour or two playing with Scratch a programming environment for kids. It’s infuriatingly difficult to re-use code (there are no functions for instance), no arrays, no network connectivity, and no external files.

But isn’t this awesome? (use the arrow keys to drive once it has focus, the green flag may start it)

Scratch Project

May 26, 2008

Guitar Poser (first pass)

Filed under: misc, toys, kinda maybe funny, ideas — Dave @ 2:43 am

Here’s something I wanted to see exist. Rather than yet another Guitar Hero clone, this is a guitar emulator… sort of.

Start it up with your USB Guitar Hero controller plugged in (as the only Joystick), and there you go: from guitar hero to guitar poser.

  • Strumming causes a note (obviously)
  • Pressing a single key gets you regular notes, A, B, D, E and G. Pressing several keys at a time gets you some chords, chosen pretty much at random from the ones available at the freesound project
  • The whammy bar controls how quickly notes fade out once you’ve unstrum
  • The volume is controlled but how vertical the neck is

Awesome Screenshot

Check out those wicked graphics! Seriously though, try it out.

The samples are huge so the ZIP is 27megs: GuitarPoser.zip.

March 9, 2008

How Communism Kidnapped My Cat

Filed under: travel, kinda maybe funny, china, long rambling stories — Dave @ 5:41 pm

I’ve referenced this life lesson so much that I feel I should write an authoritative account that I can reference. I’ll try to keep the fun educational aspects to the parentheses. It’s worth mentioning that this story takes place on the outskirts of a dirty town you’ve never heard of in non-coastal China; there were pockets of modernity and a McDonald’s downtown but shortly after this story a donkey-drawn cart of toilets overturned in front of my building, strewing porcelain around the dirt road (this gives you a pretty accurate feel of the place).

From Socialitter to Capitalists’ Fat Cat

Baijiu (”By Joe” = White liquor, a foul tasting vodka-like drink) got his name iteratively, after we learnt out that “Chairman Māo” (mao1 meaning cat, and pronounced like an angry mother saying “now” slowly) was co-incidentally very similar to “Chairman Máo” (mao2 meaning hair or fur and pronounced more like “ow!”). Clearly this was unintentional, as my 98 gram weakling of a cat had barely a Deng Xiaopeng (4′11″) frame, never mind the great helmsman’s 5′11″. Nonetheless, we were told his political career would go better with a less contentious name, and no, Chairman Meow wasn’t going to cut it either.

As the runt in a 9 kitten litter where only 8 found homes, Baijiu was thrown out onto the street and had to compete with all the other strays for scraps from the restaurants in the open air market. He didn’t do so well. After a few weeks though, he stumbled onto a sucker (me) with an informal agreement with a veterinarian back home that if he (I) were to, say, let a cat starve to death, she would kill him (me) in his (my) sleep. So I bought the little guy some spam in a tube for a nickel (the cheapest kind of meat on earth), and people stopped and stared — it was a little strange, the idea of buying food specifically for a house pet; most local cats lived on diets of leftover scraps of bread, vegetables and tiny bits of meat and here was this stray getting the royal treatment from a lǎo wài (meaning foreigner, but in the same sort of vein as a tractor salesman from Iowa might refer to an interracial gay couple from New York thinking of opening up a chai tea shop in his town as foreign). This cat knew a good thing when he found it.

Baijiu was hooked, I was hooked. My girlfriend, who had only recently been making scary noises like “adopt” and “a Chinese child” was hooked and distracted. We took him home, bathed him, made him a collar and bought him over 30 cents worth of food (these prices are all as accurate as I can remember).

Stacey and I were living on a compound of the provincial power company in a few rooms in somewhat renovated workers quarters built in the 60’s. We each had twenty times the living space of other workers our age (of course, I doubt I would’ve been coaxed across the sea to live in a cot and share a small sink with 11 other people) but I’m allergic to cats, so Baijiu had to be an outdoor cat.

Smashing the Gang of Foreigners + Cat

All the buildings housing foreigners had “assistants,” peasant girls who slept behind the front desk. They were ostensibly there to help us, but mostly they kept a log of our comings and goings and made sure we didn’t bring any Chinese women back to our apartments. Stacey and I were relatively popular with the girls, She gave them popsicles, I hadn’t tried to sleep with any of them and we both speak a lot more Chinese than you normally get from white people. And they loved Baijiu, so they told us they’d help keep our secret, which was a little odd, since “I have a cat” doesn’t seem like a very interesting secret.

Baijiu used to sleep on top of a large column in the croquet pitch beside our apartment because he was afraid of the local stray cats. He couldn’t get down so every morning I’d get him down and give him his spam and milk.

One day he wasn’t there, the girls were concerned but reserved and wouldn’t tell me anything. This is what we’ve managed to piece together, none of this would hold up in court:

The foreigners weren’t supposed to have pets, but the people in charge of enforcing that rule weren’t really sure where we were in the hierarchy (I was drinking buddies with the local party secretary and Stacey was literally the poster girl for the school) so rather than confront us on the issue, they took my cat and drove him a little ways out of town and left him there.

Communist agents of the provincial power company disappeared my cat.

baijiu1.jpgbaijiu2.jpgbaijiu3.jpg

In which I destroy the suspense

At least a week and a half later, I was walking home from the office around midnight and a little marmalade ghost ran out across the plaza to me. He knew which side his bread was buttered on, and I guess he had more luck reading road signs than I ever did.

The cat came back.

By then we thought he was a goner, but the cat came back; he just couldn’t stay away.

And some Clarifications

Baijiu was actually kidnapped 3 times, the first was by the girls who ran the company store. They “adopted” him, tied him up in front of the store, and fed him scraps for a few days until I found him. The second time was the communists, and the third time was just before Stacey and I left town. The propane delivery man took Baijiu home to his daughter without asking our permission, but since we were looking for a home for him anyway, that may have been the best outcome anyway.

October 13, 2007

one million points

Filed under: misc, kinda maybe funny — Dave @ 3:02 pm

4tehw1n.jpg

That’s right, one million points in Bejeweled.

It’s my gift, it’s my curse.

April 16, 2007

Secret tips to get the job at Google you all want

Filed under: jobs, interviews, google, kinda maybe funny — Dave @ 12:26 am

I applied to Google as an after-thought, I had bought the hype and I honestly thought I wasn’t smart enough.

Executive summary: I’m not

Apply 3 times, twice by accident and once with incomplete forms. This is convienient because you can get a phone call inviting you to an interview and an email saying they aren’t interested at the same time.

Don’t fill out the Self Evaluation: Google sent out a self-evaluation along these lines:

On the scale of 1-10 (10 is the best), how do you rate your HANDS ON experience in:
1. If you rate yourself a 10 that means that you wrote and published a book on the subject.

I filled it out on Google Docs, published it and sent them the URL… for a random comic I found on reddit (damn CTRL-key!). So rather than discuss my competance as a C programmer, I decided to tell them that MIT graduates didn’t like girls.

Ignore their phone calls: Go to another country where you have no cell-phone reception immediately after giving them your cell number. Bonus points if it is to visit Microsoft. More points if you can’t use your answering machine.

Have a phone interview at work, I think my boss finds it flattering the Google is considering poaching his most moronic employee. Assume yours feels the same way.