Learning from Microsoft Shared Source

Microsoft has recently revamped what was previously their Reference Source Code Center to be simply Reference Source. This is a site for .NET developers who are interested in viewing the source code for the platform API’s, and like the Java OpenJDK this provides a wealth of learning opportunities for .NET. While I have spent only a few hours going through some of the code, there are definitely some common themes that are worth noting and at the top of my list is design by contract.


After the software development lifecycle, programs experience certain evolutionary transitions. There is the moment of genesis when the initial application demonstrates capabilities in a proof of concept, but that is ultimately superceded by a succession of modifications that eventually jeopardizes the maintainability of that code.