January 30, 2010

In February, I will be giving a presentation to the Minnesota Visual Studio user group. I wanted to recommend some books that would help those who are new to contract programming practices. The only book I could think of was the legendary Object-Oriented Software Construction second edition by Bertrand Meyer. I love that book. It was my first introduction to object-oriented programming and Design by Contract. It goes into tremendous depth on a variety of programming principles that go well beyond contracts alone. Unfortunately, the book is enormous (over 1200 pages), and can be quite intimidating to some people. I believe this size and complexity make it a poor choice for the busy professional programmer who wants to learn about contract programming practices with limited training time. So I searched the Internet, and found a book, Design by Contract, by Example, by Richard Mitchell and Jim McKim. I recommend it for anyone who wants to learn more about the principles and practices of programming with contracts. I like the fact that the book is well organized, and easily digestible (less than 250 pages). (more…)

The benefits of automated testing are well understood, and widely accepted as a good practice in software development in 2010. Unfortunately, in cases where we need automated testing the most, it is difficult to introduce. The best example is a large code base that is poorly constructed but important to our organization. Michael Feathers has written an excellent book Working Effectively with Legacy Code which describes the problem and how to tackle it in the real world. His book is a tremendous resource for people who wish to introduce automated testing to rotten code that lacks it.

In addition to the excellent ideas in that book, I believe code contracts can also help you achieve higher quality and greater testability. In this article I will explain how this is possible. (more…)

I will be speaking about Contract Programming with Code Contracts at the February 17, 2010 meeting of the Minnesota Visual Studio User Group (http://www.vstsmn.net/). The presentation is available at this download link.

January 14, 2010

Our enterprise architect, John Lomnicki, notified us this week that our use of Microsoft CRM has been published as a case study by Microsoft. That is exciting to me. It’s fun to read the article and realize what good work we are doing. Our CRM team is very small and our company is a non-profit. So I don’t think of us as special. But we are a dedicated group who work hard applying modern technologies to serve our customers.

Readers of this blog will enjoy knowing that I and the other CRM programmer use Microsoft Code Contracts to help improve the reliability, maintainability, recoverability, and overall quality of the custom code portion of this solution. I wrote previouslyhttps://codecontracts.info/2009/12/18/code-contracts-improve-microsoft-crm-workflow-code-2/ about the exact way in which we apply code contracts to detect and prevent faults, and resolve them more quickly when they do happen.

January 13, 2010

On January 12, 2010, I gave a 90 minute presentation on code contracts to my coworkers. I presented the three lessons that are available for download at the following location ContractProgrammingLessons.zip. This file also includes the PowerPoint presentations that I used. I presented the argument that code contracts were a useful tool to improve readability, reliability, correctness, ease of diagnosis, and other software qualities. Later that evening, I presented these ideas to another friend of mine who is an active software developer. Here were some of the reactions I received and my responses to them. And in a few cases, I have noted the response I would have given if I had had the clarity of mind at the time.(more…)