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

March 23, 2008

Using a Windows Media Center remote control in Winamp, WMP and Media Player Classic

Filed under: misc, toys, windows vista — Dave @ 4:46 pm

I’m using a Pinnacle Remote Kit (for MCE Certified for Vista USB 2.0 Interface) that was $30 off newegg, and it worked out of the box for Windows Media Center but I want to use other programs. All of this is being done on Windows Vista Ultimate.

Winamp

Winamp takes the cake for compatibility with this remote.

  1. Press Ctrl+P to bring up preferences
  2. From Global Hotkeys, enable default multimedia key support

Media Keys in Winamp

Now winamp will respond to keys whenever it’s running unless another program has focus and wants the clicks for itself (like if you’re running Media Center).

Windows Media Player

I tested WMP first, and I could’ve sworn it wasn’t working, but after configuring winamp, WMP now responds to next, previous, play, pause, stop, volume, mute, back and OK seems to go to the previous file.

Media Player Classic

MPC, everyone’s favourite little open source player isn’t so friendly:

  1. Press “O” to bring up options
  2. Go to Player\Keys
  3. Double click on the “key” entry, so for “Next Playlist Item” click on the string VK_NEXT, it turns into a drop down and you can change it to some of the media keys. The one’s I’m sure of are: VK_MEDIA_NEXT_TRACK, VK_MEDIA_PLAY_PAUSE, VK_MEDIA_PREV_TRACK, VK_MEDIA_STOP but I haven’t gotten play/pause to work correctly.

media keys in media player classic

March 16, 2008

Does democracy get diminishing returns to scale? (My thought of the day)

Filed under: ideas, thought of the day — Dave @ 8:29 pm

Theory: The more issues a government becomes involved in, the less involved voters become in choosing the government.

As a simplification, let’s imagine there’s a presidential election between James McDonald and Brock O’Malley, who each have only 2 policy ideas that they disagree on, and that you and I are voting only on which candidate will reduce spending and taxes.

James McDonald wants to eliminate earmarking in the federal budget and to extend the army’s deployment in a land war in Asia forever, since earmarks creates corruption but military service creates honour.

Brock O’Malley wants to stop the land war in Asia immediately since he feels it’s a waste of resources, but wants to spend money on medical care for the working poor since he feels that it’s our responsibility.

Even with one goal, and two candidates with only two policies each, I’m not sure which is the right one to vote for.

I think the optimal solution to reduce government spending is to elect James McDonald so he can eliminate earmarking, then throw him out next election for someone who’ll end the military engagement — earmarked pork “only” costs $29 billion each year (some of which might be useful), whereas the military engagement is costing $100 billion per year. So if James McDonald is serious and effective, his 4 extra years of war will be paid with the savings from removing pork in about 15 years, after which the country will be $100 richer per person every year.

So in a simplified case where everyone does exactly what they say, we can vote effectively.

Thus all a functioning democracy requires is that neither candidate ever utter a third sentence. As soon as James McDonald declares that vaccines cause autism or Brock O’Malley declares that trading with Canada causes poverty, optimal voting may become unsolvable.

I’m not being glib, if you want to reduce the redistributive effect of government: I sincerely don’t know which party to vote for. And I only chose this issue because the share of GDP which goes to taxes is far easier to measure than other divisive issues, like the effect a particular set of policies have had against terrorism.

More issues = more variables = more difficult to make optimal choices. That’s why cell phone plans are so complicated, it’s much harder for consumers to pick the cheapest one for their needs.

As a general rule, once government gets involved in something, it never stops. This means the number of issues that candidates have opinions on about will steadily increase and any voter’s ability to make the best choice will correspondingly decrease.

Counter-intuitive conclusion: The more involved the government is in our lives, the less incentive we have to choose the government that would be best for us.

That can’t be right, can it?

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.