Software Quality

January 30, 2010

Book Review of Design by Contract, by Example, by Richard Mitchell and Jim McKim

Filed under: Code Contracts, Practices — Tags: , — David Allen @ 3:00 pm
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…)

January 18, 2010

A metaphor for the synergy between automated testing and contract programming

Filed under: Practices — David Allen @ 4:50 pm

I read a great blog article the other day by Matthew Podwysocki  “.Net Code Contracts and TDD Are Complementary”.      I also wrote an article on the subject a few weeks ago https://codecontracts.info/2010/01/02/test-driven-development-versus-design-by-contract/. Those articles describe different roles these techniques play in the development process and how they both contribute to better software quality.  I won’t repeat the logical arguments made there. But I had an idea for a metaphor to help make these ideas memorable, communicating the synergy achieved by combining both of these techniques. 

Computer software is like a person looking for a job. The job applicant has a resume which describes the goals, experience, and skills of the applicant.   Here is an example of a resume  (more…)

January 17, 2010

Code Contracts are a Great Tool to Enhance Quality and Testability of Legacy Code

Filed under: Code Contracts, Practices, Testing — Tags: , , — David Allen @ 11:48 am

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…)

January 16, 2010

Presentation to Minnesota Visual Studio Users Group – February 2010

Filed under: Code Contracts — Tags: , — David Allen @ 12:11 am

This was an advance announcement. The actual presentation can be found at Presentation to Minnesota Visual Studio Users Group – February 17 2010. Topic: Microsoft Code Contracts

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

We use Microsoft Code Contracts in our Microsoft CRM custom code

Filed under: Case Study, Code Contracts — David Allen @ 10:06 pm

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.

Here is the E-Mail from John, with a link to the case study.   (more…)

January 13, 2010

Presentation on Code Contracts to ELCA Board of Pensions – January 2010

Filed under: Code Contracts — David Allen @ 8:26 am

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…)

Older Posts »

Blog at WordPress.com.