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

June 14, 2009

nsfw tag considered harmful

Filed under: misc, long rambling stories — Dave @ 6:11 pm

Recently I read a proposal for a NSFW (not safe for work) tag, and I liked the idea for a few minutes but I’ve disliked it ever since. The most-discussed problem with a <nsfw> tag is the cultural specificity of what’s safe and unsafe for your work environment, for example could you watch South Park.

I really see the biggest problem as where the NSFW bit should live, in the link or in the content. Probably everything on www.dirtynastypicturesofhorriblethings.com is unsafe for work, so it’d be easiest to send a X-NSFW header to every http request, and the browser could display an “Are you sure you want to see nsfw content?” prompt before showing the page. However the cultural question is much easier, if you consider it to mean “This link is considerably less work safe than the content around it.” In that a link to fark.com might be nsfw if it’s coming from the Wall Street Journal, and then a link from fark.com could itself be nsfw if it linked to nudity.

Generally though, I think it’s the wrong solution. I really want an attribute on links to say “this link opens a PDF,” because in so many environments, starting Adobe Reader is tantamount to crashing the machine, but the correct solution is for the browser to warn me and handle it correctly (which is what my machines do). And that is even easier in that compliance wouldn’t be voluntary, a nsfw tag would still leave you victim to pranksters and lazy posters (which judging by the sheer number of lolcats is just about all of us). Worst of all, the scenario this proposal is trying to solve is “I want to browse the web at work and not get in trouble,” so I don’t really see any buy-in from corporations since it’s a pretty tough sell as a new “feature”.

There is a lot of opportunity to enrich the machine understanding of web communications, but I really think this problem is probably best addressed with some kind of clever browser plugin — most search engines sensor their results, a starting point might be to show a warning if your link wouldn’t show up in censored results.

Edit: An obvious (but the kind of clever obvious that you miss) pair of points from reddit:

  • From jamt9000, this can already be done on a website level, by just using a class=”nsfw”, if it catches on, browsers will support it without any new standards.
  • And naner points out that much of the actual nsfw images are advertisements (probably since they need to attract attention) which would break any voluntary proposal

October 31, 2008

Understanding Traffic on the 401, pt 1.

Filed under: misc, travel, data, programming, ideas, long rambling stories — Dave @ 8:45 am

The Government of Ontario runs a fantastic service to monitor the state of traffic jams on the 401: COMPASS Freeway Traffic Management System. So the obvious question becomes, when should I drive home?

Step 1: Get some data

First I ran a cronjob on the server hosting ultrasaur.us, that basically recorded the state of the various stretches of road. It’s been running a few days now, and after 14000 readings, there seem to be the following states for a stretch of road (with counts):

  • Express and collector moving slowly (423)
  • Express and Collector moving well (7055)
  • Express and collector very slow (85)
  • Express moving slowly. Collector moving well (205)
  • Express moving slowly. Collector N/A (49)
  • Express moving slowly. Collector very slow (138)
  • Express moving well.  Collector N/A (1236)
  • Express moving well. Collector moving slowly (435)
  • Express moving well. Collector N/A (271)
  • Express moving well. Collector very slow (48)
  • Express N/A.  Collector moving well. (1241)
  • Express N/A. Collector moving slowly (129)
  • Express N/A. Collector moving well (421)
  • Express N/A. Collector very slow (43)
  • Express very slow. Collector moving slowly (45)
  • Express very slow. Collector moving well (14)
  • Express very slow. Collector N/A (75)
  • Moving slowly (122)
  • Moving well (795)
  • N/A (1198)

Notice that there are some near duplicates with double spaces after a period — I’ll convert multiple spaces into singles.

Next I needed to give all of these a value, based on my back of the envelop calculations well means 80+, slowly means 50-80 and very slow means 0 to 50.

Caveats and thoughts:

  • the values can’t be exactly calculated, so I’m not going to try,
  • one important thing that I want to do is map each status to a unique value so that I don’t lose any data. The key is that the values be in order
  • you can see that I’m biased towards the expressway

So values represent the proportional time it takes to travel over a stretch of road (ie higher is worse):

  • 100: Moving well
  • 101: Express and Collector moving well
  • 130: Express N/A. Collector moving well
  • 150: Express moving well. Collector moving slowly
  • 160: Express moving well. Collector N/A
  • 170: Express moving slowly. Collector moving well
  • 180: Express moving well. Collector very slow
  • 200: Moving slowly
  • 201: Express and collector moving slowly
  • 210: Express N/A. Collector moving slowly
  • 250: Express moving slowly. Collector N/A
  • 380: Express moving slowly. Collector very slow
  • 410: Express very slow. Collector moving well
  • 460: Express very slow. Collector moving slowly
  • 501: Express very slow. Collector N/A
  • 500: Express and collector very slow
  • 510: Express N/A. Collector very slow
  • null: N/A (I’m willing to extrapolate a guess at the other N/A’s, but not here)

So this gives me the first chance to make a graph, just over my first 14000 points, here’s the average state of the 401 Westbound over the 24 hours in a day (over a Monday-Wednesday):

Westboud 401 travel times (higher is worse)

The worst time to drive is 4-5pm, but the three hours from 3pm to 6pm seem to be the worst. That’s not much of a surprise (although it’s an hour or so sooner than I expected rush hour to start), but that evening rush hour is so much worse than morning rush hour is a bit of a shock. That 1pm is such a slow time is curious too, I wonder if that bump will go away with more data.

(Data is available to anyone who contacts me, it’ll eventually be available for download)

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.