Managed Dump debugging support for Visual Studio and ICorDebug

This is the longest I’ve gone without blogging, but our PDC announcements have stuff way too cool to stay quiet about. If you saw PDC, you’ve head that the CLR Debugging API, ICorDebug, will support dump-debugging. This enables any ICorDebug-based debugger (including Visual Studio and MDbg) to debug dump-files of .NET applications. The coolness goes…


Updated MSDN forums

The MSDN forums are updated and have a new look and feel. It’s at a new link too:  (the old link still forwards).


Stuff in Reflection that’s not in Metadata

Previously, I mentioned some things in Metadata that aren’t exposed in Reflection.  Here’s an opposite case. While metadata represents static bits on disk, Reflection operates in a live process with access to the CLR’s loader. So reflection can represent things the CLR loader and type system may do that aren’t captured in the metadata.  …


I noticed that MSDN finally has nice URLs for the BCL. (Or perhaps that should be “I finally noticed that …”, depending on how long this has been) So instead of: You can do: For overloaded methods, it takes you to the disambiguation page. This actually makes it a lot easier to find…


The price of complexity

My house was haunted. One of the lights would randomly go on or off and random times without anybody fiddling the switch. The previous owner of our house had installed fancy dimmer light switches. On a whim, we replaced one of the fancy switches with a simple on/off switch.  As we took the old fancy…


Codegen for On Error Resume Next

VB has a “On Error Resume Next”, which tells each line to swallow exceptions and just keep executing to the next line. It’s kind of like a try-catch around every single line. It may be tempting for C++ developers to make fun of VB for this, but this is a lot like programming with HRESULT…


The waiting game

Punting on a problem can be good or bad, depending on the situation. Punting is not always retreating or surrendering. Punting is good when the problem will be easier to solve later. For example, maybe you suspect something may happen that will render the problem moot (eg, a product would be discontinued).  Maybe you’ll have…

Understand the end-to-end scenarios

If you don’t understand the end-to-end scenario, it’s easy to do something that is ultimately self-defeating. For example, my 3yr old daughter recently learned to play hide-and-seek. The goal of the game is to hide and avoid being found while the “it” player searches for you. She’s got the part about hiding down. But then…


Sometimes it’s the obvious answer

Sometimes the answer to a question is so obvious that we skip over it looking for a fancier answer. Example: A chair at my house had a bunch of little indentations on the seat – kind of like what you’d expect if somebody took a math compass and poked the chair a bunch of times….


Arguing by-example vs. by-principle

You can argue by providing examples supporting your case.  Alternatively, you can argue by appealing to more general principles. For example, in arguing that “exposing public fields is bad,” you could say:By-principle: “It breaks abstraction and encapsulation.”By-example: “This untrusted plugin could set field m_foo to value 4 and cause a null-reference exception on line 16…