The Daily Parker

Politics, Weather, Photography, and the Dog

We're still arguing about this?

Geologist James Powell points out that the peer-review process keeps finding in favor of climate change:

The most obvious criticsism—that this is an argumentum ad populum—only works if you misunderstand how science works. Every scientist has an implicit incentive to prove some other scientist wrong. You can make your career in science by showing that the received wisdom doesn't fit all the evidence. So the numbers in that pie chart have to raise eyebrows, even if the eyes under them have blinders on.

Since the planet has been hotter in the past, I don't worry that global climate change will kill everyone. In fact, Chicago will probably do fine, as will the Canadian plains and much of central Asia.

The problem with the American right wing, not to mention other governments worldwide, is that by refusing to believe the climate is changing—regardless of the cause—they're refusing to take simple actions against the predictable consequences of it. Ostriches don't stick their heads in the sand in real life, because if they were to do that, they'd be killed by the things they were hiding from. Of all earth's species, only humans can look at impending doom and ignore it. Or, to put it another way:

Is it October again?

No, I don't mean "will we have to endure another six weeks of an election." I mean that Chicago today hit 17°C, not a record (22°C in 1982), but also more normal for mid-October than for the second day of meteorological winter.

Tomorrow may be warmer. The Climate Prediction Center forecasts a warm December followed by more normal temperatures through March, so we might get a good Chicago winter anyway.

Remember, though, that warm winters lead to warm summers (though not necessarily the reverse), so I sincerely hope it cools off a bit before April. I'll take a couple of frigidly-cold months in exchange for a cool summer.

Debugging our first Azure 1.8 deployment

I've just spent three hours debugging something caused by a single missing line in a configuration file.

At 10th Magnitude, we've recently upgraded our framework and reference applications to the latest Windows Azure SDK. Since I'd already done it once, it didn't take too desperately long to create the new versions of our stuff.

However, the fact that something works in an emulator does not mean it will actually work in production. So, last night, our CTO attempted to deploy the first application we built with the new stuff out to Azure. It failed.

First, all we got was a HttpException, which is what ASP.NET MVC throws when something fails on a Razor view. The offending line was this:

@{ 
   ViewBag.Title = Html.Resource("PageTitle");
}

This extension method indirectly calls our custom resource provider, cleverly obfuscated as SqlResourceProvider, which then looks up the string resource in a SQL database.

My first problem was to get to the actual exception being thrown. That required me to RDP into the running Web role, open a view (I chose About.cshtml because it was essentially empty), and replace the code above with this:

@using System.Globalization
@{
  try
  {
    var provider = new SqlResourceProvider("/Views/Home/About.cshtml");
    var title = provider.GetObject("PageTitle", CultureInfo.CurrentUICulture);
    ViewBag.Title = title;
  }
  catch (Exception ex)
  {
    ViewBag.Error = ex + Environment.NewLine + "Base:" + Environment.NewLine + ex.GetBaseException();
  }
}
<pre>@ViewBag.Error</pre>

That got me the real error stack, whose relevant lines were right at the top:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at XM.UI.ResourceProviders.ResourceCache.LogDebug(String message)

Flash forward an hour of reading and testing things. I'll spare you. The solution is to add a second binding redirect in web.config:

<dependentAssembly>
  <assemblyIdentity name="Microsoft.WindowsAzure.ServiceRuntime" 
    publicKeyToken="31bf3856ad364e35" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.0.0.0" />
  <bindingRedirect oldVersion="1.1.0.0-1.8.0.0" newVersion="1.8.0.0" />
</dependentAssembly>

Notice the second line? That tells .NET to refer all requests for the service runtime to the 1.8 version.

Also, in the Web application, you have to set the assembly references for Microsoft.WindowsAzure.Configuration and Microsoft.WindowsAzure.Storage to avoid using specific versions. In Solution Explorer, under the References folder for the web app, find the assemblies in question, view Properties, and set Specific Version to false.

I hope I have saved you three hours of your life. I will now go back to my deployment, already in progress...

Update, an hour and a half later: It turns out, there's a difference in behavior between <compilation debug="true"> and <compilation> on Azure Guest OS 3 (Windows Server 2012) that did not exist in previous guest OS versions. When an application is in debug mode on Azure Guest OS 3, it ignores some errors. Specifically, it ignores the FileNotFoundException thrown when Bundle.JavaScript().Add() has the wrong version number for the script it's trying to add. In Release mode, it just barfs up a 500 response. That is maddening—especially when you're trying to debug something else. At least it let our app log the error, eventually.

French court ends Concorde lawsuit

A French appeals court has ruled that neither Continental nor mechanic John Taylor bears criminal responsibility for the 2000 Air France Concorde crash outside Paris:

According to the original ruling, mechanic John Taylor fitted the wrong metal strip on a Continental DC-10. The piece ultimately fell off on the runway in Paris, puncturing the Concorde's tire. The burst tire sent bits of rubber flying, puncturing the fuel tanks, which started the fire that brought down the plane.

On Thursday, Judge Michele Luga overturned the 2010 manslaughter conviction of Continental and the mechanic, saying their mistakes didn't make them criminally responsible for the deaths.

Even if Taylor knew that the metal strip could become detached, "he could never have imagined a scenario where this simple titanium blade could cause such a disaster," Luga said in court.

The French court that convicted Continental and the mechanic in 2010 for the crash imposed about €2 m in damages and fines on the carrier. The appeals court upheld Continental's civil responsibility and ordered it to pay Air France €1 m in damages and interests.

I'm not sure I understand how the trial court came to convict Taylor in the first place. One small piece of debris on a runway should not cause a transport-class airplane to burst into flames. I don't know enough about French law to speculate about the trial judge, however. I do know that in the French system the trial judge has a much more active role than in the Anglo-American system, and can even act as prosecutor.

Anyway, this has to be a relief for Taylor, and for United Continental. It also marks the end of the Concorde's story.

Stuff to read later

Yes, another link round-up:

Back to designing software...

Document disposal mishap in New York

Via Bruce Schneier, apparently some of the confetti thrown at the Macy's Thanksgiving Day Parade last weekend came from the Nassau County Police:

A closer look shows that the documents are from the Nassau County Police Department. The papers were shredded, but clearly not well enough.

They even contain information about Mitt Romney's motorcade, apparently from the final presidential debate, which took place at Hofstra University in Nassau County last month.

Most significant, the confetti strips identified Nassau County detectives by name. Some of them are apparently undercover. Their social security numbers, dates of birth and other highly sensitive personal information was also printed on the confetti strips.

I expect the follow-up story to describe how a document destruction company now faces a massive lawsuit...

Build, buy, or rent?

10th Magnitude's CTO, Steve Harshbarger, explains how the cloud makes economics better by giving us more options:

We know we could build every feature of a custom application from the ground up. We get ultimate control of the result, but often the cost or timeframe to do so is prohibitive. So as developers, we look to incorporate pre-built components to speed things along. Not only that, we strive for better functionality by incorporating specialized components that others have already invested far more resources in than we ever could for a single application. As a simple example, who would ever write a graphing engine from scratch with so many great ones out there? So, build is rarely the whole story.

What about buy? I think of “buy” not in a strict monetary sense, but as a moniker for code or components that get pulled into the physical boundary of your application. This includes both open source components and commercial products, in the form of source code you pull into your project, or binaries you install and run with your applications’ infrastructure. We all do this all the time.

But the cloud brings a third option to the table: rent. I define this as a service you integrate with via some API, which runs outside your application’s physical boundary. This is where smart developers see an opportunity to shave more time and cost off of projects while maintaining—or even increasing—the quality of functionality.

He also lists our top-10 third-party "rental" services, including Postmark, Pingdom, and Arrow Payments. (I'm using a couple of them as well.)

Illinois ban on taping police is unconstitutional

Just now:

The Supreme Court has rejected an appeal from the Cook County state's attorney to allow enforcement of a law prohibiting people from recording police officers on the job.

The justices on Monday left in place a lower court ruling that found that the state's anti-eavesdropping law violates free speech rights when used against people who tape law enforcement officers.

The law set out a maximum prison term of 15 years.

Last May, a federal appeals court in Chicago ruled that the law “likely violates” the First Amendment and ordered that authorities be banned from enforcing it.

Good. Since it only takes four justices to grant certiorari, this means that at least six of them agreed with the 7th Circuit. It was a bad law, and shame on Anita Alvarez for attempting prosecutions based on it.

New variety of northern bear?

Via Sullivan, a new variety of bear has appeared in Canada because of climate change:

One such sign [of environmental pressure on bears] is the emergence of a new creature in the polar bear’s range, first spotted in the wild in 2006 near Sachs Harbour, Northwest Territories. It’s got a long neck like a polar bear, but it’s smaller. It lies and behaves like a polar bear, but it has shoulder humps. The new creature has hairy paw soles like a polar bear, but its hair is mostly solid, with only patches of hollow hair.

As caribou migration routes have moved North, grizzlies have followed and started mating with polar bears. Not only have they produced hybrid young, but those young are fertile. Polar bears and grizzlies only diverged about 150,000 years ago and haven’t developed many genetic differences, despite quite dramatic visual dissimilarities. Second-generation hybrids have now been confirmed in the wild.

This kind of thing isn't new, but we don't often see it with large predators. On the other hand, about 30,000 years ago, another large predator moved into a cousin species' territory as the earth warmed up, and interbred, and went on to invent blogs.