Things I learned last week #2
Last week I started a session at work during our Monday morning development meeting called Things I learned last week. Here is episode #2.
It was a bit of a dry week in terms of what I learned, but there was a few things worth mentioning.
I learned:
- to love Code Contracts. I knew that James from Intergen had done a mentoring session at Intergen and had done the same presentation at Code Camp 2009 as I looked at his presentation he put up on his blog. I have read up on Code Contract before then but then quickly forgot about it. Having a second look and actually RTFM I have to admit that I like it. So much actually that we have started using it in out new codebase that will only see the light after .NET 4.0 and VS2010 is released and as such this will provide us with some future proving as we don’t then have to pull out all our custom old school pre-condition checking. Code Contracts also add so much more, for example you can create Code Contracts for Interfaces, post-conditions and Invariants, fantastic stuff. But as always, use wisely, don’t go and implement everything the static analysis tells you to implement. ;)
- how to use SyntaxHighlighter and love PreCode the Windows Live Writer add-in.
- about Web.Config Transformation coming in VS2010. Finally I can get rid of all the complex homebrew .config handling between all the environments.