Software Quality

April 8, 2010

Presentation on code contracts to Twin Cities Languages User Group Thursday, April 8, 2010

Filed under: Code Contracts, Presentations — David Allen @ 8:06 pm

Tonight I gave a talk on Microsoft Code Contracts to the  Twin Cities Languages User Group.  I appreciate all the people who took time to attend.  I enjoyed the dialogue.  Participants had some great questions and comments. The slides amd demo software in Visual Studio 2010 RC format, are available at my download site.  Here were just  a few questions and comments made:


   

Question:

 I would be reluctant to introduce a new technology for fear my coworkers would not understand it.      

Answer: 

If you give a presentation like the one I gave, you can sell them first on the business value (increasing software quality). If you start gradually, with easy preconditions, they should not be intimiated. Even if they don’t feel they can write the contracts, simple ones should be intuitively obvious and they can merely ignore them.


Question: 

How does the Contract.OldValue(foo) behave if ‘foo’ is a reference object?  Does it clone them? That could get expensive for collections.   

Answer: 

It stores the reference, not a deep clone of the object. So if you want to ensure that the properties on foo are such and such, you must refer to them specifically (e.g.  Contract.OldValue(foo.Name))  


Question:

 When does the program evalue  Contract.OldValue(foo) ?   

Answer: 

On entry to the method.   


 

4 Comments »

  1. Thanks for the presentation, David. I did a little more reading up on this subject when I got home, and I can see a lot of possibilities for this technology. Good job!

    Comment by Brian Seebacher — April 8, 2010 @ 8:36 pm

    • Thanks for the kind words, Brian. I’m glad you got some good ideas from it.

      Comment by David Allen — April 8, 2010 @ 8:39 pm

  2. Enjoyed the presentation! I downloaded your sample project. It helped me as I started trying to use this technology in my project.

    Comment by Brian Rootes — April 17, 2010 @ 8:33 am

    • I’m glad you enjoyed the presentation. It was a lot of fun to interact with the group that night. And I’m glad the sample application was helpful too.

      Comment by David Allen — April 17, 2010 @ 1:18 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: