The Daily Parker

Politics, Weather, Photography, and the Dog

No, that wasn't it at all

The test configuration earlier today wasn't the problem. It turned out that MSBuild simply didn't know it had to pull in the System.Web.Providers assembly. Fortunately, this guy suggested a way to do it. I created a new file called AssemblyInit that looks like this:

using System.Diagnostics;
using System.Web.Providers;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MyApp
{
   public class AssemblyInit
   {
      [AssemblyInitialize]
      public void Initialize()
      {
         Trace.WriteLine("Initializing System.Web.Providers");
         var dummy = new DefaultMembershipProvider();
         Trace.WriteLine(string.Format("Instantiated {0}", dummy));
      }
   }
}

That does nothing more than create a hard reference to System.Web.Providers, causing MSBuild to affirmatively import it.

Now all my CI build works, the unit tests work, and I can go have a weekend.

Could not find assembly in command-line MSTest execution

One of my tasks at my day job today is to get continuous integration running on a Jenkins server. It didn't take too long to wrestle MSBuild to the ground and get the build working properly, but when I added an MSTest task, a bunch of unit tests failed with this error:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The System.Web.Providers assembly is properly referenced in the unit test project (it's part of a NuGet package), and the assembly's Copy Local property is set to True.

When the unit tests run from inside Visual Studio 2013, they all work. When ReSharper runs them, they all work. But when I execute the command line:

MSTest.exe /resultsfile:MSTestResults.trx /testcontainer:My.Stupid.Test\bin\My.Stupid.Test.dll /test:MyFailingTest

...it fails with the error I noted above.

I'll spare you the detective work, because I have to get back to work, but I did find the solution. I marked the failing test with a DeploymentItemAttribute:

[TestMethod]
[DeploymentItem("System.Web.Providers.dll")]
public void MyFailingTest()
{
	try
	{
		DoSomeTestyThings();
	}
	finally
	{
		CleanUp();
	}
}

Now, suddenly, everything works.

And people wonder why I hate command line crap.

Day 67 of snowy hell

We still have snow on the ground, and now we've got a "hostage situation" counter up in our office about it. Sixty eight days ago, Chicago was snow-free. Since December 29th, we've worn boots every day, wiped our dogs' feet every day, squished across streets every day, and squelched down sidewalks every day.

There's a glimmer of hope. The temperature is up to -0.6°C, very nearly freezing. It might even get up to 7°C tomorrow and even stay above freezing for two days early next week.

And yet, we'll still have snow on the ground, possibly until April. Or May.

Enough already.

Chicago city council voting today to ban puppy mills

First-term Chicago City Clerk Susana Mendoza introduced an ordinance last month that would require pet stores to get dogs and cats from city pounds and shelters. The council will vote on it today:

“This ordinance cuts off the pipeline of animals coming into our city from the horrendous puppy mill industry and opens up a new opportunity for animals already in shelters who need a loving home to be adopted into,” Mendoza said.

It would, however, affect 16 businesses across the city, including Pocket Puppies in Lincoln Park, which sells small dogs at $850 to $4,000 a pup. Store owner Lane Boron said the ordinance would put him out of business or force him into the suburbs, but not curtail the operation of inhumane puppy mills.

“I opened my business, because I knew there were abuses in my business, eight years ago,” said Boron, who said he has sold puppies to celebrities and aldermen. “I wanted to make sure that my dogs were humanely sourced.”

In one of life's coincidences, I went to high school and college with Lane, and we served on the Student Judiciary Board together. I don't wish him ill, and I sympathize that the ordinance would affect his business negatively, to say the least.

That said, I fully support the ordinance. I generally oppose dog breeding, especially for designer dogs like Lane sells, when so many mutts need homes. The ordinance may not be the way to fix the problem of unwanted dogs and cats, either. But it might help.

Update: The ordinance passed 49-1.

Wow, we needed this

Just because we've had snow on the ground for 66 days (since December 29th) doesn't mean we didn't all want to see this on our morning commutes today:

We got another 50 mm overnight, on top of the piles already on the ground, and it's not forecast to get above freezing until late tomorrow.

We'd better have a cool frickin' summer or I'm going to write a very strongly-worded letter to the climate.

Update: Today is our 45th measurable snowfall this season—a new record. Yay.

The <strike>silver</strike> frozen lining to the polar vortex

It's killing invasive insects:

"This winter has been a godsend for the hemlock. Overnight temperatures dipped to minus 15 [Fahrenheit, or -26°C] here in Amherst [Massachusetts], and that’s cold enough to guarantee almost complete adelgid die-off," Joseph Elkington, a professor at the University of Massachusetts, Amherst, told the Worcester Telegram.

Elkington says that in some parts of North Carolina, subzero temperatures have killed 100 percent of the adelgids. In Massachusetts, around 80 percent of the population should die, according to a state official. Gypsy moths and emerald ash borers are similarly vulnerable to extreme cold; the U.S. Forest Service estimates that 80 percent of Minnesota’s emerald ash borers died in January. Other invasive insects, such as the southern pine beetle, which has been ravaging New Jersey, and the Asian stinkbug, may be dying off as well.

In fact, this nearly tops the reasons I like living in a temperate climate. Malaria? Not in Chicago, ever. Kudzu? Nope. Emerald ash borers? Die, you green vermin, die.

There's a problem, though:

The cold may also kill off predator insects that forest officials have been releasing to take out invasive insects. For instance, parasitoid wasps that are supposed to control the emerald ash borer population in Michigan and other states are even more vulnerable to the cold than their prey, whose populations might recover more quickly as a result.

Plus, we've had snow on the ground for 65 days now.

So it's not all perfect. But at least the cold has done something useful for us.

Morning link round-up

If I have time, I'll read these articles today:

Now, to work.

Dawn in Crimea

The sun rises in the Crimean Peninsula in just over an hour, at 6:16 local time. A rumor circulating earlier today was that Russian commanders occupying the region had threatened to attack unless the Ukrainian military surrendered by 0300 UTC this evening—20 minutes ago. The Russian navy has denied this. We'll see.

Russia, of course, has the power to take and hold the peninsula, and it seems to have support from a sizable portion of Crimean residents. But at what cost? Again, we'll see.

One thing is certain: Ukrainians are terrified. Ukrainians are in shock. But also, Ukrainians are Ukrainians, from Donetsk to Lviv.

Ask anyone we've invaded. Nothing brings a country together like an occupying army.

Must be spring

The third-worst winter in history ended (meteorologically) on Friday. And yet we woke up this morning to more snow and an overnight low of -19°C.

Even better, today I have to drive out to Suburbistan for a meeting. In the snow. Both ways. Uphill.

The meeting is in about two hours, so I guess I should get going now...

About this blog (v 4.2)

Parker, 14 weeksI'm David Braverman, this is my blog, and Parker is my 7½-year-old mutt. I last updated this About... page in September 2011, more than 1,300 posts back, so it's time for a refresh.

The Daily Parker is about:

  • Parker, my dog, whom I adopted on 1 September 2006.
  • Politics. I'm a moderate-lefty by international standards, which makes me a radical left-winger in today's United States.
  • The weather. I've operated a weather website for more than 13 years. That site deals with raw data and objective observations. Many weather posts also touch politics, given the political implications of addressing climate change, though happily we no longer have to do so under a president beholden to the oil industry.
  • Chicago (the greatest city in North America), and sometimes London, San Francisco, and the rest of the world.
  • Photography. I took tens of thousands of photos as a kid, then drifted away from making art until early 2011 when I finally got the first digital camera I've ever had whose photos were as good as film. That got me reading more, practicing more, and throwing more photos on the blog. In my initial burst of enthusiasm I posted a photo every day. I've pulled back from that a bit—it takes about 30 minutes to prep and post one of those puppies—but I'm still shooting and still learning.

I also write a lot of software, and will occasionally post about technology as well. I work for 10th Magnitude, a startup software consultancy in Chicago, I've got more than 20 years experience writing the stuff, and I continue to own a micro-sized software company. (I have an online resume, if you're curious.) I see a lot of code, and since I often get called in to projects in crisis, I see a lot of bad code, some of which may appear here.

I strive to write about these and other things with fluency and concision. "Fast, good, cheap: pick two" applies to writing as much as to any other creative process (cf: software). I hope to find an appropriate balance between the three, as streams of consciousness and literacy have always struggled against each other since the first blog twenty years ago.

If you like what you see here, you'll probably also like Andrew Sullivan, James Fallows, Josh Marshall, and Bruce Schneier. Even if you don't like my politics, you probably agree that everyone ought to read Strunk and White, and you probably have an opinion about the Oxford comma—punctuation de rigeur in my opinion.

Thanks for reading, and I hope you continue to enjoy The Daily Parker.