<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6800934446457898793.post4759922338859758365..comments</id><updated>2010-07-04T08:48:54.994-04:00</updated><category term='trueskill'/><category term='aes'/><title type='text'>Comments on Moserware: Constants on the left are better, but this is ofte...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.moserware.com/feeds/4759922338859758365/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html'/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://1.bp.blogspot.com/_Zfbv3mHcYrc/SLDM--5fn8I/AAAAAAAAA1w/EZtLwWvYhdI/S220/facebook+beard2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2031598737530363497</id><published>2008-03-18T06:18:00.000-04:00</published><updated>2008-03-18T06:18:00.000-04:00</updated><title type='text'>This is a very interesting fact but I think it is ...</title><content type='html'>This is a very interesting fact but I think it is not very helpfull for improved developers. I wrote constants to the right my whole time as a programmer. If I start to watch my fingers not to do so I can also watch my fingers not to forget the second '='. But maybe this idea would be nice in new books for greenhorns. Schoolbooks like "Starting programming in C++" or so. They could start programming this good style.&lt;BR/&gt;&lt;BR/&gt;Whatever... this is a point of view I never had and so it is a very interesting post at all. Never the less the fact with the string is usefull! :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/2031598737530363497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/2031598737530363497'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1205835480000#c2031598737530363497' title=''/><author><name>knucKles</name><uri>http://www.blogger.com/profile/03143400354180065062</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp2.blogger.com/_jamSj_DbEjE/R39l7PutMSI/AAAAAAAAAZA/XXhHSMql2aI/S220/Zuckertuete+2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-53973091'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-3625720726127339477</id><published>2008-03-17T10:48:00.000-04:00</published><updated>2008-03-17T10:48:00.000-04:00</updated><title type='text'>Of course, string.Equals(s1,s2,a3) does not throw ...</title><content type='html'>Of course, string.Equals(s1,s2,a3) does not throw a NullPointerException whereas string.Equals(s1, a3) does...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/3625720726127339477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/3625720726127339477'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1205765280000#c3625720726127339477' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1615711841'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-3122238079745902039</id><published>2008-02-18T12:44:00.000-05:00</published><updated>2008-02-18T12:44:00.000-05:00</updated><title type='text'>Brian: Good point about NUnit's AreEqual(x,y) orde...</title><content type='html'>Brian: Good point about NUnit's AreEqual(x,y) order. I never made the connection. &lt;BR/&gt;&lt;BR/&gt;I use Visual Studio 2008's built in unit testing and they copied NUnit's precedent (from JUnit probably). It seems that &lt;I&gt;that&lt;/I&gt; particular order has now become defacto for assertions. &lt;BR/&gt;&lt;BR/&gt;There is some resemblance to the order of the "source" and "destination" variables in the standard C string libraries (where destination comes first). &lt;BR/&gt;&lt;BR/&gt;In that case, it doesn't make as much sense to me why the subject (source) comes after the object (destination).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/3122238079745902039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/3122238079745902039'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1203356640000#c3122238079745902039' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-5933277929181166048</id><published>2008-02-18T12:23:00.000-05:00</published><updated>2008-02-18T12:23:00.000-05:00</updated><title type='text'>Beautiful post.  Thanks for sharing the history le...</title><content type='html'>Beautiful post.  Thanks for sharing the history lesson on the Koite-Greek language, I have never heard about it before.  &lt;BR/&gt;&lt;BR/&gt;In NUnit, whenever you want to assert an expectation, the first parameter is always the "expected" value, then the "actual" value, i.e., Assert.AreEqual(expectedValue, actualValue).  I think the same logic should be apply in the boolean conditions (if expectedValue == actualValue)...&lt;BR/&gt;&lt;BR/&gt;But even though I say that, I myself prefer to write the if (actualValue == expectedValue) for the only reason that I'm used to it.  But that's not a good reason! Even though changing a programming style is hard, it is not impossible.  And like you said, it sure minimizes the possiblities of runtime errors or bugs in the long run.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/5933277929181166048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/5933277929181166048'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1203355380000#c5933277929181166048' title=''/><author><name>Brian Di Croce</name><uri>http://blog.briandicroce.com</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-262776175'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-19207788448248014</id><published>2008-02-16T19:36:00.000-05:00</published><updated>2008-02-16T19:36:00.000-05:00</updated><title type='text'>Interesting. I should look at more Python code.</title><content type='html'>Interesting. I should look at more Python code.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/19207788448248014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/19207788448248014'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1203208560000#c19207788448248014' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8364992076799774875</id><published>2008-02-16T17:40:00.000-05:00</published><updated>2008-02-16T17:40:00.000-05:00</updated><title type='text'>its seems kinda python to do it that way.&lt;br&gt;many ...</title><content type='html'>its seems kinda python to do it that way.&lt;BR/&gt;many of the examples ive studies while learning python the past year have been just like this. for example &lt;BR/&gt;" ".join(someString)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8364992076799774875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8364992076799774875'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1203201600000#c8364992076799774875' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1917344300'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8774355337264644836</id><published>2008-01-26T07:56:00.000-05:00</published><updated>2008-01-26T07:56:00.000-05:00</updated><title type='text'>Brian,&lt;br&gt;&lt;br&gt;I wish it was more common practice. ...</title><content type='html'>Brian,&lt;BR/&gt;&lt;BR/&gt;I wish it was more common practice. I think that if it had been like this from the early days, it would have saved our industry countless hours of grief like you mentioned. &lt;BR/&gt;&lt;BR/&gt;Unfortunately, it's almost too entrenched in our way of thinking. At least C# makes it harder to do the first (value = constant) in a place where a boolean is expected. Unfortunately, it offers no help in the string comparison example. Hopefully Spec#'s ideas will creep into C# and help eliminate those.&lt;BR/&gt;&lt;BR/&gt;However, you could be a revolutionary and use it in your own code :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8774355337264644836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8774355337264644836'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1201352160000#c8774355337264644836' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-5541786249324647425</id><published>2008-01-26T00:00:00.000-05:00</published><updated>2008-01-26T00:00:00.000-05:00</updated><title type='text'>It really seems that something that is this simple...</title><content type='html'>It really seems that something that is this simple and this right should just be done.  I speak English, and I don't have a hard time following the code this way.&lt;BR/&gt;&lt;BR/&gt;I also don't know how many times I've debugged the "if (this = 5)" type of code when I meant "if (this == 5)".&lt;BR/&gt;&lt;BR/&gt;Although, instead of "5", it would probably be some kind of enum, which I don't think can be assigned to either so it would work the same.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/5541786249324647425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/5541786249324647425'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1201323600000#c5541786249324647425' title=''/><author><name>Brian Lakstins</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-702809713'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-4835987877496423357</id><published>2008-01-23T18:48:00.000-05:00</published><updated>2008-01-23T18:48:00.000-05:00</updated><title type='text'>I thought the "constant".Equals(...) trick was cle...</title><content type='html'>I thought the "constant".Equals(...) trick was clever when I read it. I wonder how weird the approach feels to people who read right to left (e.g. Hebrew natives)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/4835987877496423357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/4835987877496423357'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1201132080000#c4835987877496423357' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-252333216'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8503271327836668559</id><published>2008-01-23T12:32:00.000-05:00</published><updated>2008-01-23T12:32:00.000-05:00</updated><title type='text'>interesting idea!&lt;br&gt;&lt;br&gt;I wonder if this already ...</title><content type='html'>interesting idea!&lt;BR/&gt;&lt;BR/&gt;I wonder if this already falls under the category "too clever".</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8503271327836668559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/4759922338859758365/comments/default/8503271327836668559'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html?showComment=1201109520000#c8503271327836668559' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/01/constants-on-left-are-better-but-this.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-4759922338859758365' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/4759922338859758365' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-300403505'/></entry></feed>
