IMHO, most open source code is also below a quality level that I'd want my name against, but clearly that's just me since the actual authors chose to publish.
MSDN samples are generally pretty poor quality. MS defend that by noting that they are intended to illustrate a particular API and so often omit error checking or don't handle general cases. On the other hand, they know full well that these samples are cut-n-pasted and end up unmodified in real apps. Perhaps this is why so many MS technologies wither on the vine. They launch the API with such poor quality samples that the API can't evolve without triggering loads of backwards compatibility issues (and so it never evolves).