<?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-588314958512864406.comments</id><updated>2009-03-20T14:10:31.779-07:00</updated><title type='text'>Corey's Ramblings</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://coreysramblings.blogspot.com/feeds/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/comments/default'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Corey Haines</name><uri>http://www.blogger.com/profile/06863615802688642075</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='32' src='http://2.bp.blogspot.com/_dYi-rTxxT2o/SXPhBn4-19I/AAAAAAAAB8g/cBCPoilslpE/S220/3187276048_580e77883b-1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-3732951723899729771</id><published>2009-03-20T14:10:00.000-07:00</published><updated>2009-03-20T14:10:00.000-07:00</updated><title type='text'>Hey meme!&lt;br&gt;&lt;br&gt;You look tired in that one! ;)</title><content type='html'>Hey meme!&lt;BR/&gt;&lt;BR/&gt;You look tired in that one! ;)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/759678129970242592/comments/default/3732951723899729771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/759678129970242592/comments/default/3732951723899729771'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/03/me-meme.html?showComment=1237583400000#c3732951723899729771' title=''/><author><name>Enrique</name><uri>http://www.blogger.com/profile/05624730331287877173</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://coreysramblings.blogspot.com/2009/03/me-meme.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-759678129970242592' source='http://www.blogger.com/feeds/588314958512864406/posts/default/759678129970242592' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-339013511'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 20, 2009 2:10 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-6436589367610179197</id><published>2009-03-20T14:09:00.000-07:00</published><updated>2009-03-20T14:09:00.000-07:00</updated><title type='text'>Corey, you look sad today. What's up?</title><content type='html'>Corey, you look sad today. What's up?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/759678129970242592/comments/default/6436589367610179197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/759678129970242592/comments/default/6436589367610179197'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/03/me-meme.html?showComment=1237583340000#c6436589367610179197' title=''/><author><name>Dave Hoover</name><uri>http://www.blogger.com/profile/11416140599591449857</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='20' height='32' src='http://redsquirrel.com/dave/hoovertree.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://coreysramblings.blogspot.com/2009/03/me-meme.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-759678129970242592' source='http://www.blogger.com/feeds/588314958512864406/posts/default/759678129970242592' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1797032967'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='March 20, 2009 2:09 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-6469054112379957220</id><published>2009-01-29T15:25:00.000-08:00</published><updated>2009-01-29T15:25:00.000-08:00</updated><title type='text'>Corey,&lt;br&gt;I think the last snippet is very clear, ...</title><content type='html'>Corey,&lt;BR/&gt;I think the last snippet is very clear, but I'm not convinced it's an improvement (admittedly per my definition of clarity) over the first snippet, which is already very clear.&lt;BR/&gt;&lt;BR/&gt;One way to get better code clarity is with simple descriptive methods, like what you've got within the utility class. An entire codebase can also have a sense of clarity to it. I wonder if you've sacrificed the clarity of the codebase as a whole for a too small improvement to the clarity of the first snippet.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/6469054112379957220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/6469054112379957220'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html?showComment=1233271500000#c6469054112379957220' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/00271354852417851254</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://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-1631335358250520549' source='http://www.blogger.com/feeds/588314958512864406/posts/default/1631335358250520549' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-47730916'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 29, 2009 3:25 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-1096063640944663082</id><published>2009-01-29T13:53:00.000-08:00</published><updated>2009-01-29T13:53:00.000-08:00</updated><title type='text'>@Mark&lt;br&gt;&lt;br&gt;I'd be very interested what you mean ...</title><content type='html'>@Mark&lt;BR/&gt;&lt;BR/&gt;I'd be very interested what you mean when you say that the last snippet isn't "clear." I'm finding that different people have different meanings for their usage.&lt;BR/&gt;&lt;BR/&gt;For me, something like&lt;BR/&gt;NewThing().WithAnOffsetDueDateInDays(5)&lt;BR/&gt;is very clear: it is creating a new thing and setting the due date to an offset. Perhaps a name change, though, would make it clearer.&lt;BR/&gt;NewThings().WithADueDateOffsetInDays(5)&lt;BR/&gt;Hmm.... I think I like that better. It makes it even more clear that it is setting the DueDate that way.&lt;BR/&gt;Perhaps even&lt;BR/&gt;.WithADueDateOffsetFromTodayInDays(5)&lt;BR/&gt;Now that I think about it, I think I like that even better.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/1096063640944663082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/1096063640944663082'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html?showComment=1233265980000#c1096063640944663082' title=''/><author><name>Corey Haines</name><uri>http://www.blogger.com/profile/06863615802688642075</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='32' src='http://2.bp.blogspot.com/_dYi-rTxxT2o/SXPhBn4-19I/AAAAAAAAB8g/cBCPoilslpE/S220/3187276048_580e77883b-1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-1631335358250520549' source='http://www.blogger.com/feeds/588314958512864406/posts/default/1631335358250520549' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-829038111'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 29, 2009 1:53 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-2636001391646335653</id><published>2009-01-29T13:48:00.000-08:00</published><updated>2009-01-29T13:48:00.000-08:00</updated><title type='text'>@Mark&lt;br&gt;&lt;br&gt;I'm finding, as I talk to more and mo...</title><content type='html'>@Mark&lt;BR/&gt;&lt;BR/&gt;I'm finding, as I talk to more and more people, that "clear" is often a matter of time and experience with new things (good example is foreach loops vs iterator methods). I would much prefer to continue the implementation with the technique that @fallenrogue outlines in his comment, but I'm a bit lazy on that respect.&lt;BR/&gt;&lt;BR/&gt;I don't tend to judge things based on the number of lines of code vs the number of classes. Instead, I strive to eliminate duplication. Often times, this leads to more classes in order to hold the extraction.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/2636001391646335653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/2636001391646335653'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html?showComment=1233265680000#c2636001391646335653' title=''/><author><name>Corey Haines</name><uri>http://www.blogger.com/profile/06863615802688642075</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='32' src='http://2.bp.blogspot.com/_dYi-rTxxT2o/SXPhBn4-19I/AAAAAAAAB8g/cBCPoilslpE/S220/3187276048_580e77883b-1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-1631335358250520549' source='http://www.blogger.com/feeds/588314958512864406/posts/default/1631335358250520549' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-829038111'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 29, 2009 1:48 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-8620648393882304756</id><published>2009-01-29T13:41:00.000-08:00</published><updated>2009-01-29T13:41:00.000-08:00</updated><title type='text'>I'm not feeling it.&lt;br&gt;You're first snippet is not...</title><content type='html'>I'm not feeling it.&lt;BR/&gt;You're first snippet is not "fluent" but it is clear, nonetheless.&lt;BR/&gt;&lt;BR/&gt;While your last snippet is "fluent", it isn't any more clear _and_ you've introduced a ThingsTestingUtilities class that holds two methods to do what you originally did in one line.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/8620648393882304756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/8620648393882304756'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html?showComment=1233265260000#c8620648393882304756' title=''/><author><name>Mark</name><uri>http://www.blogger.com/profile/00271354852417851254</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://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-1631335358250520549' source='http://www.blogger.com/feeds/588314958512864406/posts/default/1631335358250520549' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-47730916'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 29, 2009 1:41 PM'/></entry><entry><id>tag:blogger.com,1999:blog-588314958512864406.post-2631144907805301211</id><published>2009-01-29T13:37:00.000-08:00</published><updated>2009-01-29T13:37:00.000-08:00</updated><title type='text'>Harman's right, you can do something like&lt;br&gt;+++++...</title><content type='html'>Harman's right, you can do something like&lt;BR/&gt;+++++++++&lt;BR/&gt;public static class ThingTestingUtilities {&lt;BR/&gt;  public static DateTime days(this int input) {&lt;BR/&gt;    return DateTime.Now.AddDays(input);&lt;BR/&gt;  }&lt;BR/&gt;}&lt;BR/&gt;+++++++++&lt;BR/&gt;&lt;BR/&gt;Which will give you the sugar you want. Otherwise, C#'s fake "composition" is extension methods. my only hold up is that it's halfway to what you'd REALLY want to write and maintain. It's a good technique that I'm using more and more to eliminate inheritance hierarchies. &lt;BR/&gt;&lt;BR/&gt;Since inheritance is flawed in C# (I would argue completely fucking brokenzorz) extension methods, for composition, is the best that you're going to get in C#. Looks good man. Now come to Dayton and we'll go nutz with this shit.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/2631144907805301211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/588314958512864406/1631335358250520549/comments/default/2631144907805301211'/><link rel='alternate' type='text/html' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html?showComment=1233265020000#c2631144907805301211' title=''/><author><name>fallenrogue</name><uri>http://www.fallenrogue.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/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://coreysramblings.blogspot.com/2009/01/test-utilities-using-extension-methods.html' ref='tag:blogger.com,1999:blog-588314958512864406.post-1631335358250520549' source='http://www.blogger.com/feeds/588314958512864406/posts/default/1631335358250520549' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1787761709'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.displayTime' value='January 29, 2009 1:37 PM'/></entry></feed>
