Skip to content

{ Category Archives } Code Contracts

Code Contracts Survey

Some days ago I took deeper insights into Code Contracts, which are included in .NET 4.0. Microsoft currently takes a survey on Code Contracts and the Code Contracts tools. Give them feedback to support improvement of Code Contracts. You can find the survey here: http://codecontracts.questionpro.com

Tagged , ,

Comparison: DbC and TDD – Part 3

This blog post is a continuation of the comparison between DbC and TDD that started with a dedicated look at code specification and covered other aspects in part 1 and part 2. It takes a look at further points and shows the characteristics (commonalities and differences) of TDD and DbC towards these aspects. Universality One […]

Tagged , , , , , , , ,

Comparison: DbC and TDD – Part 2

This blog post is a continuation of the comparison and differentiation between DbC and TDD. Please take a look at part 1 which covers the design aspect (and shortly specification again which has been discussed in more detail here). Today’s post takes a look at documentation and code coupling and shows commonalities and differences of […]

Tagged , , , , , , ,

Comparison: DbC and TDD – Part 1

Let’s come to another blog post in preparation of elaborating the synergy of DbC and TDD. My first blog post on this topic covered an initial discussion on specification of code elements. Thereby it has shown different characteristics of DbC and TDD in terms of code specification. Since specification is one really important aspect in […]

Tagged , , , , , , ,

Specification: By Code, Tests and Contracts

Currently I’m taking further investments in thinking about the synergy of Design by Contract (DbC) and Test-Driven Development (TDD). This process is partially driven by my interests in Code Contracts in .NET 4.0 and other current developments at Microsoft (e.g. Pex). The basic idea I’ve got in mind is to combine DbC and TDD to […]

Tagged , , , , , , ,

Code Contracts: Video on the static checker

Just a short hint for today: Francesco Logozzo from the Code Contracts team has made a little introductory video on the static checker. In this video he introduces the static checker and basically describes its fundamental algorithm: abstract interpretation. Take a look at this video and please keep giving feedback to the Code Contracts team. […]

Tagged , , ,

Code Contracts #8: Sandcastle integration

Release 1.2.20903 (4 Sep 2009) of Code Contracts comes with a nice integration of contracts on classes and methods into Sandcastle documentation! By this, Code Contracts achieve an important goal: real “checked documentation”. This short article gives an overview of how to get your Sandcastle installation to handle contracts. 1) Install Sandcastle (+DocProject) At first, […]

Tagged , , , , , ,

New Code Contracts Release

On September 4th, Microsoft has made a new Code Contracts release available. Release 1.2.20903 (4 Sep 2009) comes among others with the following changes: Inclusion of Code Contracts into Sandcastle documentation! Thereby, Code Contracts achieve a full state of “checked documentation”. Improvements of the dynamic and static checker More contracts on core .NET framework assemblies […]

Tagged ,

Code Contracts #7: Relation to Guard classes

Hey guys. After two months of many things to do I come back again with an article to Code Contracts. This day’s topic are guard classes and how they relate to Code Contracts. Recently my colleague AJ posted a really nice article about guard classes. He’s the first one who explained the topic as a […]

Tagged , , ,

Code Contracts #6: Modelling constraints and state

(Note: this article has been updated on 2009/05/16 by replacing the example and adding some more information) Modelling constraints on class properties and valid state of classes explicitly is an interesting topic and sometimes I catch myself being frustrated by the lack of handling these aspects through current programming languages. With “constraint” I mean a […]

Tagged , , , , , , , , ,