Saturday, December 28, 2013

The joys of being a systems programmer

From James Mickens, dubbed 'the funniest man in Microsoft Research', which you might think is a backhanded compliment, but is actually just a compliment. The Night Watch:
Perhaps the worst thing about being a systems person is that other, non-systems people think that they understand the daily tragedies that compose your life. For example, a few weeks ago, I was debugging a new network file system that my research group created. The bug was inside a kernel-mode component, so my machines were crashing in spectacular and vindictive ways. After a few days of manually rebooting servers, I had transformed into a shambling, broken man, kind of like a computer scientist version of Saddam Hussein when he was pulled from his bunker, all scraggly beard and dead eyes and florid, nonsensical ramblings about semi-imagined enemies. As I paced the hallways, muttering Nixonian rants about my code, one of my colleagues from the HCI group asked me what my problem was. I described the bug, which involved concurrent threads and corrupted state and asynchronous message delivery across multiple machines, and my coworker said, “Yeah, that sounds bad. Have you checked the log files for errors?” I said, “Indeed, I would do that if I hadn’t broken every component that a logging system needs to log data. I have a network file system, and I have broken the network, and I have broken the file system, and my machines crash when I make eye contact with them. I HAVE NO TOOLS BECAUSE I’VE DESTROYED MY TOOLS WITH MY TOOLS. My only logging option is to hire monks to transcribe the subjective experience of watching my machines die as I weep tears of blood.” My co-worker, in an earnest attempt to sympathize, recounted one of his personal debugging stories, a story that essentially involved an addition operation that had been mistakenly replaced with a multiplication operation. I listened to this story, and I said, “Look, I get it. Multiplication is not addition. This has been known for years. However, multiplication and addition are at least related. Multiplication is like addition, but with more addition. Multiplication is a grown-up pterodactyl, and addition is a baby pterodactyl. Thus, in your debugging story, your code is wayward, but it basically has the right idea. In contrast, there is no family-friendly GRE analogy that relates what my code should do, and what it is actually doing. I had the modest goal of translating a file read into a network operation, and now my machines have tuberculosis and orifice containment issues. Do you see the difference between our lives? When you asked a girl to the prom, you discovered that her father was a cop. When I asked a girl to the prom, I DISCOVERED THAT HER FATHER WAS STALIN.”
Gold, gold, gold. Read the whole thing.

And when you're done, read the rest of them too.

Tuesday, December 24, 2013

Belatedly...

I'm back in Oz, hence the drop in recent postings. With punctuality like this in notifying my loyal readers, apparently I shouldn't be in charge of managing a business. Neither fact (skyvving off in Australia and lack of organisation) should be a surprise to those who know me in real life. I should be back to full posting strength (which, as Hector Lopez told me today, has been a bit weak recently) some time around January 8th.

My defense, as always, is that you guys are getting what you paid for. Suckers.

Infidelity as a Commitment Mechanism

I've wondered a few times on these pages about the psychology of married people who begin affairs. As I wrote at the time:
As the length of the affair increases, the probability that your wife will eventually find out converges to 1. The chances that you'll slip up somehow, or get inadvertently found out through some voicemail, missed call, something, are too high.
And when that happens, the results are as predictable as they are horrible.
So how does it make sense to start down this path, rather than go for an honorable divorce now?

It’s entirely possible that the whole thing is just overconfidence, and the people involved think they can beat the odds forever. Maybe they’re just that stupid.

But I think I’ve figured out an alternative.

What if the eventual inevitability of getting caught is the feature, not the bug?

Suppose the unfaithful partner wants to be out of the relationship, but suffers from hyperbolic discounting. Even someone who has grown bored with their partner will still find it painful to tell their husband or wife that they want a divorce. You are wrenching the heart of the person you once loved enough to declare a lifelong commitment to. You want to be free of them, but that doesn’t mean you’re not dreading the process of getting from here to there.

So what will you do if you’re a hyperbolic discounter? You’ll procrastinate. You’ll convince yourself that you’ll leave your wife next month, or next year. And somehow next year turns into this year, and it never happens.

In this view, embarking on an affair is a sign of wanting out eventually, but not having the courage to just end it then and there. The affair is thus a commitment to eventually end the marriage at some unknown point when you get discovered. It functions somewhat like the Thaler and Bernartzi ‘Save More Tomorrow’ plan, or the complaint to the police by a domestically abused woman in a  no-drop jurisdiction. It’s the ‘Divorce More Tomorrow’ plan for those without the courage to tell their husband or wife that they want to leave. 

The indefinite timeline for discovery is also a plus – a known date would cause a lot of stress as it approached, and would create the risk of massive preference reversals. The unknown aspect means in addition that the final choice is taken out of the cheater’s hands, which benefits those who want to feel like the divorce was the process of some inevitable deterioration in the relationship, rather than an active choice by them (we grew apart, things didn’t work out, the knife went in).

My guess is that when the cheater is eventually discovered in their lie, once the initial shock is overcome, the next feeling is relief. Relief that things are finally drawing to the conclusion that they’ve long wanted, but haven’t had the courage to actually ask for.

It seems a strange explanation, but I can’t think of a better one.

Wednesday, December 11, 2013

A series of mostly rhetorical questions to the people complaining on Facebook about the Indian Supreme Court decision upholding the constitutionality of laws criminalizing homosexual acts

1. The decision itself can be found here. Have you read it, even if only briefly? Did it occur to you to even search for it? Have you read a summary of the main arguments the court advanced? Do you know which protections in the Indian constitution the law was alleged to have violated?

2. In your opinion, is there such thing as a law that is sound policy but nonetheless unconstitutional?

3. In your opinion, is there such thing as a law that is poor policy but nonetheless constitutionally valid?

4. Related to #3, the court stated in its decision:
"It is, therefore, apposite to say that unless a clear  constitutional violation is proved, this Court is not empowered  to  strike  down  a  law merely by virtue of its falling  into  disuse  or  the  perception  of  the society having changed as regards the legitimacy of  its  purpose  and  its need."
Do you agree?

5. If you did not agree in #4, on what basis should the court decide which laws to strike down?

6. If you did agree in #4, how do you personally decide whether you think a law is constitutional or not? How does this relate to your answer to #1?

7. The court concluded its decision with the following:
"While parting with the case, we would like to make it clear that  this Court has merely pronounced on the correctness of  the  view  taken  by  the Delhi High Court on the constitutionality of Section 377 IPC and found  that the  said  section  does  not  suffer  from  any  constitutional  infirmity. Notwithstanding this verdict, the competent legislature  shall  be  free  to consider the desirability and propriety of deleting  Section  377  IPC  from the statute book or amend the  same  as  per  the  suggestion  made  by  the Attorney General."
If you do not like the policy implications of the current decision, why is your displeasure directed at the court, and not the relevant legislature, who has had the power to repeal this law all along but chose not to exercise it? Or the voters for the politicians in said legislature?

8. If a court comes to a decision that supports good policy by utilising arbitrary and shoddy reasoning that departs from what it has stated before, can you think of any negative consequences to this? Do you think these consequences are important or not?

9. Related to #8, what is the value of precedent? Do you think it is important that the likely decision of the court on a particular legal question is mostly predictable in advance to legislators and citizens?

I'm not holding my breath for any answers.

Economists are often astounded at the sheer number of people who have little appreciation for basic principles of economic reasoning. On the other hand, the appreciation for economics is ubiquitous when compared with the legal equivalent - the number of people who have zero conception that a court case has any important dimensions other than whether you personally would have voted to support the law or principle whose constitutionality is being called into question.

Monday, December 9, 2013

It's white, Jim, but not as we know it

What happens when the whitest band in history covers the second whitest band in history?

A whole metric buttload of awesome, that’s what.

\

24 carat solid rolled gold.

Hypothesis Falsified

AL sent me a link to this story about how Jessica Kerr, lately a model for Victoria’s secret, was apparently punted from said job after saying that she didn’t think Taylor Swift had what it took to be an underwear model.

Frankly, this didn’t seem like such a disrespect – the number of women who do have what it takes is surely extraordinarily small. Have you read about what they have to go through before a show? No solid food for 9 days before the show, and no liquid for 12 hours before. Ye gads! Every single excess pound is on display for the whole world, and your career depends on looking absolutely flawless to as many ogling eyes as possible. It’s perhaps not a surprise that this is not dissimilar from playing sport at an elite level, in terms of success requiring both extraordinary commitment and rare natural talent.

So my first hunch was that the Taylor Swift comments were mainly a pretext, and Victoria’s Secret was looking to ditch Kerr anyway. I was guessing it was an age thing – she was just close to the end of what is surely a very limited shelf life for underwear models.

According to the only reference anybody consults anymore, Kerr is 27. Bingo! Surely that’s got to be at the upper end of the range, right?

It turns out, not so much.

A vast and grueling dedication to scientific truth lead me to ascertain that the current list of Victoria’s Secret Models has a much wider age range than I thought. In ascending order:

Karlie Kloss – 21
Erin Heatherton – 24
Behati Prinsloo – 24
Candice Swanpoel – 25
Lily Aldridge – 28
Doutzen Kroes – 28
Lindsay Ellingson – 29
Miranda Kerr - 30
Adriana Lima – 32
Alessandra Ambrosio – 32

32!!! Remarkable, huh? Admit it – when you started reading this article, you would have thought it inconceivable that 30% of the most famous currently employed underwear models on the planet have ages starting with a ‘3’.

Part of the value in economics training is not the logic of economic reasoning itself, but simply the dedication to empiricism. You have a hunch about the world? Great! Find some data that will test said hunch, and see if it’s true or not.

The first thing you will learn is that it is amazing how often your hunches about the world turn out to be wrong.

The second thing you will learn, more by way of conversation, is how tiny the number of people is who actually regularly test their ideas about the world in a systematic way and update accordingly.

More’s the pity.

Much more, actually. 

Thursday, December 5, 2013

Get your lack of money for nothing, and your lottery tickets for free

I've come to the conclusion that a large amount of existence of small local bands can be explained by option value.

The bands themselves exist because of the out-of-the-money option that they’ll strike it big and become the next U2. In the meantime, they’re playing in tiny venues to small crowds of people, and making no money. I have no particular stats on that, but plausible McKinsey job interview style estimates of revenue from a 200 person show suggest that even if the margin is really high, hourly wages are going to be pretty damn low. Steve Levitt famously argued that there’s a reason the average drug dealer lives with his mum. To follow the same logic, there’s a reason that small bands on tour are looking to crash at random people's houses – they’re poor.

But perhaps less appreciated is that option value probably explains a lot of the audience presence too. Their option is that maybe if the band becomes big then they’ll be able to boast that they heard them first and listened to them in a tiny venue for no money before anyone knew about them. The more insufferable ones will also go on to complain about how they were much better before they sold out. I have a family friend who once went to a concert in Liverpool in the sixties that featured both the Beatles and Gerry and the Pacemakers before either of them were big. (Apparently the concert cost £1 to attend, or something equally hilarious). It’s a pretty rad story. But you’re going to listen to a lot of no-name bands before you hear the next Beatles.

Sure, some people just like live music, and prefer small venues, and want to support small acts, and actually just enjoy that type of music. But those are boring and obvious hypotheses. Freakonomics taught me that when you really understand the world, the truth will always turn out to be both hilarious and counterintuitive, in a way that makes for great cocktail party conversation.

Monday, December 2, 2013

Song lyrics that annoy me



From Robin Thicke’s ‘Blurred Lines’
‘I feel so lucky
You wanna hug me,
What rhymes with “hug me”?’
Really? You’re rhyming ‘hug me’ with ‘hug me’, and referencing it as if it’s a pun? Rhyming a word with itself is the absolute cheapest, most pathetic way of satisfying the technical requirements of rhyme.

I understand that you’re trying to create an hilarious joke by suggesting the word ‘f*** me’ as the implication of what follows ‘hug me’, but a) this doesn't even rhyme, and b) loads of other things do.

To answer the question, you can write obvious lyrics that make sense in context using  ‘bug me’, ‘mug me’, ‘drug me’, or ‘dug me’, slightly offbeat lyrics using  ‘plug me’, ‘slug me’, and ‘tug me’, and if you’re willing to go more absurdist then ‘chug me’, ‘lug me’, ‘shrug me’, and ‘pug me’, work in a pinch as well.

The main alternative to a failed intended meaning of implying ‘f*** me’ is that he knows that lots of things rhyme with ‘hug me’, and he’s instead openly giving you, the listener, the middle finger by shamelessly not being bothered to finish the rhyme, with the knowledge that you’ll still listen to it anyway.

Either way, what a clown.

Australia as a Triumph of Reversion to the Mean

Not many people really understand the idea of reversion to the mean in the context of genetics. If it’s discussed at all, it’s usually in terms of the rich smart guy having an idiot son who ruins the family business. But there’s more to it than that.

The first part you need to realise is that it’s often unhelpful to think of your genes as a deterministic set of instructions that will be replicated over and over in your children unless mutations.

Instead, one crude metaphorical way to think of the process of Mendelian Inheritance is that your genetic outcomes are the process of a random variable that is drawn from the joint distribution of your mother’s family and your father’s family. Combined, you can think of this as your family genetic distribution.

Your particular genes contain information both about you (i.e. the one particular realization of that variable) and the overall distribution of traits in your family (the possible range of other realizations of you and your siblings). When you have children, each child is a realization of the joint distribution of your family traits and your husband or wife’s family traits. If you have enough children, you’ll start to see the outlines of the whole distribution of possible traits – ranges of height, ranges of facial features, ranges of hair colors, etc.

So what this means is that when it comes to whether your children will be smart, the question is not just whether you and your wife are smart. The question is whether you and your wife come from families that are generally smart. If you and your wife are both smarter than the rest of your families, unfortunately your children will probably be less smart than either of you. They’ll be closer to the average of the joint distributions, whereas you two are closer to your respective maximums.

So what’s this got to do with Australia?

Australia was a society settled from the dregs of British society. Not the absolute dregs, mind you – it didn’t take too much to get the gallows in those days, but mid-level crime like larceny or burglary might get you transported. But it’s fair to say that the convicts getting transported were likely below average for Britain at the time, like most convicts in most societies.

Suppose you take a cross-section of people from the lower end of the genetic distribution and put them in an environment with British laws and institutions. What happens next?

 The crucial part is that we’ve got people who are probably below their familial averages. But these cases get the benefit of mean reversion – if you’re dumber or more aggressively antisocial than your family average, your children will be on average smarter and less anti-social than you.

Run this forward a few generations, and you’re basically back to where you started. The convict starting point still lingers a little in terms of anti-authoritarian cultural attitudes, but that’s about it. You can take the dregs of society, but the next generation won’t be the same dregs. Thankfully. Mean reversion taketh away, but mean reversion giveth as well. So while the British who were sending convicts to Australia probably thought they were going to create a permanent colony of antisocial idiots, what they actually ended up creating was Britain #2, but with much better weather. The joke’s on them, really.

The practical punch line, of course, is that if you’re worried about how your children might turn out, pay close attention to the extended family, not just your partner. A son or daughter who’s not too bright but who has lots of doctors and lawyers and scientists in the family is still a pretty good bet.