My brother-in-law posted a note on Facebook that was basically one of those silly things you do and perpetuate across the internet. I usually don’t take part in such things, but this one seemed interesting, and I’ve been thinking about ways to jumpstart my blogging again now that the embargo on all the cool stuff is lifted. So, I thought I would do it. Here are the rules:
- Grab the book nearest you. Right now.
- Turn to page 56.
- Find the fifth sentence.
- Post that sentence along with these instructions in a note to your wall. (this was on Facebook, so it is referring to that wall)
- Don't dig for your favorite book, the coolest, the most intellectual. Use the CLOSEST.
So, it took me a while to determine which book was the “closest”, as my position is roughly normal to the bookshelf in my office. I finally decided to be honest and pick the one that was really closest, but I will share another that was very close, as it is a good segue into future blogs.
The first (and official) one:
Semiconductor materials at 0 K have basically the same structure as insulators – a filled valence band separated from an empty conduction band by a band gap containing no allowed energy states (Fig. 3-4).
Solid State Electronic Devices, Ben G. Streetman
The second, and more relevant/interesting one:
The shim’s algorithm for picking a version in the COM interoperability scenario is much more straightforward – the latest version installed on the machine is always used.
Customizing the Microsoft .NET Framework Common Language Runtime, Steven Pratschner
What is amazing about this second one is that this is directly related to one of the features I’ve been working on for CLR v4 (and yes, that is actually the 5th sentence on page 56). Namely, this feature is known as “in-process side by side” (or in-proc SxS for short), and was announced publicly at PDC last month. This feature allows you to have more than version of the CLR loaded and running in a single process.
This feature is primarily a compatibility feature, targeted precisely at the behavior noted in the quote above. When we use the latest version, we can break existing COM objects. Not only because of breaking changes we make (of which the number is fairly small), but because of other, more subtle behavior dependencies.
Previously, loading a CLR version into the process locked the process to that CLR version. Any other policy than “pick the latest” results in a load order dependency problem that can result in “for sure” breaks because COM components targeting newer runtimes cannot run on old runtimes. So, clearly, that was the best choice of policies.
Now that we support multiple runtimes in the process (v2 and above), we can make a smarter, more compatible choice about runtime activation. The precise policies are still being worked through, so I’ll avoid stating them explicitly, but you can imagine us being able to make a much better choice about what runtime to activate to run a given managed COM component.
I’ll be posting more about this feature and it’s implications soon. Feel free to seed my future posts with questions in the comments. Hopefully, this is the jumpstart I needed. As for the “game” above, feel free to do it, or ignore it. It won’t result in any difference to your luck, financial situation, or anything else.