Contractual Obligations: Getting up and running with Code Contracts – Wednesday 17th 2010 February in Dundee

Code Contracts is Microsoft’s implementatoin of Programming by Contract for .NET (also known as Contract Programming, or Contract-First development).  Code Contracts are a way of adding executable specification documentation to your code; they can also work hand-in-hand with your unit tests.  All-in-all, the aim of Code Contracts is to improve the quality and reliability of your software.

With Code Contracts you can: specify a method’s pre-requisites (pre-conditions) and what it guarantees to do for it’s caller (post-conditions); you can also specify what conditions must always be in-place throughout the the lifetime of an object (object-invariants).  Code Contract conditions can be tested at runtime and, if you’re using Team System, they can also be analysed and tested statically after your application has compiled. Using the features of code contracts in conjunction with your unit tests can help you find potential problems in your code sooner.

Code Contracts will be part of .NET 4.0 and are also available for .NET 3.5; they’re language agnostic and integrate into Visual Studio (08 & 10).

The aim of this session is to show you how to write code contracts: method pre and post condtions along with object-invariants and we’ll look at how Code Contracts work.  In addition, we’ll also be looking at using Code Contracts with TDD and how to use Contracts with Interfaces.

The Speaker

Barry Carr has been developing software since 1987.  Barry has written software for many business sectors, including: Chemical; Pharmaceutical; Oil and Gas; Banking; Accounting; Legal Accounting; Public Sector and now Mining and Geology. Barry has also developed and sold his own software components to other developers. Always keen to keep his skills current, Barry devotes a lot of his personal time to technical development as well as keeping abreast of the current trends in the world of software development. Barry is also active in the software development community running the Dundee branch of Scottish Developers.

When he isn’t coding, Barry likes to spend his time with photography, reading and unashamedly listening to progressive rock (especially while coding).

The Venue

We are meeting in the Queen Mother Building at Dundee University. After the meeting we normally retire to the the bar at Laing’s

The Agenda

18:45 Doors Open
19:00 Welcome
19:10 The Talk (Part 1)
19:55 Break
20:05 The Talk (Part 2)
20:45 Feedback & Prizes
21:00 Retire to the Pub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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

%d bloggers like this: