Asperger @ Microsoft

Back in September, Wesner described what it’s like to have Asperger’s. Today NYT is reporting on Asperger’s, and features a Microsoft employee. The main characteristic of Asperger’s is a lack of empathy. I tend to have the opposite problem (and it is a problem), so I have thought a lot about the general idea of empathy. Empathy is definitely a variable. I’m fascinated by people who do not have empathy, and am convinced that the condition in some people is deliberate, while in others it is ?built-in?.

The NYT article discusses ?educating? Asperger’s people about social interaction. This is silly. Asperger’s people are very good learners, and you can see that Wesner gets a perfect score on ?Emotional Intelligence? test. Empathy requires attention to detail, which Asperger’s has, and I suspect that it would be very rewarding to teach Asperger’s people to intellectually calibrate other people’s frames. But empathy requires one additional step — from intellectually recognizing the frame to actually experiencing it. This?see-feel? circuit (as described by Bandler and Grinder) is the unconscious feedback loop (or mirror)that permits us to respond to social situations in realtime. These are specialized circuits in the brain, far beyond conscious intellect. I do not believe these things can be ?taught? in a conscious manner.

There are probably significant elements of biology (serotonin perhaps) as well as learning in here. I’ve recently been fascinated by neurofeedback and the promise it holds for ?training? the mind to normalize certain spectrum disorders, and obviously psychopharmacology has made significant contributions to normalizing related disorders (and it seems now SSRIs have been used for Asperger’s).

And although I cannot prove it, I believe that many Asperger’s cases are, paradoxically,seen in children who begin with highly amplified empathy. Early on, the child lacks the ability to dissociateherself from strong external emotional events, and so the see-feel circuits are overwhelmed in a traumatic event (which would probably not be traumatic at all for a child with less refined and amplified circuits) and are?blown out? in defense. So I think some Asperger’s could be similar to a phobia, and could suggest some treatments.

And finally, I am not sure that Asperger’s should be treated as a ?disease? even to the extent that things like OCD are. The example of the Microsoft guy in the NYT article sounds a lot like many computer people I know — and this is not necessarily a bad thing. NYT pitches it as a lack of tact and diplomacy, but you could also think of it as a lack of duplicity. The anecdote they use to demonstrate the horror of Asperger’s is of a staff meeting where a subordinate gives negative feedback to a manager two levels up. In a company that prides itself on ?bad news travels fast?, this is not such a bad thing. Better that than a dissembler; especially when time is short and you need to get to the bottom of an issue. Of course, it’s always better to give ?constructive? feedback offline, but suchbehavior can be taught. And a direct, honest manneris something that is sometimes hard to teach ?normal? people.Normal people often get caught up in emotions that impair reason. On balance, I wouldn’t want to have Asperger’s, but I also think it’s not a disability without advantages.

OPML import for OneNote

If you have OneNote 1.1 preview installed, you can now import OPML outlines. I use an outliner all the time, and although I am not switching to OneNote as my outliner, it is nice to be able to copy my OPML outlines into OneNote. I used Andrew May’s directions (with Donovan’s help) to write a simple importer.

The source and executable are located here. Just unzip it, and double-click on OneNoteOPML.exe (in the Debug directory). It’s provided ?as is?. You can modify however you like. It’s not necessarily production code, but it works well for me.

It always creates a new page, and imports the outline to the new page. You can copy and paste from there. It handles comments and hyperlinks. I still haven’t found how to import with certain nodes collapsed, so the whole outline is expanded when you import.

Annotea + OPML + FOAF

Danny Ayers has keyed in to the potential intersection between blogs and annotation services. The idea of having related blog entries available passively while browsing is a fantastic one. This is one of those awesome ?semantic web? ideas that would be relatively trivial to implement, along the same lines as the idea. Part of the power of both ideas is the realization that much metadata is implicit in our day-to-day activities and need not be maintained manually.

One of the more powerful ideas is that of implicit ?social networks?, in this case based on blog subscriptions, linkage, and so on. This is one of the concepts that Steve Gillmor has been pushing for awhile; note how he evangelizes to Google’s Sergey Brin in this interview.

Defining the Game

Miguel debunks one of the common myths about why Microsoft succeeds. He explains that the real danger to Linux from Longhornis in the complete package; not because we ?define the game?: ?They are all fine points of view, but what makes Longhorn dangerous for the viability of Linux on the desktop is that the combination of Microsoft deployment power, XAML, Avalon and .NET is killer.? (I would just add that WinFS is another critical piece of the integrated package). The concept is simple. Provide a suite of smoothly integrated capabilities that serve to raise people’s expectations. Raising expectations is now the only way to reduce the risk that people will consider Linux to be ?good enough?. It’s not a sure thing;it’s a huge task with lots of risk.

His analysis is really interesting, as is the discussion of Linux’s options.From my perspective, Longhorn is a ?bet the company? response to fend off the threat of Linux; so it’s kind of strange to see Longhorn portrayed as a danger to Linux (well, it makes sense, but it’s like looking in a mirror – Linux is the aggressor here).

Google: Trust Us

Evan is responding to the comments about Google’s exclusionary weblog crawler. Basically, he admits that he has no clue what’s going on, since he’s not in the loop, but then tries (very weakly) to defend Google’s behavior. As if the deliberate RSS breakage and cease-and-desist letters were not enough to make Google’s intentions perfectly clear.

Personally, I paid little attention to the latest exclusionary behavior from Google, because I think it is futile anyway, much like the early transgressions. Too much of the world’s content is in RSS now. They would ignore it at their own loss, and they are not crazy. Giving away webmail storage at break-even to hurt Yahoo and Hotmail is crazy like a fox; ignoring RSS is just plain crazy.

Cartoon Family

Jianshuo just reviewed Home Style+, and I had to try it for myself. Unfortunately, it appears to be available only in Japan. After coaxing it to install on my US version of Windows XP, I made some cartoons. It seems that the tool is very specialized for Asian features. I took multiple pictures of myself with digital camera and tried tuning the settings to emphasize my Caucasian features, but the cartoon below was the closest I was able to get. The cartoons of my wife and daughter worked out better, with no tweaking. You probably could not recognize any of us on the street based on these cartoons, but it’s still pretty cool. I want a US version of this program!

Loopy Decisions

Developers love ?rulesof thumb? for perf; especially if a rule is somewhat nonobvious and can be used to show how elite one is. A rule is accepted as fact, so a developer can simply match the situation to the rule and then stop thinking further.

So, what could be simpler than looping through an array of integers in C#? Which way would you do the loop?

  1. foreach (int i in foo) {}
  2. for (int i = 0; i < foo.Length; i++) {}
  3. int len = foo.Length; for (int i = 0; i < len; i++) {}

Eric Gunnerson works on the C# team and is a certified expert. He decides that option 1 is the best. Joe Duffy sets up a perf harness and decides that option 1 is best. Kevin Ransom analyzed the IL directly and decided that one and two are basically identical. Justin Rogers has his own comments on how the JIT optimizes these loops, in response to a discussion about the issue on Brad Abrams blog.

Now we have a bunch of people running around very exited at their newfound enlightenment and preaching the virtues of whichever ?rule? they happened to read on a blog. The flurry of dissasembly and ?hard facts? in the posts make each decision seem impervious to criticism.

Unfortunately, they’re all wrong.

First, when I disassembled these three options myself, I found that option 3 was more efficient than 2 by two instructions (in the loop), and 2 was more efficient than 1 by an additional two instructions (in the loop). This differs with what other people have posted, which is a result of other people writing the code differently than I did(I just compiled the exact loops I wrote above). None are different enough to warrant a change in coding style, and asking people to code things differently based on a very arguable ILDASM over a contrived example is not smart. Furthermore, depending on what sort of collection is being used, the semantics of the three examples can be different.

There are two ?rules? I would like to propose:

  • Don’t be too clever. Writing loop 3 just because you think it will be faster is too clever. Avoiding loop 3 just because ?the JIT can’t optimize it? is also trying to fool the compiler. Just write the code that does what you want.
  • Measure perf specific to your scenario. Measure it yourself.

Here is my IL:

Loop 1

IL_000e: ldloc.2
IL_000f: ldloc.3
IL_0010: ldelem.i4
IL_0011: stloc.1
IL_0012: ldloc.1
IL_0013: call void [mscorlib]System.Console::WriteLine(int32)
IL_0018: ldloc.3
// load index of ‘current’
IL_0019: ldc.i4.1
// will increment by one
IL_001a: add // do the increment
IL_001b: stloc.3 // store back the index of ‘current’
IL_001c: ldloc.3 // load index of ‘current’ again
IL_001d: ldloc.2
// we want the length of a particular array
IL_001e: ldlen
// get the length
IL_001f: conv.i4 // convert it to int
IL_0020: blt.s IL_000e // compare and branch

Loop 2

IL_000c: ldloc.0
IL_000d: ldloc.1
IL_000e: ldelem.i4
IL_000f: call void [mscorlib]System.Console::WriteLine(int32)
IL_0014: ldloc.1
// get i

IL_0015: ldc.i4.1
// increment by 1
IL_0016: add
// do the increment
IL_0017: stloc.1
// store the new value for i
IL_0018: ldloc.1 // get i again
ldloc.0 //we wantlength for a particular array
IL_001a: ldlen // get length of that array
IL_001b: conv.i4 // convert to int
IL_001c: blt.s IL_000c
// compare and branch

Loop 3

IL_0010: ldloc.0
IL_0011: ldloc.2
IL_0012: ldelem.i4
IL_0013: call void [mscorlib]System.Console::WriteLine(int32)
IL_0018: ldloc.2
// get i
IL_0019: ldc.i4.1 //increment by one
IL_001a: add //do the increment
IL_001b: stloc.2 // storethe new value for i

IL_001c: ldloc.2 // get i again
IL_001d: ldloc.1 // get len
IL_001e: blt.s IL_0010
// compare and branch

China Traffic Deaths

[Marginal Revolution] Every day, 300 people die in traffic accidents in China. While this is the highest rate of traffic deaths in the world, it is remarkably low when all things are considered. Admittedly, the traffic in China is horrendous, and nobody pays attention to traffic signals; but that is not really the issue. You see, in China it is quite common for pedestrians to be on the freeways. I have seen literally hundreds of instances of old ladies standing in the midst if traffic with their bicycles, having conversations. Nobody wears reflective clothing, bicycles do not have lights or reflectors. And old ladies holding conference in the middle of the road are the least of the road hazards you have to worry about. These are things that westerners are not expecting to find in the road. Mark my words: if westerners are permitted to rent cars during the 2008 Olympics, the carnage will be terrible. I’m dead serious; there is no way that westerners will be able to avoid running over people accidentally. My mother-in-law, who is from Beijing, is a perfect example of why this is the case. She wanted to take a stroll on the freeway here, and we had to explain that she would get run over. She was very indignant. ?Why are Americans so mean? Doesn’t the freeway belong to everyone?? We had to explain that the drivers who would run her over would probably be very nice people; they simply would not be expecting to find an old Chinese woman standing in the middle of the road. With our fast food and cellphones, we are less adept at swerving around the pedestrians.

The trouble with bcc

Every couple of months, mayhem erupts on one of the internal mailing lists regarding the use of blind carbon copy (bcc) in e-mails. The process begins like this:

  • A long thread with arguable relevance to the majority of list participants begins
  • Someone decides that the discussion is not interesting, and replies to the message with the original mailing list on bcc, and a comment like ?bcc’ing list; take this offlist?
  • The bcc defeats e-mail filters which look at the ‘to’ field, so that mail which was probably filtered to a sorted folder ends up in the inbox for many people
  • Someone gets annoyed by the messages in their inbox, and spams the whole mailing list with an impassioned plea to ?please stop the bcc; it clutters my inbox!?

Invariably, many solutions are proffered which fit the category of ?if everyone in the world behaved exactly like me, these things wouldn’t happen!?

Here are the options:

  1. Make everyone stop using bcc to large distribution lists.
    • Make a personal appeal. Explain that it’s rude to cut off conversation. Explain that bcc ruins inboxes and complicates lives.
    • Show them a better way. Tell them to reply using IRM, or the ?prevent reply all? trick, instead of being rude.
  2. Make yourself immune to bcc floods
    • Configure your filtering rules properly so that all bcc (and some spam) goes to a ‘junk’ folder
      • Rule 1: mail addressed directly to you goes to inbox, stop processing more rules
      • Rule 2+: mail addressed to particular addresses, etc. gets filed in appropriate folders, stop processing more rules
      • Last Rule: remaining mail goes to ‘junk’ folder

Option ‘2’ is not good if you enjoy getting normal bcc e-mail in your inbox, but it’s your best defense if you’re on a lot of distribution lists.