<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for Expert to Expert: Contract Oriented Programming and Spec# (Going Deep on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/shows/going+deep/expert-to-expert-contract-oriented-programming-and-spec/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for Expert to Expert: Contract Oriented Programming and Spec# (Going Deep on Channel 9)</title><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/</link></image><description>Expert to Expert: Contract Oriented Programming and Spec#</description><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/</link><language>en-us</language><pubDate>Sat, 31 May 2008 17:54:25 GMT</pubDate><lastBuildDate>Sat, 31 May 2008 17:54:25 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3243.35083, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;aJanuary wrote:&lt;/div&gt;
				&lt;div&gt;﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"&lt;br /&gt;From what I remember from other interviews it is based on C# 2.0.&lt;br /&gt;&lt;br /&gt;Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;In fact it says in that very interview (about 3 mins in) it's a superset of C# 2.0 and rather than a superset of C# 3.0. They also mention shortly after (and talk about it a little in the video )they are looking at a non-language specific solution.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406993</link><pubDate>Sat, 31 May 2008 17:54:25 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406993</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406993/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	aJanuary wrote:
				﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"From what I remember from other interviews it is based on C# 2.0.Another interesting interview (which I think is where I got the above from) can be found at&amp;#8230;</evnet:previewtext><dc:creator>aJanuary</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406993/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Good show guys.&amp;nbsp; The spec# team reminded me of the NASA guys in the 60s.&amp;nbsp; Very retro.&amp;nbsp; Nice tie Eric.&amp;nbsp; Look forward to this in c# 4.0.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406702</link><pubDate>Fri, 30 May 2008 11:51:35 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406702</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406702/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Good show guys.&amp;nbsp; The spec# team reminded me of the NASA guys in the 60s.&amp;nbsp; Very retro.&amp;nbsp; Nice tie Eric.&amp;nbsp; Look forward to this in c# 4.0.</evnet:previewtext><dc:creator>staceyw</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406702/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;vesuvius wrote:&lt;/div&gt;
				&lt;div&gt;﻿&lt;br /&gt;&lt;br /&gt;I did &lt;i&gt;not &lt;/i&gt;Google it,&amp;nbsp; I simply read what Charles posted. If you read that initial post, you will find that that's where I extrapolated my info. There is a very &lt;i&gt;clear &lt;/i&gt;link to the Spec# site with additional info posted by Charles.&lt;br /&gt;&lt;br /&gt;Other information was deduced from watching the video, and my post remains &lt;i&gt;correct&lt;/i&gt;. Your clearly misunderstood the meaning and usage of the word invariant, and are "barking up the wrong tree" with regard to .NET 2.0 and .NET 3.0 as their are inconsequential. &lt;br /&gt;&lt;br /&gt;How can you show appreciation for watching the video by going ahead and showing you misunderstood it? These are pretty smart guys, and I find it offensive you'd see it as important to ask such misconstructed information.&lt;br /&gt;&lt;br /&gt;Read Charles's initial post &lt;i&gt;properly&lt;/i&gt;. Don't try save face posting ambiguous and poorly explained posts. I have made myself abundantly clear.&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;I never said anything about .NET 2.0 or .NET 3.0... I was talking about C# 2.0 and C# 3.0.. I asked nothing about spec# and a version of .NET... I know spec# works against CIL specification, I however did want to know if spec# had all the language features of C# 3.0, or if it was features of C# 2.0...&lt;br /&gt;&lt;br /&gt;You do understand the difference there son?&lt;br /&gt;&lt;br /&gt;And your post just reiterates again "Well I 'got' it, then you should of as well.", sorry- we're obviously not all as hyper-intelligence as you are..&lt;br /&gt;&lt;br /&gt;You don't come here and dictate what people can ask, so politely- you can get f--ked.. you weirdo.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406672</link><pubDate>Fri, 30 May 2008 08:29:29 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406672</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406672/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	vesuvius wrote:
				﻿I did not Google it,&amp;nbsp; I simply read what Charles posted. If you read that initial post, you will find that that's where I extrapolated my info. There is a very clear link to the Spec# site with additional info posted by Charles.Other information was deduced from watching&amp;#8230;</evnet:previewtext><dc:creator>stevo_</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406672/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;stevo_ wrote:&lt;/div&gt;
				&lt;div&gt;﻿&lt;blockquote&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;&lt;td&gt;&lt;strong&gt;vesuvius wrote:&lt;/strong&gt;&lt;i&gt;﻿
&lt;blockquote&gt;
&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;aJanuary wrote:&lt;/strong&gt;

&lt;i&gt;﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"&lt;br /&gt;From what I remember from other interviews it is based on C# 2.0.&lt;br /&gt;&lt;br /&gt;Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I really don't see what the obsession with whether it's a .NET 2.0 or 3.0 invariant.&lt;br /&gt;&lt;br /&gt;A quick read of the Spec # &lt;a href="http://research.microsoft.com/specsharp/"&gt;website &lt;/a&gt;tells you that that it is an extension (Variation) of the C# language, so using the word invariant is &lt;i&gt;incorrect&lt;/i&gt;. Use the word invariant with Objects when programming Spec#.&lt;br /&gt;&lt;br /&gt;Furthermore, the Research Team utilise MSIL, so there is no reason that is unimplemantable in Visual Basic or other .NET aware language. If you or steveo_ are that curious install the Spec# VS2005 or 2008 versions from the website, and have a quick check to see whether you can write/use extension methods, automatic properties, partial methods anonymous types or object initialisers. That should satisfy your curiosity, although the 'meat and potatoes' is definitely with object invariants (.NET 2.0 and 3.0 both have objects - and nulls) so I would certainly deem this a curiosity, but wholly inconsequential to understanding Spec#.&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Pretty ironic post to say you summed up "why ask a question when you can google it" with an overzealous post.. its almost on the level of quoting someone with "stop spamming"...&lt;br /&gt;&lt;br /&gt;Believe it or not, people actually want to discuss and show interest.. not just watch then google the rest.. I wanted to post mainly to show that I appreciated their time to do the video, and to work on spec# in the first place.. &lt;br /&gt;&lt;br /&gt;And for the record, its pretty obvious why someone may ask, is this based on c# 2 or 3, since no point did it state this was an extension to c# in general, vs a sort of 'branch'..&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;I did &lt;i&gt;not &lt;/i&gt;Google it,&amp;nbsp; I simply read what Charles posted. If you read that initial post, you will find that that's where I extrapolated my info. There is a very &lt;i&gt;clear &lt;/i&gt;link to the Spec# site with additional info posted by Charles.&lt;br /&gt;&lt;br /&gt;Other information was deduced from watching the video, and my post remains &lt;i&gt;correct&lt;/i&gt;. Your clearly misunderstood the meaning and usage of the word invariant, and are "barking up the wrong tree" with regard to .NET 2.0 and .NET 3.0 as their are inconsequential. &lt;br /&gt;&lt;br /&gt;How can you show appreciation for watching the video by going ahead and showing you misunderstood it? These are pretty smart guys, and I find it offensive you'd see it as important to ask such misconstructed information.&lt;br /&gt;&lt;br /&gt;Read Charles's initial post &lt;i&gt;properly&lt;/i&gt;. Don't try save face posting ambiguous and poorly explained posts. I have made myself abundantly clear.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406639</link><pubDate>Fri, 30 May 2008 06:48:45 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406639</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406639/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	stevo_ wrote:
				﻿vesuvius wrote:﻿





aJanuary wrote:

﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"From what I remember from other interviews it is based on C# 2.0.Another interesting interview (which I think is where I got the above from) can be found at&amp;#8230;</evnet:previewtext><dc:creator>vesuvius</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406639/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;vesuvius wrote:&lt;/div&gt;
				&lt;div&gt;﻿
&lt;blockquote&gt;
&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;aJanuary wrote:&lt;/strong&gt;

&lt;i&gt;﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"&lt;br /&gt;From what I remember from other interviews it is based on C# 2.0.&lt;br /&gt;&lt;br /&gt;Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128&lt;br /&gt;&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I really don't see what the obsession with whether it's a .NET 2.0 or 3.0 invariant.&lt;br /&gt;&lt;br /&gt;A quick read of the Spec # &lt;a href="http://research.microsoft.com/specsharp/"&gt;website &lt;/a&gt;tells you that that it is an extension (Variation) of the C# language, so using the word invariant is &lt;i&gt;incorrect&lt;/i&gt;. Use the word invariant with Objects when programming Spec#.&lt;br /&gt;&lt;br /&gt;Furthermore, the Research Team utilise MSIL, so there is no reason that is unimplemantable in Visual Basic or other .NET aware language. If you or steveo_ are that curious install the Spec# VS2005 or 2008 versions from the website, and have a quick check to see whether you can write/use extension methods, automatic properties, partial methods anonymous types or object initialisers. That should satisfy your curiosity, although the 'meat and potatoes' is definitely with object invariants (.NET 2.0 and 3.0 both have objects - and nulls) so I would certainly deem this a curiosity, but wholly inconsequential to understanding Spec#.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;Pretty ironic post to say you summed up "why ask a question when you can google it" with an overzealous post.. its almost on the level of quoting someone with "stop spamming"...&lt;br /&gt;&lt;br /&gt;Believe it or not, people actually want to discuss and show interest.. not just watch then google the rest.. I wanted to post mainly to show that I appreciated their time to do the video, and to work on spec# in the first place.. &lt;br /&gt;&lt;br /&gt;And for the record, its pretty obvious why someone may ask, is this based on c# 2 or 3, since no point did it state this was an extension to c# in general, vs a sort of 'branch'..</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406515</link><pubDate>Thu, 29 May 2008 20:45:53 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406515</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406515/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	vesuvius wrote:
				﻿





aJanuary wrote:

﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"From what I remember from other interviews it is based on C# 2.0.Another interesting interview (which I think is where I got the above from) can be found at&amp;#8230;</evnet:previewtext><dc:creator>stevo_</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406515/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;aJanuary wrote:&lt;/div&gt;
				&lt;div&gt;﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"&lt;br /&gt;From what I remember from other interviews it is based on C# 2.0.&lt;br /&gt;&lt;br /&gt;Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128&lt;br /&gt;&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;I really don't see what the obsession with whether it's a .NET 2.0 or 3.0 invariant.&lt;br /&gt;&lt;br /&gt;A quick read of the Spec # &lt;a href="http://research.microsoft.com/specsharp/"&gt;website &lt;/a&gt;tells you that that it is an extension (Variation) of the C# language, so using the word invariant is &lt;i&gt;incorrect&lt;/i&gt;. Use the word invariant with Objects when programming Spec#.&lt;br /&gt;&lt;br /&gt;Furthermore, the Research Team utilise MSIL, so there is no reason that is unimplemantable in Visual Basic or other .NET aware language. If you or steveo_ are that curious install the Spec# VS2005 or 2008 versions from the website, and have a quick check to see whether you can write/use extension methods, automatic properties, partial methods anonymous types or object initialisers. That should satisfy your curiosity, although the 'meat and potatoes' is definitely with object invariants (.NET 2.0 and 3.0 both have objects - and nulls) so I would certainly deem this a curiosity, but wholly inconsequential to understanding Spec#.&lt;br /&gt;&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406293</link><pubDate>Thu, 29 May 2008 11:07:16 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406293</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406293/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	aJanuary wrote:
				﻿"Is this based on C# 3.0? or is this an invariation of C# 2.0?"From what I remember from other interviews it is based on C# 2.0.Another interesting interview (which I think is where I got the above from) can be found at&amp;#8230;</evnet:previewtext><dc:creator>vesuvius</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406293/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Very, very, very, very cool stuff!&lt;br /&gt;&lt;br /&gt;I would love to write software this way!&lt;br /&gt;&lt;br /&gt;You look nice in a suit Erik! [H]&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406292</link><pubDate>Thu, 29 May 2008 10:55:43 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406292</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406292/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Very, very, very, very cool stuff!I would love to write software this way!You look nice in a suit Erik! [H]</evnet:previewtext><dc:creator>Maddus Mattus</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406292/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>"Is this based on C# 3.0? or is this an invariation of C# 2.0?"&lt;br /&gt;From what I remember from other interviews it is based on C# 2.0.&lt;br /&gt;&lt;br /&gt;Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406290</link><pubDate>Thu, 29 May 2008 10:25:21 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406290</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406290/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>"Is this based on C# 3.0? or is this an invariation of C# 2.0?"From what I remember from other interviews it is based on C# 2.0.Another interesting interview (which I think is where I got the above from) can be found at http://www.hanselminutes.com/default.aspx?showID=128</evnet:previewtext><dc:creator>aJanuary</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406290/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>The implications of this type of programming language are unignorable. It is doubtless that it's programming syntax will spead into C# and WCF especially. You really need to have programmed C++ to fully appreciate just what level of control you are given at compile time. I have been toying around with possibly trying dynamically typed languages like RoR but I shall NEVER, as long as this continues to be developed.&lt;br /&gt;&lt;br /&gt;This isn't so much "patterns and practices" for applications, but for programming. Once some formal ground rules are established, one can indeed write better, faster, more secure, less buggy, eloquent and performant code.&lt;br /&gt;&lt;br /&gt;Well Done to John, Paul, Ringo...&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406289</link><pubDate>Thu, 29 May 2008 10:23:04 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406289</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406289/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The implications of this type of programming language are unignorable. It is doubtless that it's programming syntax will spead into C# and WCF especially. You really need to have programmed C++ to fully appreciate just what level of control you are given at compile time. I have been toying around&amp;#8230;</evnet:previewtext><dc:creator>vesuvius</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406289/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;umer_a wrote:&lt;/div&gt;
				&lt;div&gt;﻿
&lt;blockquote&gt;
&lt;table&gt;

&lt;tr&gt;
&lt;td&gt;&lt;img src="http://channel9.msdn.com/Themes/AlmostGlass/images/icon-quote.gif /&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;littleguru wrote:&lt;/strong&gt;

&lt;i&gt;Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it?&lt;/i&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://channel9.msdn.com/emoticons/emotion-1.gifborder=" /&gt; this is platform specific code, or constants&amp;nbsp;defined on a specific platform,&amp;nbsp;the same constants may have different value&amp;nbsp;in C/C++ compiler running on Linux/Solaris or some other platform or they might not exist at all. We were never interested in win32 or platform specific discussion, here. &lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;Hehe. But you know that's why I'm for one bool. True, False that is. :)&lt;br /&gt;&lt;br /&gt;But we are discussing things here that are only slightly related to the topic...</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406270</link><pubDate>Thu, 29 May 2008 07:06:36 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406270</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406270/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	umer_a wrote:
				﻿





littleguru wrote:

Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it? this is platform specific code, or constants&amp;nbsp;defined on a specific platform,&amp;nbsp;the&amp;#8230;</evnet:previewtext><dc:creator>littleguru</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406270/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Experts to experts? Indeed! I didn't get a point of Spec#... Absolutely. Perhaps because I'm not an "expert"...&lt;br /&gt;&lt;br /&gt;PS: Those guys look like absolute geeks... Crazy eyes, crazy hairdressings... [H]&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406269</link><pubDate>Thu, 29 May 2008 07:02:35 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406269</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406269/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Experts to experts? Indeed! I didn't get a point of Spec#... Absolutely. Perhaps because I'm not an "expert"...PS: Those guys look like absolute geeks... Crazy eyes, crazy hairdressings... [H]</evnet:previewtext><dc:creator>BlackTiger</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406269/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;littleguru wrote:&lt;/div&gt;
				&lt;div&gt;Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it?&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;:) this is platform specific code, or constants&amp;nbsp;defined on a specific platform,&amp;nbsp;the same constants may have different value&amp;nbsp;in C/C++ compiler running on Linux/Solaris or some other platform or they might not exist at all. We were never interested in win32 or platform specific discussion, here.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406199</link><pubDate>Thu, 29 May 2008 00:16:06 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406199</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406199/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	littleguru wrote:
				Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it?
		
		
		:) this is platform specific code, or constants&amp;nbsp;defined on a specific platform,&amp;nbsp;the same constants may&amp;#8230;</evnet:previewtext><dc:creator>umer_a</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406199/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;p&gt;The first question people have regarding contracts is, why bother? The speakers addressed this by explaining how much money Microsoft saved in manual testing time. But there are other savings as well.&lt;br /&gt;&lt;br /&gt;By specifying assumptions explicitly, the design improves. You move from fuzzy verbal communication&amp;nbsp;to concise, precise communication about the behavior and expectations of code. This has the same benefits as writing documentation before code, or writing tests before code. It clarifies the design.&lt;br /&gt;&lt;br /&gt;Even without compile-time or run-time contract checks, a contract allows one to view classes or methods as black boxes with precise behavior, ignoring internal details. This helps to logically determine if a design functions correctly.&lt;br /&gt;&lt;br /&gt;Another benefit is reduced debugging time. If you use only run-time contract checks, you eliminate the time normally spent trying to narrow down a bug -- you find it earlier, before it is manifested in peculiar ways. If you have compile time checking as well, as in spec#, the same bug would never occur -- it would spotted by the compiler.&lt;br /&gt;&lt;br /&gt;The work done by the spec# group is important. I hope it goes into products as soon as possible.&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406183</link><pubDate>Wed, 28 May 2008 22:56:21 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406183</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406183/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The first question people have regarding contracts is, why bother? The speakers addressed this by explaining how much money Microsoft saved in manual testing time. But there are other savings as well.By specifying assumptions explicitly, the design improves. You move from fuzzy verbal&amp;#8230;</evnet:previewtext><dc:creator>Frank Hileman</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406183/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Wierd to see Eric in a suit :S Nice tie though.&lt;br /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406168</link><pubDate>Wed, 28 May 2008 21:36:27 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406168</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406168/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Wierd to see Eric in a suit :S Nice tie though.</evnet:previewtext><dc:creator>aJanuary</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406168/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;umer_a wrote:&lt;/div&gt;
				&lt;div&gt;﻿That was about compiler efficiency and intelligence, i.e.,&amp;nbsp;&amp;nbsp;a compiler&amp;nbsp;intelligent enough to assume certain conditions. You can say limiting a programmer creativity by restricting to a certain struct like bool or allowing him the choice of using bool if required.&lt;br /&gt;&lt;br /&gt;The code provided requires two explicit test conditions to be entered in Java/C# compilers and your question will still remain unanswered.&lt;br /&gt;&lt;br /&gt;if (S_OK)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;else if (S_FAIL)&lt;br /&gt;&amp;nbsp;......;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Java/C#&lt;br /&gt;&lt;br /&gt;....;&amp;nbsp; //get some value for x somehow&lt;br /&gt;if (x==S_OK)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;else if (x==S_FAIL)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;&lt;br /&gt;In both versions, you cannot answer unless you have some hint on constants, but at least one extra statement and two &lt;strong&gt;explicit&lt;/strong&gt; test conditions due to developer in Java/C# version.&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;if (x)&lt;br /&gt;&lt;br /&gt;works in C#/JAVA if x is bool... if you have an int you need to check it against another value to "convert" it to a bool but that's more natural.&lt;br /&gt;&lt;br /&gt;For me using an int as a bool is a little bit confusing. If you take CS theory a bool is a bit and not an int. It could only be 1 or 0, whereas &lt;br /&gt;&lt;br /&gt;if (y + i + k) &lt;br /&gt;&lt;br /&gt;could be anything within the min and max value of the int, which is weird!&lt;br /&gt;&lt;br /&gt;Still, you didn't answer the question on S_OK and S_FAIL and therefore I will tell you what they are: S_OK == 0 and S_FAIL == 1 - interesting, isn't it?</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406166</link><pubDate>Wed, 28 May 2008 21:18:58 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406166</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406166/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	umer_a wrote:
				﻿That was about compiler efficiency and intelligence, i.e.,&amp;nbsp;&amp;nbsp;a compiler&amp;nbsp;intelligent enough to assume certain conditions. You can say limiting a programmer creativity by restricting to a certain struct like bool or allowing him the choice of using bool if&amp;#8230;</evnet:previewtext><dc:creator>littleguru</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406166/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Wow, great video, charles &amp;amp; erik. It was really exiting to see Spec#. I wonder if it will be integrated&amp;nbsp;(fully/partly) into C#.&lt;br /&gt;&lt;br /&gt;To Windows 3.0 in Vista. Well, theres a Windows 3.0-Like File-Dialog still in Vista in the font-management.&lt;br /&gt;&lt;br /&gt;Goto "Control-Panel" -&amp;gt; "Apperance and Personalisation" -&amp;gt; "Fonts", right-click on the panel, choose "Install New Font".&lt;br /&gt;&lt;br /&gt;Screens: &lt;br /&gt;&lt;br /&gt;

&lt;img src="http://img135.imageshack.us/img135/7485/menutofontkt3.jpg" alt="win30" /&gt;

&lt;img src="http://img76.imageshack.us/img76/4620/menutofont2mg6.jpg" alt="win30" /&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406162</link><pubDate>Wed, 28 May 2008 21:00:34 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406162</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406162/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Wow, great video, charles &amp;amp; erik. It was really exiting to see Spec#. I wonder if it will be integrated&amp;nbsp;(fully/partly) into C#.To Windows 3.0 in Vista. Well, theres a Windows 3.0-Like File-Dialog still in Vista in the font-management.Goto "Control-Panel" -&amp;gt; "Apperance and&amp;#8230;</evnet:previewtext><dc:creator>GamlerHart</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406162/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>I watched it yesterday evening. And now, back at work I already wished I had the Spec# features :(&lt;br /&gt;Great interview, keep the 'Going Deep' stuff comming!&lt;br /&gt;&lt;br /&gt;En de oranje das voor Koninginnedag, super Eric!&lt;br /&gt;(translation: and the orange tye for Queens Day, super Eric!)</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405994</link><pubDate>Wed, 28 May 2008 20:14:05 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405994</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/405994/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I watched it yesterday evening. And now, back at work I already wished I had the Spec# features :(Great interview, keep the 'Going Deep' stuff comming!En de oranje das voor Koninginnedag, super Eric!(translation: and the orange tye for Queens Day, super Eric!)</evnet:previewtext><dc:creator>ilmar</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/405994/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>First of all, thanks for a very interesting video!

I have a question about the way invariants are implemented in Spec#.

Traditionally (i.e., in Eiffel), invariants are only checked when you exit a method that was called from a different object, so you can break an invariant somewhere in the middle of a method or even have a private method that breaks an invariant every time.

Was there any specific design issue that made you change the way invariants work and enforce them after every statement, which led to the introduction of the expose block?</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406139</link><pubDate>Wed, 28 May 2008 19:46:36 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406139</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406139/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>First of all, thanks for a very interesting video!

I have a question about the way invariants are implemented in Spec#.

Traditionally (i.e., in Eiffel), invariants are only checked when you exit a method that was called from a different object, so you can break an invariant somewhere in the&amp;#8230;</evnet:previewtext><dc:creator>onodera</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406139/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>How did you integrate with the Visual Studio environment? Would it be possible to get a simple sample/tutorial on VS SDK?</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406084</link><pubDate>Wed, 28 May 2008 16:50:23 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406084</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406084/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>How did you integrate with the Visual Studio environment? Would it be possible to get a simple sample/tutorial on VS SDK?</evnet:previewtext><dc:creator>Moshe</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406084/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>That was about compiler efficiency and intelligence, i.e.,&amp;nbsp;&amp;nbsp;a compiler&amp;nbsp;intelligent enough to assume certain conditions. You can say limiting a programmer creativity by restricting to a certain struct like bool or allowing him the choice of using bool if required.&lt;br /&gt;&lt;br /&gt;The code provided requires two explicit test conditions to be entered in Java/C# compilers and your question will still remain unanswered.&lt;br /&gt;&lt;br /&gt;if (S_OK)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;else if (S_FAIL)&lt;br /&gt;&amp;nbsp;......;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In Java/C#&lt;br /&gt;&lt;br /&gt;....;&amp;nbsp; //get some value for x somehow&lt;br /&gt;if (x==S_OK)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;else if (x==S_FAIL)&lt;br /&gt;&amp;nbsp;....;&lt;br /&gt;&lt;br /&gt;In both versions, you cannot answer unless you have some hint on constants, but at least one extra statement and two &lt;strong&gt;explicit&lt;/strong&gt; test conditions due to developer in Java/C# version.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406053</link><pubDate>Wed, 28 May 2008 15:31:14 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406053</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406053/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>That was about compiler efficiency and intelligence, i.e.,&amp;nbsp;&amp;nbsp;a compiler&amp;nbsp;intelligent enough to assume certain conditions. You can say limiting a programmer creativity by restricting to a certain struct like bool or allowing him the choice of using bool if required.The code provided&amp;#8230;</evnet:previewtext><dc:creator>umer_a</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406053/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;blockquote&gt;
				&lt;div&gt;adamjcooper wrote:&lt;/div&gt;
				&lt;div&gt;﻿Hi littleguru,&lt;br /&gt;&lt;br /&gt;There are two Design by Contact frameworks I know of that you can use today in C#. They both enforce checks at runtime, but take very different approaches and will appeal to very different audiences.&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Adam.&lt;/div&gt;
		&lt;/blockquote&gt;
		&lt;br /&gt;
		&lt;br /&gt;Thanks for sharing. The two frameworks seem very primitive compared to Spec#, but not everyone has the time to write a new compiler with IDE integration. The first one is even more like an assert(...) thing.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div&gt;umer_a wrote:&lt;/div&gt;&lt;div&gt;﻿&lt;strong&gt;Compiler Intelligence conflicting software design principles&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;This is a Programmer responsibility and Compiler responsibility case, that is, what a programmer need to specify and what a compiler must assume.&lt;br /&gt;&lt;br /&gt;This C/C++ code is self explanatory without any documentation/comments&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;unsigned x=[some expresion];&lt;br /&gt;..&lt;br /&gt;if (x)&amp;nbsp; &lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;The C/C++ compilers are intelligent enough to assume that condition will execute if x is a positive integer, and Java/ C# compilers require an explicit condition for that adding burden to programmer.&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I don't know if that can be said as "smart"...&amp;nbsp;This is more like a historical thing and somebody new to C/C++ doesn't know that &amp;gt; 0&amp;nbsp;means true and 0&amp;nbsp;represents false (and that a negative value might be an error code)... That's knowledge that you gain over time. &lt;br /&gt;&lt;br /&gt;It's also very confusing&amp;nbsp;for people who are new to C/C++ to see checks like this (at least it was for me):&lt;br /&gt;&lt;br /&gt;int i = j + y + z;&lt;br /&gt;&lt;br /&gt;if (i)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Also,&amp;nbsp;I find it interesting that this "smartness" will not always work. Especially if you have something like this:&lt;br /&gt;&lt;br /&gt;if (S_OK)&lt;br /&gt;&amp;nbsp;&amp;nbsp; // ...&lt;br /&gt;else if (S_FAIL)&lt;br /&gt;&amp;nbsp; // ...&lt;br /&gt;&lt;br /&gt;Which one do you think is entered? (just by looking at the variable names).&lt;br /&gt;&lt;br /&gt;Having&amp;nbsp;a Boolean type like in .NET is way better, IMHO. And having just&amp;nbsp;ONE Boolean type is very important, not like in the SDKs based on C/C++&amp;nbsp;where you have tons of different representations for something that worked out and something that didn't...</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406042</link><pubDate>Wed, 28 May 2008 15:09:27 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406042</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406042/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	adamjcooper wrote:
				﻿Hi littleguru,There are two Design by Contact frameworks I know of that you can use today in C#. They both enforce checks at runtime, but take very different approaches and will appeal to very different audiences....Adam.
		
		
		Thanks for sharing. The two frameworks&amp;#8230;</evnet:previewtext><dc:creator>littleguru</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406042/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>&lt;p&gt;Intersting Stuff. The media length looked too much but it was a short discussion at the end with many things left unaddressed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Handling Overloaded Function&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For overloaded function(s), there must be a single case specification, or each function must be addressed seperately.&lt;/p&gt;
&lt;p&gt;Moreover, Unlike Java, C# allows funtion overloading based upon return types, which When called in code, tend to confuse reader/compiler. &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;For example,to multiply 2 integers, a class can include following overloaded functions:&lt;/p&gt;
&lt;p&gt;..&lt;br /&gt;int mult(int, int);&amp;nbsp;&amp;nbsp;// call if result is less than max (int), return int&lt;br /&gt;long mult(int, int);&amp;nbsp;&amp;nbsp;// call if&amp;nbsp; max (int) &amp;lt;=result&amp;lt;=max (long), return long&lt;br /&gt;float mult(int, int);&amp;nbsp;&amp;nbsp;// call if&amp;nbsp; max (long) &amp;lt;=result&amp;lt;=max (float), return float&lt;br /&gt;double mult(int, int);&amp;nbsp;&amp;nbsp;// call if&amp;nbsp; max (long) &amp;lt;=result&amp;lt;=max (double), return double &lt;br /&gt;...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;Compiler Intelligence conflicting software design principles&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a Programmer responsibility and Compiler responsibility case, that is, what a programmer need to specify and what a compiler must assume.&lt;/p&gt;
&lt;p&gt;This C/C++ code is self explanatory without any documentation/comments&lt;/p&gt;
&lt;p&gt;...&lt;br /&gt;unsigned x=[some expresion];&lt;br /&gt;..&lt;br /&gt;if (x)&amp;nbsp; &lt;br /&gt;...&lt;br /&gt;...&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The C/C++ compilers are intelligent enough to assume that condition will execute if x is a positive integer, and Java/ C# compilers require an explicit condition for that adding burden to programmer.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;A fun case&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As discussedm, Spec is applied on C code to catch/handle every possible case. Learning the languaage, this is the first piece of code developers eneter:&lt;/p&gt;
&lt;p&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/p&gt;
&lt;p&gt;int main()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;printf("xyz"); //xyz can be any string&lt;br /&gt;&amp;nbsp;return 0;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Going deep in the language, at a stage programmer discover that printf() in fact returns a value, which is usually a positive integer but in the most rare case, it can be negative indicating an exception. Applying spec on rare cases like this, perhaps once in a lifetime sort of case...&lt;/p&gt;</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406015</link><pubDate>Wed, 28 May 2008 12:21:43 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406015</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406015/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Intersting Stuff. The media length looked too much but it was a short discussion at the end with many things left unaddressed.
Handling Overloaded Function
For overloaded function(s), there must be a single case specification, or each function must be addressed seperately.
Moreover, Unlike Java,&amp;#8230;</evnet:previewtext><dc:creator>umer_a</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406015/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Hi littleguru,&lt;br /&gt;&lt;br /&gt;There are two Design by Contact frameworks I know of that you can use today in C#. They both enforce checks at runtime, but take very different approaches and will appeal to very different audiences.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeproject.com/KB/cs/designbycontract.aspx"&gt;Kevin McFarlane has created an easy-to-use API&lt;/a&gt; that always enforces checks at runtime via calls to a Check object, such as:&lt;br /&gt;&lt;br /&gt;Check.Require(0 &amp;lt; x &amp;lt; 5);&lt;br /&gt;&lt;br /&gt;Check.Ensure(result &amp;lt; 3);&lt;br /&gt;&lt;br /&gt;Check.Invariant(B.a &amp;gt; 0 and B.b &amp;gt; 0);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Philip Laureano offers &lt;a href="http://www.codeproject.com/KB/cs/LinFu_Part5.aspx"&gt;a more complicated Design by Contract library&lt;/a&gt; as part of a larger library called LinFu. He uses a language-neutral,&amp;nbsp;attributes-based approach for declaring contract checks. The advantage--or disadvantage, depending on your point of view--to Philip's approach is that the library is completely ignorant of the contract checks you assign, which means that when you call your library as normal, none of the checks will be made.&amp;nbsp;In order for the checks to actually be enforced, you must use LinFu to create&amp;nbsp;proxy versions of your classes with all the checks injected into the proxies. I get the impression this DbC approach is best used in conjunction with some sort of Dependency Injection framework, either LinFu's own or something like Spring.NET or Castle Windsor.&lt;br /&gt;&lt;br /&gt;If you want a simple and lightweight API that bakes checks into your library so that they are always performed regardless of the caller, &lt;a href="http://www.codeproject.com/KB/cs/designbycontract.aspx"&gt;Kevin's API&lt;/a&gt; is probably your best bet. If you require your checks to be completely separate from your library to the point that they are optional, and if you're already working on an enterprise project using Dependency Injection, take a look at &lt;a href="http://www.codeproject.com/KB/cs/LinFu_Part5.aspx"&gt;LinFu.DesignByContract2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hope that helps,&lt;br /&gt;Adam.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406012</link><pubDate>Wed, 28 May 2008 12:17:14 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=406012</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/406012/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Hi littleguru,There are two Design by Contact frameworks I know of that you can use today in C#. They both enforce checks at runtime, but take very different approaches and will appeal to very different audiences.Kevin McFarlane has created an easy-to-use API that always enforces checks at runtime&amp;#8230;</evnet:previewtext><dc:creator>adamjcooper</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/406012/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>Wow this was a load of cool features and questions!&lt;br /&gt;&lt;br /&gt;This video made wonder the following: are there tools around that do the stuff that the team does with their checker already on current C# code; or MSIL code? Anybody having come across a tool similar to their checker?</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405975</link><pubDate>Wed, 28 May 2008 09:08:03 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405975</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/405975/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Wow this was a load of cool features and questions!This video made wonder the following: are there tools around that do the stuff that the team does with their checker already on current C# code; or MSIL code? Anybody having come across a tool similar to their checker?</evnet:previewtext><dc:creator>littleguru</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/405975/Trackback.aspx</trackback:ping></item><item><title>Re: Expert to Expert: Contract Oriented Programming and Spec#</title><description>This really is exciting stuff (in fact, I created a Channel9 user account just to respond to this video). Charles, I realize this isn't production-ready, but I can't tell you how much I'd like to start using this in my own work &lt;em&gt;now&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;I had the same question as stevo_ - What version of C# is this based on? Perhaps someone on the Spec# team can enlighten us on which, if any, newer features of C# are not currently supported in Spec#.&lt;br /&gt;&lt;br /&gt;After the steady stream of language and CLR enhancements we've enjoyed--nullable types, generics, and all of the great new enhancements that have come with the dawn of LINQ--this seems like a natural next step. I'm very hopeful Microsoft will bake Design by Contract support into a future version of the CLR.&lt;br /&gt;&lt;br /&gt;Here's my vote to see this make it's way into C# 4 and .NET 4.</description><comments></comments><link>http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405874</link><pubDate>Tue, 27 May 2008 22:30:59 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/shows/Going+Deep/Expert-to-Expert-Contract-Oriented-Programming-and-Spec/?CommentID=405874</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/405874/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>This really is exciting stuff (in fact, I created a Channel9 user account just to respond to this video). Charles, I realize this isn't production-ready, but I can't tell you how much I'd like to start using this in my own work now.I had the same question as stevo_ - What version of C# is this based&amp;#8230;</evnet:previewtext><dc:creator>adamjcooper</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/405874/Trackback.aspx</trackback:ping></item></channel></rss>