House Hunting!

We have just started to look for a house – why build someone else’s equity when you can build your own. I got to admit its a drag! And the fact we just started and people go on for months doing this, I don’t know how. It is just a big pain in the butt. My sympathies to all those going through the same thing. If you do know good areas in London where we can live please let me know? I need it to be close to Tube and preferably within Zone 2.

System Stability Chart in Longhorn

If you go to the Computer Management tool in Longhorn (Dec CTP), then you will something called the System Stability Chart, which shows you how stable the system has been including Software Installs/UnInstalls, Failures (including Apps, Drivers, Hardware, Windows), etc. Its pretty cool and should help narrow down cause of failures – quite helpful in a corporate environment. Here is a screen shot from one of my VMs.

Dependencies between Contract Inheritance and CallBack Inheritance in Indigo

Contract inheritance (via CLR interface inheritance) is pretty cool allowing you to support versioning and contract aggregation in WCF, the catch though is if you have a Duplex interface then the callback interface must follow the same hierarchy. So if your primary interface say is IMyInterface which inheritances from ISomeInterfaceOne and ISomeInterfaceTwo, then the callback interface also needs to have the same chain or you will get an InvalidContractException. Here is an example from MSDN:

[ServiceContract(CallbackContract = IACallback)]
interface IA : IB {}
interface IACallback : IBCallback {}
[ServiceContract(CallbackContract = IBCallback)]
interface IB {}
interface IBCallback {}

Writing High-Perf. Managed Apps?

If you are writing high-perf. managed applications, all the old-world advice from the days of good old COM is still valid. But you do need to think of a few other things such as how the CLR JIT would change things, or the Exception Handling, or Threading and syncing up, or possibly the GC and Allocation Profiles? While this MSDN article is old (now), it still is excellent Food for Thought when it comes to writing high-perf. apps.

How to find if a thread is running using the ThreadState property?

If you wanted to use the ThreadState property (which should only be used for debugging and not sync.), to find out if a thread is running. Since the Running state has a value of 0, you cannot do a bit test to discover this state. But you could do something like this to get the same result:

if ((state & (Unstarted | Stopped)) == 0) //yea, its Running!