In which I fix a really odd problem

29 04 2008

There’s this old story about a guy who comes to fix a problem. Spends a day looking at the widget, does something to it and sends a huge bill over to the widget’s owner. Said owner protests, saying “the fix cost $1 – please justify the rest of it”. The guy replies, “$1: fix. $ObsceneAmount – $1: knowing what to fix”.

That anecdote has real implications for Apple and the free software movement and Linux in particular.

For example, today I took a look at a Vista laptop that was bluescreening intermittently. Every few sleeps (not every sleep, nor every fixed x number of sleeps), it would start and immediately crash. And the question is, why?

Here are the steps I followed:

  1. Look at the log. Find out what the exact crash number was: 0x0000009F.
  2. Look at the Internet. Determine that 0x0000009F is a driver crash. So, it looks like a driver that’s not suspending properly.
  3. Look at the reliability monitor. What was installed about the time the first crash started happening? Interesting – no driver installs.
  4. Some more digging around logs shows the Realtek ethernet driver is crashing just as the machine is going into sleep.
  5. What? The laptop is connected via the Broadcom WiFi driver.
  6. Go back to the log to see when the driver was last updated. Nothing – still the original Vista driver for it.
  7. But what is this? “ZoneAlarm Free”?
  8. AHA!
  9. Fix it by installing a patch.

Total time needed to fix: 10 minutes. Maybe less.

Right now you’re thinking: ZoneAlarm? That firewall program that runs just fine on the XP machine sitting next door?

Of course, this requires some explanation … and some arcane knowledge of Windows. It’s probably pretty clear to you that ZoneAlarm works by getting in between the user side and hardware side of transmitting and receiving stuff from networks. Exactly where doesn’t really matter in this case. However, this was updated for Vista, wasn’t it? This is the Vista version, so the changes in the networking design were accounted for!

However (and this is the bit of arcane knowledge you need to know to make the connection between ZoneAlarm and a blue screen), one major, non-networking change was made to Vista. You may recall setting a XP machine to go to sleep, or telling it restart, or ordering it to shut down, and coming back x units of time later and finding that Word or Notepad or Paint was waiting for a response, so the XP machine hadn’t done what it was told. What Microsoft did was build in a maximum time that Vista would wait for an application to respond to such a request to sleep, restart or shutdown. Then it would simply terminate the program or freeze the contents of the memory.

And now you see what is happening: ZoneAlarm, like every well-designed program, unhooks itself from the networking stack when it receives such a request. It’s wise and I wish more programs did so: get out of the way when the OS is doing something ridiculously complicated like suspending dozens of devices and hundreds of programs and preparing the computer to start right back up again. The problem is, when such a thing is happening, there’s a lot to do – and a lot depends on random factors like when was the last message from the network connection, where the computer is writing stuff to the disk and so on. So if ZoneAlarm was waiting for the final “goodbye” message from the router and it arrived after Vista had decided time was up, the computer suspended with ZoneAlarm still hooked into the network stack. Not good.

Thus why it was so random: sometimes the wireless router responded in time, sometimes not. And depending on when the reply arrived late, the network driver would crash and messily take the rest of the system with it.

Now there are good arguments that the network driver should be protected from doing something like corrupting the core of the OS – and there is a great deal of isolation already – but sometimes, crap happens. The question is how do you learn to fix it?

And so now you see the problem with Mac OS or Linux: if something similar happened in either of those operating systems, besides searching the Internet in the hopes of an answer, I would have NEVER figured out a firewall was causing the computer to crash when it was resuming. To me, it would have smelled of a bad driver or bad hardware – exactly what happened here.

Thus even though power users are by nature the ones most fascinated by other operating systems (I have a Wubi installation of Ubuntu on this very Windows machine, and an Apple Mac Mini), they are also the ones with the most to loose: all those years of knowledge gathering about the internals of Windows, obscure settings and arcane know-how all goes to waste. There’s no way to get around it.

So if Mac OS or Linux want to be successful, then they have to get people early, before they go down the Windows path. Even if Windows users are willing to unlearn the Windows way of doing things, as I am, it takes a long time to rebuild a knowledge base to fix things that go wrong. Since things will always go wrong, and people will always build up such a base, consciously or unconsciously, the only alternative is an early catch so people don’t get frustrated their knowledge is going to waste.

In the meantime, I look forward to another crash free Windows laptop.



Wow this is weird

27 04 2008

So today while trolling on Facebook, I suddenly discovered two people I vaguely knew from High School (family friends’ kids) were getting hitched. And looking through the wall, I found lots of names of people that I barely remember.

Anyway, the weirdest thing of all, of course, is that I now can’t remember familial structures at all. So I keep thinking person A and person C are siblings, when in fact, A and B are siblings, and C was in a totally different family.

Talking with a buddy from HS later on, I’ve realized I really made an effort to get away from the people I knew back then. Not entirely unexpected, but still a shocking realization that I can count on two hands the people from school that I still do (or want to) talk to.



Secure networks

24 04 2008

I hear all of these Internet scare stories about how infected computers are everywhere, and how thousands (hundreds of thousands?) of people are infected with malware everyday, but I honestly didn’t think I’d run into a zombie.

Until today.

I ended up on an unsecure wireless network and a few moments after I logged into Google Talk, up popped a message from a friend – let’s call him Mr P – asking me to download a file. Now Mr P here is one of the most reliable human beings on the planet and coupled with his technological brilliance, the chances of it being malware is close to none. So I clicked on it, only to have my firewall block the connection to the website, and my download manager refuse to download it as it was “known malware”.

Intriguing.

So Mr P spent some time checking the state of his computer – it’s hypothetically possible that his computer got infected – and came up nil. So I checked mine, and also came up nil. Weird.

However, when I started up Ethereal to sniff around the local network, sure enough – there was one computer running amok with outbound requests to everyone and everything.

For the first time, it seems that I have been the subject of a man-in-the-middle attack. Which is crazy.

Of course, if my paranoia was not great enough already, it has simply increased now, and I’m not sure how to resolve it. I’ve long considered establishing either a darknet to enable truly difficult to break into conversations, or setting up an SSH tunnel to handle all inbound and outbound traffic – though that means opening up more ports on the home network, which, as you can imagine, I am reluctant to do.

Would you all consider joining a communications darknet, like WASTE, to talk in relative security and assurance that there was no man-in-the-middle attack?



Look who’s coming to lunch.

22 04 2008

If there is a single company in the world whose leaders should be dragged out and shot, it would be the Monsanto Corporation. So guess who is coming to town for a seminar:

A confluence of global economics, climate change and increased demand for biofuels reminds us that agricultural development is fundamental to humanity. Monsanto is one of several companies investing in agricultural technologies that promote yield and help farmers conserve natural resources.


Monsanto’s research and development pipeline continues to deliver significant benefits to farmers in countries with functional, science-based regulatory systems, but the effort to transfer biotech crops to poor countries is also under way. In March 2008, the African Agricultural Technology Foundation (AATF) announced a public-private partnership in a project called Water Efficient Maize for Africa (WEMA). Citing climate change as a factor that will exacerbate crop failure caused by drought, the initiative seeks to apply drought-resistant biotech traits developed by Monsanto with publicly developed corn hybrids and varieties bred for specific regions in Africa.


Monsanto is an agricultural company that invests $2 million a day to create innovative technologies that help farmers feed, clothe and fuel a growing world. Monsanto uses the tools of modern biotechnology to develop crops that increase farmers’ yields while conserving water, land and energy.


Fourth of this year’s biotechnology seminar series aiming to provide World Bank staff the opportunity to become acquainted with the opportunities, challenges and potential risks surrounding the  deployment of biotechnology in developing countries through diverse experts and perspectives.

Where should I begin with my Monsanto criticism? Should I just leave it all up to you? But boy am I going to go just too pick a fight. This is too excellent an opportunity to pass up. Now, if only I could get into the room that they’ve picked – nice and small, so there can’t be too much of a riot.

(Sorry it was unreadable – Lotus Notes does not export good text.)



Climate change, part 1

21 04 2008

Climate change has been something of an interesting topic here at work for the last few weeks. It’s also spawned a lot of pretty interesting panels and I wanted to take a moment to talk about two that I’ve been to dealing with modeling extremely low probability, extremely high cost events. I’ll post another part in a few days about a couple of conversations I had, based in part on ideas that I’ve been spinning around in my head for a good while.

The first panel starred Marty Weitzman from Harvard, discussing the problem of probability functions. His paper on modeling climate catastrophe discussed the fact that many of the standard climate change modeling exercises used the normal curve as a decent approximation of the chance of a climate catastrophe. His work, however, suggests that: (a) this may not be the appropriate curve to use, given existing empirical data that says catastrophes are becoming more frequent and more costly; and, thus (b) we should use a different curve – such as the Student’s T with far fewer degrees of freedom. The unfortunate consequence is that events at the long end of the tail that earlier had nil probability (and thus zero expected cost) suddenly balloon into infinite expected costs.

Richard Posner was the first to comment on the paper, discussing discount rates more generally referring to his catastrophe book‘s findings. The Judge quibbled slightly with the figures that Weitzman used in his paper, but generally agreed with the findings of the paper. (I later went and talked to him for about 30 minutes about his book, and discovered there was no funding for near-Earth asteroid detection, because it was not politically sexy to do so – so if you all want to deflect a potential Earth-colliding object, you’re on your own.)

John Seo from Fermat Capital was up next, trying to bring a private sector perspective to it. His concern with the paper was that one of Marty’s assumptions (I believe it was choice in the degrees of freedom, but I don’t exactly remember) was essentially a judgment call, and so you could turn the infinite expected cost into zero by flipping a coin and choosing a different assumption. While valid criticism, I agree with Weitzman that he missed the point of the paper, which was that long tail is fatter than people believe, regardless of the exact distribution used. That’s not to say Seo disagreed per se – he is in the business of cat bonds, after all – but he did raise valid technical questions about which curve best approximates past and present catastrophes. I also talked to John twice – which I’ll discuss in another post -

Finally, a very worried looking Tom Schelling applied Marty’s paper to other possible disaster scenarios, and how to best allocate resources to adaptation and mitigation. Schelling brought up the dismal conclusion that if  we’ve got discount rates wrong as implied by Marty’s paper, it’s possible that future populations will be relatively poorer than us and thus less able to deal with climate change than the current generation. That really throws a spanner in the works of current climate change mitigation and adaptation plans, which do defray costs to the future. What’s worrying about Schelling’s interpretation is that Marty looked at the worst-case scenarios in his paper and presentation, and already, we’re seeing worse than worst case scenarios playing out. For example, even as recently as January 2007, the soonest the IPCC was expecting an ice-free Arctic was the 2040s-2050s. However, as the geopolitical maneuvering of last summer showed, the Arctic is likely to be ice-free not in the next half-century, but in the next decade! Or, closer to home for me, the Indian summer monsoon, which was not expected to collapse for the next two decades is expected to see its final downpour this year, with calamitous effects on agriculture in South Asia. (And yes, I’m surprised I could end that terrifying statement with a period and not an exclamation point.)

The second panel some weeks later starred Ken Arrow beefing up some of Tom Schelling’s points about wrong estimations in our current intertemporal utility and cost curves. Arrow took a much more mathematical approach to the problem, deriving the utility and cost curves from first principles, which was perhaps a little more technical than the audience had hoped for. Working through the cost curve was fascinating to me, because it became pretty clear that given our current modeling inadequacies at any point of time beyond a two or three year horizon, civilization could end. At any rate, his work really hammered home the point that if there is a time for action on climate change, it is now, because it’s not clear what will happen even in the next decade.

I’m not entirely sure what Tom Schelling’s comments were – I can’t seem to find the notes – but I have a vague recollection of his talking about some of Arrow’s other work, and how a catastrophe would affect a general equilibrium state. Surprisingly, I found John Seo sitting in the front row as well, and I approached him to talk further about something I had raised earlier. I’ll write more about that later.

So some takeaways from these two panels:

  1. Our models of catastrophic climate change are, broadly speaking, underestimating expected costs of climate change.
  2. This is because our models have all assumed that the long tail is a relatively thin tail – which empirically, it does not appear to be.
  3. Given this, it’s urgent to start work on climate change mitigation and adaptation now as opposed to later, because we don’t know in what shape society will be. This is particularly true of future resource constraints, which may in fact be tighter than current ones.

Next part, I’ll discuss what I talked to John Seo about, which is something that makes sense to me, and something I wish I could do the math out for, but can’t since I don’t have a good enough model.



Like an antique car starting up

20 04 2008

One of the more irritating things that has happened of late is that my laptop’s fan seems to have rattled loose and now sounds like a baby rattle.

I’m going to have to disassemble it and find out which screw has rattled loose. Pretty annoying.



Erminig: a piece of crap

20 04 2008

A friend pinged me about a month ago to tell me that there was a new version of Erminig out. Erminig, if you remember, is the program that ostensibly offers the ability to two-way sync calendars between Google Calendar and the N800′s GPE Calendar.

I got around to trying it today, and miracles of miracles – it worked!

Or so I thought.

The program is a vexation of the spirit.

Erminig crashed the first time trying to sync entries. Rather than write a log entry noting that it had crashed, or checking for identical entries (god forbid a programmer should write error checking into a program), it wrote every single entry in the local GPE calendar back to Google Calendar.

So for every single event in my Google Calendar, I now have two entries. Naturally, this will in time populate to all of my calendars, and I will have to manually delete events from now till infinity.

So, if you can takeaway two lessons from my misfortune:

  1. Erminig is junk and do not, under any circumstances, allow it to run on your calendar.
  2. Never trust an application – especially a FOSS one – with any critical data, unless it has been thoroughly vetted by someone else reputable.

Now I look forward to months of doubled notifications and doubled alarms and days weeks months years of going through my calendar removing the double entries. Thank you so much, TahitiBob for your unhelpful craptastic program!

I might as well toss my calendar out and start afresh.



Stupid Windows Vista

18 04 2008

There’s a room on the 2nd floor of work that I like going to because the place is pretty quiet most of the time, and chairs are the most comfortable I’ve ever found. The chairs also have these nice tables attached them, so I can work in peace in quiet without needing to take up a table. A diagram – not to scale – is below.

Diagram not to scale...

Now the problem is Windows Vista’s All New! Improved! Not BSD-Based! networking stack, which is, quite frankly, a piece of crap. Or it may be the networking drivers, but given that every single person who uses Vista has had issues here, and not a single person using XP has, I suspect the networking stack.

Anyway, if I sit near Wireless Access Point A, then I cannot get connected. Vista absolutely refuses to talk to the Access Point. No amount of disconnecting, reconnecting, getting a new IP address or restarting will get me a functioning connection. It simply does not work.

If I sit near Access Point B, though, all I need to do is connect – and I emphasize the fact that having to do so is ridiculous – and refresh my IP address. And then it works.

But the fact that I have to get a new IP address since the overeager Vista networking stack insists on assigning a self-assigned 169.x.y.z IP address is beyond ridiculous. To add insult to injury, where earlier in XP this was four clicks – right click tray icon, Properties, Details tab, Repair – Vista requires eight steps:

  1. Click on the networking icon.
  2. Click on Connect or Disconnect.
  3. Find the wireless connection.
  4. Right click.
  5. Click Diagnose.
  6. Read verbose text to determine which (non-existent) button you need to press.
  7. Click on said (non-existent) button.
  8. Click Continue on the always unhelpful UAC.

The mind boggles at the notion of a more unhelpful, more asinine, more stupid operating system.

Which, of course, will be Windows 7, of course.

Bonus - Today when I tried to connect to my home network, I found that I was forced to refresh my IP address.

Bonus 2 – Go here to read more on the sad state of the Shut Down button.



Just in time!

18 04 2008

Boy am I glad I got out of there just in time.

At least half the debates I had with teachers were fueled by finding things on the internet that were contradictory to what they were saying. Especially true in my law classes.



Quick Roundup

17 04 2008

There were lots of things that happened, and I could write tomes on each, but let’s do a quick roundup in the interests of speed and coherence:

  1. I was forced to change my Xbox Live Gamertag, because my name was either: (a) offensive; or, (b) a security risk. So if you don’t see me on Xbox Live anymore, and see some dude named “MixedStrategy” that you’ve suddenly befriended, that would be me. Personally, I wanted to be “GrimTrigger“, but that was apparently taken. Gah.
  2. I’ve been learning how to program in Lotus Notes of late for work. Far from being an irritating VBA-type script that I feared, it’s actually pretty powerful and probably a lot more extensible a tool for RAD-ing a quick solution of some sort or another. Particularly when your company has most of its data stuck in Lotus Notes to begin with – then it’s especially useful. The only really annoying thing I’ve discovered so far is that someone at IBM made the mistake of letting a marketing type get near the Notes 8 interface, so I’ve spent a lot of time learning new terminology for things. My project is interesting because essentially, Notes supports a lot of database-like operations, but one major shortcoming is the lack of an equivalent to the SQL “UPDATE” statement. And given the retention policies at work, to update, say, the date of a task manager’s meeting, you have to reload all 5,000+ projects into the database. Not good, if I may say so myself. So I’m writing a little script to handle that. It’s pretty interesting work, but it’s taking longer than I had hoped.
  3. I came across this link today, explaining how to get around one of the more annoying problems with feed reading. Unfortunately, it does not work quite as I had hoped, so I’m still stuck visiting LiveJournal.com and other sites once every couple of months.
  4. Facebook launched “Chat” on my network. On the plus side, it’s pretty well integrated and doesn’t quite get in your way like I had feared – even Gmail’s Google Talk client sometimes does. On the minus side, it doesn’t allow you to connect using a non-web or different interface. I’m surprised, since I thought the back-end was all Jabber. I suppose it won’t be too long before someone writes a Facebook application to talk to the client… maybe it already exists!
  5. Raymond Chen is one of Microsoft’s longtime developers, and someone whose blog I read daily. So I wanted to point out three really good books that he likes, and just wanted to add that even if you’re not a developer of any sort, or have anything to do with engineering, The Design of Everyday Things (née The Psychology of Everyday Things) is amazing. Just the number of annoying things that I’ve faced in the world makes me appreciate how stupid unintuitive things can get design awards. Until you have to use it, things seem elegant. Then not so much. (Bonus example: the Windows standard key to insert a hyperlink is Ctrl+K. The developers of WordPress 2.5 decided to arbitrarily remap that to Alt+Shift+A, so now my muscle memory is wrong, and it’s an extra key stroke. Annoying. Will be changed soon.)
  6. My kitten cat turned 1 year old on Friday last week. That marks the milestone where he stops being a kitten and becomes a cat. Wow. They really do grow up quick!
  7. I went to a Library of Congress concert that I’ll write more about. But in case Europa Galante is performing in a house near you, I strongly urge you go see it. I’m not usually a fan of Vivaldi, but this may change my mind yet. And bonus points for anyone who plays Gluck and Telemann in the same concert!
  8. I’ve found someone else who is working on a Lego Mindstorms NXT biped walker similar to mine. I will have to take a good look at it, but it seems to solve the issue I’ve been having with the stability of the walker – mine has a Star Wars-like tendency to flip over on one side.
  9. The weather is bright and sunny and 24 degrees! That’s today. Yesterday it was cold and overcast and -1 degrees. I love how these new wild swings in weather are now considered normal. Hey, maybe I can write a book about climate changed called “The New Normal” with an appropriately long subtitle… maybe something like “Evidence You Can See of Climate Change”.
  10. And finally, if you’re in the UK and feeling nice, could you please buy me the latest Goldfrapp single, Happiness, and mail it to me?

Good night!