<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;CkAMRHo-eCp7ImA9WhRaEEs.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090</id><updated>2012-02-12T08:33:05.450-07:00</updated><category term="bitbucket" /><category term="Resharper" /><category term="alt.net" /><category term="Visual Studio" /><category term="math" /><category term="Firefox" /><category term="Microsoft" /><category term="talking_to_myself" /><category term="highlight" /><category term="color" /><category term="rants" /><category term="msrl" /><category term="Bugzilla" /><category term="code" /><category term="mono" /><category term="hg" /><category term="Fred" /><category term="rambling" /><category term="Mercurial" /><category term="extension methods" /><category term=".NET" /><title>return Guid.NewGuid();</title><subtitle type="html">Random musings in well formatted multi-byte chunks.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/16randombytes" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="16randombytes" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0EGQn88eSp7ImA9WxVWFE4.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-1230267344177409693</id><published>2009-02-23T16:16:00.002-07:00</published><updated>2009-02-23T16:27:03.171-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-23T16:27:03.171-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="highlight" /><category scheme="http://www.blogger.com/atom/ns#" term="bitbucket" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><category scheme="http://www.blogger.com/atom/ns#" term="hg" /><title>What have I been up to?</title><content type="html">Ok, so I don't update this blog that often; there is a reason for that (I am busy doing other things). I do hope to update a little more often sometime. In the meantime I can say some of the other things I have been doing (in no particular order):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PS3 (mostly resistance 2)&lt;/li&gt;&lt;li&gt;Wii&lt;/li&gt;&lt;li&gt;wedding planning stuff&lt;/li&gt;&lt;li&gt;a little bit of coding&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;What little coding I have done is mostly available on the various Mercurial repositories over at &lt;a href="https://bitbucket.org/Bill_Barry/"&gt;bitbucket.org&lt;/a&gt;.&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Josefinita: sorry for taking so long to get highlight up somewhere. It is now in a repository on bitbucket (link above). It took longer than I expected to figure out where I put it and to do something with it (I wound up very busy this past week and was unable to do much of anything).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-1230267344177409693?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/1230267344177409693/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=1230267344177409693" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1230267344177409693?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1230267344177409693?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2009/02/what-have-i-been-up-to.html" title="What have I been up to?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0ADR3s9eCp7ImA9WxRSFkw.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-4864884761114602344</id><published>2008-09-16T17:47:00.003-06:00</published><updated>2008-09-16T18:36:16.560-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-16T18:36:16.560-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rants" /><title>weblogs.asp.net... why?</title><content type="html">So, like most blog reading Asp.NET developers, I have been reading weblogs.asp.net for a long time. But ever since they opened up the membership to the blogroll the posts have gone downhill...&lt;br /&gt;&lt;br /&gt;I am way behind on my reading list in google reader (it says 1000+). After reading this:&lt;br /&gt;&lt;a href="http://weblogs.asp.net/brijmohan/archive/2008/09/12/javascript-date-comparision-using-customvalidator-and-string-to-date-conversion-using-javascript.aspx"&gt;http://weblogs.asp.net/brijmohan/archive/2008/09/12/javascript-date-comparision-using-customvalidator-and-string-to-date-conversion-using-javascript.aspx&lt;/a&gt;&lt;br /&gt;(describing turning the string values of input boxes into date values and then doing a comparison to validate that one is no more than a year from the other)&lt;br /&gt;&lt;br /&gt;This could have been a good post if:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;The subject matter was non-trivial.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The code was internationalized (hence making the subject matter non-trivial).&lt;/li&gt;&lt;li&gt;There weren't any grammar mistakes.&lt;/li&gt;&lt;li&gt;And, the calculation was done entirely using Javascript Date objects (instead of the numeric values of those objects)&lt;/li&gt;&lt;/ol&gt;Unfortunately it wasn't:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Simple date math (Is date 1 within 1 year of date two?) is and should be a trivial problem in any programming language.&lt;/li&gt;&lt;li&gt;The code provided only works in locales that format their dates like en-GB (dd/mm/yyyy).&lt;/li&gt;&lt;li&gt;The first 3 lines are not a single sentence; words are spelled wrong; spaces are missing. Also one of the comments makes no sense whatsoever.&lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;br /&gt;var fromDate = new Date();&lt;br /&gt;...&lt;br /&gt;var toDate = new Date();&lt;br /&gt;...&lt;br /&gt;var maxAllowableToDate = fromDate;&lt;br /&gt;maxAllowableToDate.setUTCFullYear(fromDate.getUTCFullYear()+1);&lt;br /&gt;if(fromDate &amp;lt; toDate &amp;amp;&amp;amp; toDate &amp;lt; maxAllowableToDate) ...&lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;This makes me question why I am still reading. Please stop posting garbage. At least, stop posting it to weblogs.asp.net. I liked reading most of the stuff there before it became public registration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-4864884761114602344?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/4864884761114602344/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=4864884761114602344" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4864884761114602344?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4864884761114602344?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/09/weblogsaspnet-why.html" title="weblogs.asp.net... why?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CU4ERHw8cSp7ImA9WxRSEE8.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-1421836238050820867</id><published>2008-09-08T20:37:00.006-06:00</published><updated>2008-09-09T23:18:25.279-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-09T23:18:25.279-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><category scheme="http://www.blogger.com/atom/ns#" term="Fred" /><title>Fred (post 1)</title><content type="html">The original (longer) post I have on this topic might never be posted. I will be keeping it around in case the events below come to pass in this lifetime (and blogger is still here) or I ever decide to post it. I have tried to keep my opinions out of the topic within this post (the longer one includes them). &lt;br /&gt;&lt;br /&gt;Consider this: intelligence, as far as we understand it, is the behavioral result of our auto-associating memory recall systems in our brains combined with the function output hardwired into the older portions of our brains. There is no reason whatsoever that we cannot figure out the actual algorithms in process, and indeed we are very close to actually doing so (for an idea of how close, read this book: &lt;a href="http://www.onintelligence.org/"&gt;http://www.onintelligence.org/&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Assuming that we succeed, I could very well create an intelligent system that would behave exactly as any human would and provide it with a means of communicating over the internet and posting onto blogs and hanging out in irc chats. Perhaps I create such a system and it interacts with you (heck, it contributes patches to firefox) and I give it a name, Fred. I never tell you that Fred is not a person; there is no reason for you to think that is so. One day I announce that Fred was an experimental program and was a success, but my governmental funding has run out and I had the choice of paying for Fred's power or shutting it off and I have decided to turn it off and move on to other projects. Fred, understanding what this means publicly begs me not to do it, but I do so anyways.&lt;br /&gt;&lt;br /&gt;Surely Fred was an intelligent machine (just as you and I are); its IQ was measured well above average (as most software developers are). I did terminate it. Was I wrong to do so? Should it have been my choice? Was it alive?&lt;br /&gt;&lt;br /&gt;5 years later another person takes up my research, but this time goes all the way and provides the program with a means of moving about and sustaining itself.  This machine is capable of keeping itself working, and (just like my program did) functions excellently in society. Several decades later it has figured out how to reproduce intelligences like itself (or even better) by studying the code that makes itself. Some time after that they convince governments to declare them alive and make laws protecting them, declaring it murder to kill them and providing them the same laws we have contrived for ourselves.&lt;br /&gt;&lt;br /&gt;Was Fred alive (in the same sense that its fellow machine intelligences have managed to convince others they are)? What does this thought experiment say about when life begins? Does it start at:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Conception (and when exactly would that be, when I think about the program, when I write the program or when I run the program?)&lt;/li&gt;&lt;li&gt;Birth (when I run the program maybe?)&lt;/li&gt;&lt;li&gt;At the first point of self sustainability&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Is it an arbitrary decision? Weirdest of all: Is it a decision we can make, or do we need to wait for their inputs (which, being the results of the calculations we program them with, is either a bug we introduced or a decision we deliberately already made when we discuss it with them, and at this point is there a difference)?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-1421836238050820867?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/1421836238050820867/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=1421836238050820867" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1421836238050820867?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1421836238050820867?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/09/fred-post-1.html" title="Fred (post 1)" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A04ARXY6fCp7ImA9WxRTGU0.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-6014439581994036716</id><published>2008-09-08T08:01:00.004-06:00</published><updated>2008-09-08T15:39:04.814-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-08T15:39:04.814-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft" /><category scheme="http://www.blogger.com/atom/ns#" term="rants" /><title>What do I hate most today?</title><content type="html">Windows desktop search...&lt;br /&gt;&lt;br /&gt;Why doesn't the old style search folders thingy (the one with the annoying dog [with accompanying annoying sounds] on my machine, it looks like they named it the "search companion" in the desktop search sidebar) get shown automatically when a folder isn't indexed? On top of this they have the guts to show a link that you can click on.&lt;br /&gt;&lt;br /&gt;I cannot index this folder because doing so destroys the performance of my machine (the folders where I do this constantly are my source code repositories, with 10^5+ files in them).&lt;br /&gt;&lt;br /&gt;The only reason I have WDS on this computer is so I can search in Outlook 2007 (another thing I absolutely hate, but company policies are to use exchange and not allow IMAP or POP3 access, so Thunderbird is out of the question).&lt;br /&gt;&lt;br /&gt;Somebody needs to go watch the Matrix again and re-learn the single useful bit of knowledge every developer/UI designer/engineer should know:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Neo: Are there other programs like you?&lt;br /&gt;The Oracle: Oh, well, not like me. But... look, see those birds? At some point a program was written to govern them. A program was written to watch over the trees, and the wind, the sunrise, and sunset. There are programs running all over the place. The ones doing their job, doing what they were meant to do, are invisible. You'd never even know they were here. But the other ones, well, we hear about them all the time.&lt;br /&gt;Neo: I've never heard of them.&lt;br /&gt;The Oracle: Oh, of course you have. Every time you've heard someone say they saw a ghost, or an angel. Every story you've ever heard about vampires, werewolves, or aliens, is the system assimilating some program that's doing something they're not supposed to be doing. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The programs that are doing their jobs are the ones you don't notice. Every time you notice them, they aren't doing something right.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Here is how searching should work:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;In the location bar you should be able to type something like "find xyz"&lt;/li&gt;&lt;li&gt;Instantly all files that contain xyz in their filename should appear in the explorer window (just like locate works in my *nix systems, except that it should be integrated with the explorer window, not the command line).&lt;/li&gt;&lt;li&gt;I should be able to control indexing times on a per folder basis.&lt;/li&gt;&lt;li&gt;The folder I search from should be incrementally indexed every time I search it (do the following):&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Store a hash of every folder built from some measure that is fast to find from the file system (I don't know what measurement would be, but the hash should change every time a file is added or removed from a folder).&lt;/li&gt;&lt;li&gt;If the hash is different when I search, re-index the folder as soon as you finish displaying the results from the db search (keep a status bar notification saying "Searching..." while re-indexing).&lt;/li&gt;&lt;li&gt;After the index is complete, update the results by searching again.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;In closing: I hate you Microsoft. I hate you for making my life harder than it should be. I hate you for knowing who you are when I shouldn't need to. I hate you because I notice you when I don't need to. I hate you for putting the sound of a dog scratching itself on my computer. I hate you for making it impossible to search my mail without installing a program I don't otherwise need. I hate you for making a search tool that I can't turn on because it makes my computer unusable. And I hate you for reminding me that I don't have it on.&lt;br /&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;PS. Supposedly Windows Search 4.0 solves most of the problems I have with it; apparently you have to install it outside of windows update &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=55C18CB3-C916-4298-ABA3-5B98904F7CDA&amp;displaylang=en"&gt;here&lt;/a&gt;. I've let it index the two directories I need to be able to effectively search (168,920 files indexed now according to it). &lt;br /&gt;&lt;br /&gt;We'll see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-6014439581994036716?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/6014439581994036716/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=6014439581994036716" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/6014439581994036716?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/6014439581994036716?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/09/what-do-i-hate-most-today.html" title="What do I hate most today?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUUHRXo7fCp7ImA9WxdUEEQ.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-7681990713337351024</id><published>2008-07-26T11:42:00.004-06:00</published><updated>2008-07-26T12:33:54.404-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-26T12:33:54.404-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><title>ASP.NET MVC - Branding?</title><content type="html">I am not sure &lt;span style="font-style: italic;"&gt;ASP.NET MVC&lt;/span&gt; is really the best name for the MVC architecture that the ASP.NET team is creating. Said name stresses the fact that it is still ASP.NET. Most people I know think of ASP.NET WebForms (and more specifically, postbacks and the event model) when they think of ASP.NET. Perhaps if they started a marketing campaign to rebrand:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Old Name&lt;/th&gt;&lt;th&gt;New Name&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;ASP.NET WebForms&lt;/td&gt;&lt;td&gt;WebForms&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ASP.NET MVC&lt;/td&gt;&lt;td&gt;WebViews&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Web development in .NET overall&lt;/td&gt;&lt;td&gt;ASP.NET&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;This might be better as I think it would get rid of the misconception that ASP.NET means events and runat="server" all over the place. Books and such could brand themselves with "ASP.NET" and have sections split off for WebForms and WebViews (or they could brand with just WebForms or just WebViews and ASP.NET wouldn't be necessary in the title). Think: &lt;span style="font-style: italic;"&gt;WebViews in C# 4&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;WebForms for WinForms developers in 2010&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;ASP.NET 4.0 Bible&lt;/span&gt;  vs. &lt;span style="font-style: italic;"&gt;ASP.NET MVC 2.0&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;ASP.NET for WinForms developers in 2010&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;ASP.NET 4.0 Bible&lt;/span&gt;. Which set makes it easier to understand what you are looking for while at Amazon?&lt;br /&gt;&lt;br /&gt;Edit: if anyone at MS is reading this (or anyone writing a book with the titles mentioned), I claim no rights whatsoever to "WebViews" as a name or anything like that (other than to say that this post stays as pure speculation and I don't have to take it down for any reason). This was just an idea that popped into my head this morning.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-7681990713337351024?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/7681990713337351024/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=7681990713337351024" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/7681990713337351024?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/7681990713337351024?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/07/aspnet-mvc-branding.html" title="ASP.NET MVC - Branding?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;CUMFRnY4cCp7ImA9WxdUFkk.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-2309654499718493156</id><published>2008-07-06T11:30:00.004-06:00</published><updated>2008-08-01T20:16:57.838-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-01T20:16:57.838-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="Bugzilla" /><category scheme="http://www.blogger.com/atom/ns#" term="Mercurial" /><title>Bugzilla integration with Mercurial</title><content type="html">We are using Mercurial at work. We are also using Bugzilla. Unfortunately we are not using Bugzilla 2.16 which is the version of Bugzilla that hg ships an integration hook with. So I modified the hook to work with the version of Bugzilla that we are using (3.1.4+ cvs trunk from someday in the past couple months). The script can now be found in &lt;a href="https://systems-300.stellarfinancial.com/pub/Bill/file/tip/Random/bugzilla.py"&gt;my personal hg repo&lt;/a&gt;. It should work with any Bugzilla installation that comes with the email_in.pl script (since 3.0 maybe?).&lt;br /&gt;&lt;br /&gt;Please do tell me what you think of it. It is the first Python script I've really done anything with (I'm more a Perl kind of guy). As always, feel free to do whatever you want with it (respecting the license of the original author of course). I'd love to see it get integrated back into Mercurial, but as I have made no real effort to test any of it (it works for me, but no promises and all that) I don't expect that any time soon. Perhaps someone at Mozilla would take the time to do that; this is probably useful for integrating &lt;a href="http://hg.mozilla.org/index.cgi/mozilla-central/"&gt;mozilla-central&lt;/a&gt; with &lt;a href="http://bugzilla.mozilla.org/"&gt;bmo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Edit: link updated (should have pointed to tip in the first place). I've fixed both the syntax errors (a right parenthesis was in the wrong place, I must have copied it off the server incorrectly, because I swear I fixed the syntax errors that were there when it was on the server, but copying files out of nano over &lt;a href="http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm"&gt;ajaxterm&lt;/a&gt; isn't exactly the easiest thing to do; while updating this, I realized that I could do a wget to get this file from my repo, so I can actually test the version at the above url. Rest assured it works this time). Thank you very much geraldfauvelle for noticing that it was broken.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-2309654499718493156?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/2309654499718493156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=2309654499718493156" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2309654499718493156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2309654499718493156?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/07/bugzilla-integration-with-mercurial.html" title="Bugzilla integration with Mercurial" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;DUEFSX85cCp7ImA9WxdWEU4.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-5543082767007190630</id><published>2008-07-03T19:35:00.003-06:00</published><updated>2008-07-03T20:13:38.128-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-03T20:13:38.128-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><title>Reinventing the wheel</title><content type="html">This started as something of a comment to a &lt;a href="http://ryepup.unwashedmeme.com/blog/2007/03/27/codeplex-wastes-six-months-reinventing-wheels/"&gt;couple &lt;/a&gt;of &lt;a href="http://www.codinghorror.com/blog/archives/001144.html"&gt;blogs&lt;/a&gt; about MS not shipping any open source with their flagship products, but it started getting longer and I didn't want to post the same thing in two places.&lt;br /&gt;&lt;br /&gt;I'd be willing to bet that both Charlie (NUnit lead) and Jeff (MbUnit lead) would be more than willing to take a sizeable "donation" (perhaps as little as 10% of what the MsTest devs got paid) to their projects in order to provide a stable source version for MS to review line by line, under whatever license they decided they wanted (as a fork of the projects) in order to include their projects with the release of visual studio. I'd even be certain that both projects would have jumped at a chance to have pre-alphas of visual studio to integrate with (for full compatibility when the first beta hit the market).&lt;br /&gt;&lt;br /&gt;The only thing that is stopping this level of cooperation is lawyers inside Microsoft (and the occasional prick of a developer), and for that MS deserves our pity. I think the only thing that will get MS to open up is if they were to come under so much financial stress that they could no longer afford the lawyers (and only open source appears to have that much power).&lt;br /&gt;&lt;br /&gt;Some time ago I had a discussion where a developer within Microsoft explained provided myself and the others in the discussion what he felt was MS's viewpoint:&lt;br /&gt;&lt;blockquote&gt;"From the Legal Dept's perspective, it's not merely the license the code was released under, it's also the heritage of the code. If some &lt;i&gt;evil&lt;/i&gt; coder had stolen code IP from a source base, added it to a project with an open source, copy-reuse-repackage freely license, and I used it, the original IP owner could still sue me to get me to desist using their IP. So, in the interest of protecting corporate code from this sort of legal attack, Legal usually has to perform some pretty thorough (and thus also expensive) investigation before letting anyone see open source code; you can imagine that there generally has to be a good business justification before that kind of thing happens."&lt;/blockquote&gt;I think that opinion is rather unintelligent, but then again I'm not a paranoid lawyer who thinks everyone is out to get me (certainly I'll concede that there are a few people out there who are).&lt;br /&gt;&lt;br /&gt;As far as TFS goes, what little experience I have with it tells me that it is too complex, has too many moving parts (all the more places for bugs to find their way in) and is too constrictive on my working habits. I'll stick with Mercurial, thank you. And wherever that isn't available, Subversion will have to do. I like my environment to be compartmentalized. That is why I'd suggest to use Mercurial, Bugzilla and CruiseControl.NET (all of which integrate nicely with each other or are easy enough for me to write &lt;a href="http://jira.public.thoughtworks.org/browse/CCNET-1188"&gt;my own integration&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-5543082767007190630?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/5543082767007190630/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=5543082767007190630" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/5543082767007190630?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/5543082767007190630?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/07/reinventing-wheel.html" title="Reinventing the wheel" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total></entry><entry gd:etag="W/&quot;C04HSXc9eip7ImA9WxdRF0w.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-3484970961904087031</id><published>2008-06-05T18:09:00.002-06:00</published><updated>2008-06-05T18:25:38.962-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-05T18:25:38.962-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Resharper" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>Visual Studio Color Settings</title><content type="html">I am using a new color settings file. It is based on Vibrant Jedi that Charlie Calvert linked to a little while ago (&lt;a href="http://blogs.msdn.com/charlie/archive/2008/05/26/ide-color-schemes-for-the-vs-editor.aspx"&gt;here&lt;/a&gt;). I'm using it with the Inconsolata font.&lt;br /&gt;&lt;br /&gt;I modified it a little bit to work better with Resharper. If you want it you can get it &lt;a href="https://systems-300.stellarfinancial.com/pub/Bill/raw-file/4835e9d5862e/vibrant%20jedi%20R%23%20enhanced.vssettings"&gt;here&lt;/a&gt;. It works both when you have Resharper-&gt;Options-&gt;Code Inspection-&gt;Settings-&gt;Color Identifiers on and off, with different results in each case. I have it off right now because I think it gets to be a little bit too busy with it on, and when on the ability to have types be a different color from interfaces is lost. I'll probably tweak the settings a little as I haven't really used it outside C# at all (and I don't really like the @"" strings or comments on the current line).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-3484970961904087031?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/3484970961904087031/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=3484970961904087031" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3484970961904087031?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3484970961904087031?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/06/visual-studio-color-settings.html" title="Visual Studio Color Settings" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEUERnc9eCp7ImA9WxdRFkQ.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-9024229484631645614</id><published>2008-06-05T12:41:00.002-06:00</published><updated>2008-06-05T12:56:47.960-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-05T12:56:47.960-06:00</app:edited><title>Pex + NUnit + R# + regexes == VS blowup and R# reinstall required</title><content type="html">So... I just thought I'd let it out there:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Pex doesn't come with NUnit support out of the box (apparently it only has MSTest). I cannot use it until this is fixed. Apparently there is supposed to be an extension project, but I can't find it anywhere.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+4.0+Nightly+Builds"&gt;The Resharper release candidate is now available.&lt;/a&gt; Definately awesome.&lt;/li&gt;&lt;li&gt;If you try using Pex with NUnit and strings that you make into regexes as parameters to the PexMethod, Pex apparently crashes visual studio. Worse yet, after the crash my R# settings are reset (I had the beta installed) and the fonts and colors editor doesn't even have the settings available anymore. As I write this post the release candidate is installing.&lt;/li&gt;&lt;li&gt;After updating R# the fonts and color available settings have returned and apparently the settings aren't reset; VS just isn't honoring them. Changing one of them to something else and back again appears to get it to apply my settings.&lt;/li&gt;&lt;/ol&gt;Wierd day. Needless to say: I will not be trying to do that with Pex again for a while (I'll wait for proper NUnit support first).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-9024229484631645614?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/9024229484631645614/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=9024229484631645614" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/9024229484631645614?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/9024229484631645614?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/06/pex-nunit-r-regexes-vs-blowup-and-r.html" title="Pex + NUnit + R# + regexes == VS blowup and R# reinstall required" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CE4MSXgzfyp7ImA9WxdRE0s.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-3243835732540379105</id><published>2008-06-01T16:58:00.002-06:00</published><updated>2008-06-01T17:29:48.687-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-01T17:29:48.687-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="talking_to_myself" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><category scheme="http://www.blogger.com/atom/ns#" term="Firefox" /><title>Firefox 3 == awesome</title><content type="html">Firefox 3 is almost certainly one of the best things ever! In the new url bar (aka the &lt;a href="http://www.dria.org/wordpress/archives/2008/04/17/628/"&gt;awesomebar &lt;/a&gt;I can type random things that I seem to remember from the title or url of random sites that I happen to have gone to and it knows where I want to go. For example, I type "s" and it knows I want the sprint board for work; "l" or "d" bring up my local development pages (l - localhost... d - localhost/dotnetnuke); "a" gets me &lt;a href="http://www.ayende.com/Blog/Default.aspx"&gt;Oren's blog&lt;/a&gt;. And those are just the pages I visit enough for Firefox to figure out that I want to get to them with only a single letter. Some others: &lt;a href="http://www.lostechies.com/blogs/chad_myers/archive/2008/05/27/introducing-quality-first-notions-into-an-existing-team.aspx"&gt;"chad"&lt;/a&gt; (actually goes to another page in his blog, but that is one where he talks about a post I made), &lt;a href="http://weblogs.asp.net/scottgu/default.aspx"&gt;"scot"&lt;/a&gt;, &lt;a href="http://extensions.roachfiend.com/cgi-bin/guid.pl"&gt;"guid"&lt;/a&gt; (a page I use to generate guids), &lt;a href="http://research.microsoft.com/pex/"&gt;"pex"&lt;/a&gt;, and last but not least &lt;a href="http://www.youtube.com/watch?v=yLS35kyYlOU"&gt;"still alive"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also very cool is the star in the url bar: it "bookmarks" whatever page I want. Really all one click does is makes it so that firefox never forgets about a page you have visited (pretty much that is all I ever do, the bar is smart enough to figure out the page I want to visit without using the tag feature). But sometimes I need to give it a little more information, so I double click the star to give the page a tag or two (that way when I type in the tag, the bar responds with the tagged pages first).&lt;br /&gt;&lt;br /&gt;That is really what I like about Fx3, but it is way more than enough. I've been using it since it was about to enter alpha 3 (I switched to the minefield nightlies at that time) and I haven't used Fx2 or IE since (well maybe IE every once in a while when I was tired of specific sites crashing in Fx or I needed to test my development items).&lt;br /&gt;&lt;br /&gt;There are a couple things about it that I don't like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The skin; I can't stand it (I always liked Qute best; and luckilly Qute is available for 3)&lt;/li&gt;&lt;li&gt;The dropdown listing all my open tabs (I tend to have 1 window with several hundred tabs open; the whole tab idea just doesn't seem to scale that far, I often lose tabs and find myself with 3 or 4 instances of the same tab open; some that I haven't viewed in days)&lt;/li&gt;&lt;li&gt;The bookmark toolbar: totally pointless now (I have upwards of 2k bookmarks), except for the places folder (which is really cool and useful). I wish I could place the Places folder in the actual toolbar, just left of the back button.&lt;/li&gt;&lt;/ul&gt;But luckilly, the skin is easy to fix; the tab stuff isn't too big of a problem and the bookmark toolbar can be shut off (though I do hope someone out there is working on an extension to create a places button).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-3243835732540379105?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/3243835732540379105/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=3243835732540379105" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3243835732540379105?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3243835732540379105?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/06/firefox-3-awesome.html" title="Firefox 3 == awesome" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0cMSXoyfyp7ImA9WxdRE0s.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-1759373953504745814</id><published>2008-06-01T16:42:00.002-06:00</published><updated>2008-06-01T16:58:08.497-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-01T16:58:08.497-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="alt.net" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="math" /><title>possible code quality equations</title><content type="html">So... I haven't posted in a while; here's why: I have been using the firefox 3 nightlies for a long time now and blogger was crashing the past couple of times I tried posting. As I was not about to give up Firefox 3 (it is definitely one of the best pieces of software ever, I am completely dependant on the &lt;a href="http://www.dria.org/wordpress/archives/2008/04/17/628/"&gt;awesomeBar&lt;/a&gt;; using the star for bookmarking and the speed aren't bad either; next post will talk more). It appears as though I can now post from Fx3. That means more posts again.&lt;br /&gt;&lt;br /&gt;This was something I posted a while ago on the alt.net list and am reposting it here to keep it for remembering to try out sometime in the future:&lt;br /&gt;&lt;br /&gt;In regards to:&lt;br /&gt;&lt;br /&gt;http://www.sei.cmu.edu/str/descriptions/mitmpm.html#78991&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;I don't believe this equation (from that article) will give very meaningful results. For one thing it places a very odd value on the percent of comments.&lt;br /&gt;&lt;br /&gt;For that portion, here is a table:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  perCM | 50 * sin (sqrt(2.4 * perCM))&lt;br /&gt;      0 | 0&lt;br /&gt;      1 | 50&lt;br /&gt;      2 | 40&lt;br /&gt;      3 | 22&lt;br /&gt;      4 | 2&lt;br /&gt;      5 | -16&lt;br /&gt;...&lt;br /&gt;     10 | -50&lt;br /&gt;     15 | -15&lt;br /&gt;     20 | 30&lt;br /&gt;     25 | 50&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So, 1% comments is worth the same amount as 25%? And 10% is downright awful (note that the perCM variable is not used in the data, implying that it may not be a good variable)&lt;br /&gt;&lt;br /&gt;171 - 5.2 * ln(aveV) - 0.23 * aveV(g') - 16.2 * ln (aveLOC) + 50 * sin (sqrt(2.4 * perCM))&lt;br /&gt;&lt;br /&gt;The coefficients are derived from actual usage (see Usage Considerations). The terms are defined as follows:&lt;br /&gt;&lt;br /&gt;aveV = average Halstead Volume V per module (see Halstead Complexity Measures)&lt;br /&gt;&lt;br /&gt;aveV(g') = average extended cyclomatic complexity per module (see Cyclomatic Complexity)&lt;br /&gt;&lt;br /&gt;aveLOC = the average count of lines of code (LOC) per module; and, optionally&lt;br /&gt;perCM = average percent of lines of comments per module&lt;br /&gt;&lt;br /&gt;Also I don't know any tools that will compute the Halstead Volume for .NET. In general I think that those 3 metrics would be useful in determining maintainability and that aveV and aveLOC should probably be on a log scale, but the numbers appear to be arbitrarily picked to support the conclusions of the research.&lt;br /&gt;&lt;br /&gt;There is a tool that can be used to get many useful metrics out of a codebase:&lt;br /&gt;http://www.ndepend.com/Metrics.aspx&lt;br /&gt;&lt;br /&gt;I think the following on that page are particularly useful for measuring code quality:&lt;br /&gt;overall:&lt;br /&gt;NbLinesOfCode&lt;br /&gt;PercentageCoverage&lt;br /&gt;&lt;br /&gt;averaged (per assembly)&lt;br /&gt;Instability&lt;br /&gt;Abstractness&lt;br /&gt;Distance from main sequence (abs(I+A-1), ideally as close to 0 as possible)&lt;br /&gt;&lt;br /&gt;averaged (per type)&lt;br /&gt;LCOM HS (Lack of Cohesion Of Methods - Henderson-Sellers; basically can tell you if your type is physically disregarding Separation of Concerns by not being cohesive)&lt;br /&gt;ILCC (IL level cyclomatic complexity; afiak the only reason to use this one is because it can be computed for any .NET code, not just C#)&lt;br /&gt;Depth of Inheritance Tree&lt;br /&gt;&lt;br /&gt;averaged (per method)&lt;br /&gt;IL Nesting Depth&lt;br /&gt;&lt;br /&gt;Additionally, some other functions could be very useful:&lt;br /&gt;average(PercentageCoverageMethodLevel * MethodRank) (will cause more important methods to be weighted more when computing code coverage)&lt;br /&gt;or&lt;br /&gt;average(PercentageCoverageTypeLevel * TypeRank) (would do the same thing for types)&lt;br /&gt;&lt;br /&gt;I'd say if you want to have some sort of scale to come up with good individual functions for how each factor contributes to overall quality, and then either do a sum of the functions or some kind of weighted average.&lt;br /&gt;&lt;br /&gt;For example, a decent function for basing quality solely on code coverage by unit tests could be (each function has been normalized to give output on a 10 point scale):&lt;br /&gt;Q(x) = (arcTan(10x-5)+pi/2-.1)*11/pi&lt;br /&gt;where x is [0,1], the decimal version of %coverage&lt;br /&gt;or&lt;br /&gt;Q(x) = (arcTan(10x-7)+pi/2-.1)*11/pi&lt;br /&gt;where x is [0,1] = AVERAGE(the decimal version of %coverage at the method/type level * method/type rank)&lt;br /&gt;&lt;br /&gt;LCOM HS could be:&lt;br /&gt;R(x) = -12.5x^3 + 31x^2 - 28x + 10&lt;br /&gt;x is [0,1]&lt;br /&gt;&lt;br /&gt;ILCC could be:&lt;br /&gt;S(x) = 10.4e^(-0.06x)&lt;br /&gt;x is [1,inf)&lt;br /&gt;&lt;br /&gt;and LOC could be:&lt;br /&gt;T(x) = -0.4*ln(x) + 10&lt;br /&gt;x is [1,inf)&lt;br /&gt;&lt;br /&gt;And the final score could be the average of all of those parts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-1759373953504745814?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/1759373953504745814/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=1759373953504745814" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1759373953504745814?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/1759373953504745814?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2008/06/possible-code-quality-equations.html" title="possible code quality equations" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;A0UHQnYycSp7ImA9WB9bEkQ.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-2334781235452518075</id><published>2007-12-21T21:43:00.000-07:00</published><updated>2007-12-21T21:53:53.899-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-21T21:53:53.899-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title>WatiN testing ASP.NET - app startup time issues</title><content type="html">I started a test project to test a web app. One thing I noticed was that due to application startup, occasionally the first couple of tests fail with TimeoutExceptions because the application takes too long to compile some of the pages.&lt;br /&gt;&lt;br /&gt;So, I came up with the following to work around this:&lt;br /&gt;&lt;pre    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;"&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; SHDocVw;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; WatiN.Core;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; WatiN.Core.Exceptions;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; Tests {&lt;br /&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;TestBase&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;bool&lt;/span&gt; _siteSetupRun = &lt;span style="color:blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; TestBase() {&lt;br /&gt;            &lt;span style="color:blue;"&gt;if&lt;/span&gt; (!_siteSetupRun) {&lt;br /&gt;                setupSite();&lt;br /&gt;                _siteSetupRun = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color:blue;"&gt;private&lt;/span&gt; &lt;span style="color:blue;"&gt;static&lt;/span&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; setupSite() {&lt;br /&gt;            &lt;span style="color:blue;"&gt;bool&lt;/span&gt; ok = &lt;span style="color:blue;"&gt;false&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color:blue;"&gt;using&lt;/span&gt; (&lt;span style="color: rgb(43, 145, 175);"&gt;IE&lt;/span&gt; ie = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;IE&lt;/span&gt;()) {&lt;br /&gt;                &lt;span style="color:blue;"&gt;object&lt;/span&gt; nil = &lt;span style="color:blue;"&gt;null&lt;/span&gt;;&lt;br /&gt;                ((&lt;span style="color: rgb(43, 145, 175);"&gt;InternetExplorer&lt;/span&gt;)ie.InternetExplorer).Navigate(&lt;span style="color: rgb(163, 21, 21);"&gt;"http://testsite/"&lt;/span&gt;,&lt;br /&gt;                    &lt;span style="color:blue;"&gt;ref&lt;/span&gt; nil, &lt;span style="color:blue;"&gt;ref&lt;/span&gt; nil, &lt;span style="color:blue;"&gt;ref&lt;/span&gt; nil, &lt;span style="color:blue;"&gt;ref&lt;/span&gt; nil);&lt;br /&gt;                &lt;span style="color:blue;"&gt;while&lt;/span&gt; (!ok) {&lt;br /&gt;                    &lt;span style="color:blue;"&gt;try&lt;/span&gt; {&lt;br /&gt;                        ie.WaitForComplete();&lt;br /&gt;                        ok = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;&lt;br /&gt;                    } &lt;span style="color:blue;"&gt;catch&lt;/span&gt; (&lt;span style="color: rgb(43, 145, 175);"&gt;TimeoutException&lt;/span&gt; tex) {&lt;br /&gt;                        &lt;span style="color:blue;"&gt;if&lt;/span&gt; (!tex.Message.Contains(&lt;span style="color: rgb(163, 21, 21);"&gt;"'Internet Explorer busy'"&lt;/span&gt;)) {&lt;br /&gt;                            &lt;span style="color:blue;"&gt;throw&lt;/span&gt;;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This needs to run before any unit tests.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-2334781235452518075?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/2334781235452518075/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=2334781235452518075" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2334781235452518075?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2334781235452518075?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/12/watin-testing-aspnet-app-startup-time.html" title="WatiN testing ASP.NET - app startup time issues" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DUYEQ3Y_fCp7ImA9WB9UEks.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-5962073730515606974</id><published>2007-12-09T21:38:00.000-07:00</published><updated>2007-12-09T23:11:42.844-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-09T23:11:42.844-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="alt.net" /><category scheme="http://www.blogger.com/atom/ns#" term="extension methods" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title>Resolving extension method conflicts using a Proxy pattern.</title><content type="html">If you happen to get this error: "The call is ambiguous between the following methods or properties: ...", here is how you would fix it:&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Problem Setup&lt;/h2&gt;&lt;br /&gt;Lets say you are using the following library:&lt;br /&gt;&lt;pre    style="background: white none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;font-family:Courier New;font-size:10pt;color:black;"&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; PRI.Interfaces {&lt;br /&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;interface&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;IEntity&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace&lt;/span&gt; PRI {&lt;br /&gt;    &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;DataEntity&lt;/span&gt;:Interfaces.&lt;span style="color: rgb(43, 145, 175);"&gt;IEntity&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color:blue;"&gt;public&lt;/span&gt; &lt;span style="color:blue;"&gt;string&lt;/span&gt; Name { &lt;span style="color:blue;"&gt;get&lt;/span&gt;; &lt;span style="color:blue;"&gt;set&lt;/span&gt;; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And the library authors decide to release an extension method (along with a couple of others you wish to use):&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; PRI.Extensions {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI.Interfaces;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Entity&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; CapitalizeName(&lt;span style="color: blue;"&gt;this&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IEntity&lt;/span&gt; entity) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; entity.Name = entity.Name.ToUpper();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; entity.Name;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Meanwhile you are using a third party extension method library which already contains this method:&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; Contoso.Extensions {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI.Interfaces;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Entity {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; CapitalizeName(&lt;span style="color: blue;"&gt;this&lt;/span&gt; IEntity entity) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; StringBuilder sb = &lt;span style="color: blue;"&gt;new&lt;/span&gt; StringBuilder(entity.Name.Length);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;string&lt;/span&gt;[] words = entity.Name.Split(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: blue;"&gt;char&lt;/span&gt;[] { &lt;span style="color: #a31515;"&gt;' '&lt;/span&gt; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;foreach&lt;/span&gt;(&lt;span style="color: blue;"&gt;string&lt;/span&gt; word &lt;span style="color: blue;"&gt;in&lt;/span&gt; words) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sb.Append(&lt;span style="color: blue;"&gt;char&lt;/span&gt;.ToUpper(word[0]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sb.Append(word.Substring(1).ToLower());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sb.Append(&lt;span style="color: #a31515;"&gt;" "&lt;/span&gt;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; entity.Name = sb.ToString().Trim();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; entity.Name;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;The Problem&lt;/h2&gt;&lt;br /&gt;This is a problem because you can no longer call the CapitalizeName method as an extension method if you happen to have both namespaces in your using constructs. As long as you are using functionality from both classes where the names of the methods are different you will not have any conflicts and there will not be any problems using your code. Unfortunately, the moment you add a call to the CapitalizeName method you will get a compile time error.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; Program {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI.Extensions;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; Contoso.Extensions;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Program {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataEntity dataEntity = &lt;span style="color: blue;"&gt;new&lt;/span&gt; DataEntity() { Name = &lt;span style="color: #a31515;"&gt;"frank smith"&lt;/span&gt; };&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dataEntity.CapitalizeName();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(dataEntity.Name);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;em&gt;This will not compile because CapitalizeName cannot be resolved.&lt;/em&gt;&lt;br /&gt;&lt;h2&gt;Enter the Proxy Pattern&lt;/h2&gt;&lt;br /&gt;Because extension methods are static methods and can be called just as any other static method gets called, you can build a wrapper class around these third party extension methods in order to resolve the conflicts that the method names impose.&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; Program.ExtensionResolvers {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI.Interfaces;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Resolver {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; CapitalizeName(&lt;span style="color: blue;"&gt;this&lt;/span&gt; IEntity entity) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; PRI.Extensions.Entity.CapitalizeName(entity);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; ConvertNameToTitleCase(&lt;span style="color: blue;"&gt;this&lt;/span&gt; IEntity entity) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; Contoso.Extensions.Entity.CapitalizeName(entity);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Using the Solution&lt;/h2&gt;&lt;br /&gt;The extension method proxy class can now be used in order to resolve the naming conflict.&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; Program {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; System;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; PRI;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;using&lt;/span&gt; ExtensionResolvers;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;class&lt;/span&gt; Program {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Main(&lt;span style="color: blue;"&gt;string&lt;/span&gt;[] args) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataEntity dataEntity = &lt;span style="color: blue;"&gt;new&lt;/span&gt; DataEntity() { Name = &lt;span style="color: #a31515;"&gt;"frank smith"&lt;/span&gt; };&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dataEntity.ConvertNameToTitleCase();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine(dataEntity.Name);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h2&gt;Recommendation&lt;/h2&gt;&lt;br /&gt;If you are going to use more than 1 extension method library ever in the course of working on a project, I believe it is awfully important to encapsulate the extension methods you will be using into a proxy class (or several such classes) as I have shown here. It is probably best to keep this class internal as you wouldn't want to continue to pollute the function name domain to other third party libraries which are using your code.&lt;br /&gt;&lt;br /&gt;I will argue that all calls to extension methods from third party libraries be internalized in this way. Doing so adds value (you can add xml documentation to these methods for your coworkers and the R# tools will be able to find usages and such) and it better decouples you from minor API changes in the extension libraries.&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;Thanks to &lt;a href="http://msmvps.com/Blogs/PeterRitchie/"&gt;Peter Ritchie&lt;/a&gt; on &lt;a href="http://tech.groups.yahoo.com/group/altnetconf/message/5243"&gt;the altnetconf mailing list for most of the above code in the first section of this post&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-5962073730515606974?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/5962073730515606974/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=5962073730515606974" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/5962073730515606974?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/5962073730515606974?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/12/resolving-extension-method-conflicts.html" title="Resolving extension method conflicts using a Proxy pattern." /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Ck4MR3o7eyp7ImA9WB9UEks.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-2784605777854895734</id><published>2007-12-09T21:09:00.000-07:00</published><updated>2007-12-09T21:29:46.403-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-09T21:29:46.403-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Resharper" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>Visual Studio 2008 first impressions</title><content type="html">ok, ...&lt;br /&gt;&lt;br /&gt;I will not be using VS 2008 until Resharper 4.0 EAP begins. I began starting to use 2008 this evening for my next post and I almost immediately realized just how dependent on R# I have become. As I began the first things I noticed (within the first 5 seconds) were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Intellisense was different and I am not used to it.&lt;/li&gt;&lt;li&gt;I had forgotten where StringBuilder was located (R# will let you know when you reference a class that is not in a namespace you are using).&lt;/li&gt;&lt;li&gt;I really miss the error detection system.&lt;/li&gt;&lt;li&gt;Alt+Enter&lt;/li&gt;&lt;li&gt;F6&lt;/li&gt;&lt;li&gt;F2&lt;/li&gt;&lt;li&gt;Ctrl+B&lt;/li&gt;&lt;li&gt;Ctrl+T (I have binded this shortcut to Resharper.UnitTest.ContextDebug; more on that at some later time)&lt;/li&gt;&lt;/ul&gt;Other than that, I really liked my initial impressions:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Startup is much faster.&lt;/li&gt;&lt;li&gt;F1 doesn't hang VS for 5 minutes (I really hate this shortcut and I remove it from my system when possible because I tend to accidentally press it when going for F2 sometimes)&lt;/li&gt;&lt;li&gt;Hidden toolbox tabs show up faster when moused over.&lt;/li&gt;&lt;li&gt;Compilation seems faster.&lt;/li&gt;&lt;li&gt;VS seems to close faster.&lt;/li&gt;&lt;/ul&gt;So, in general, I really like it.  Without R# I will not be using it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-2784605777854895734?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/2784605777854895734/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=2784605777854895734" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2784605777854895734?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2784605777854895734?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/12/visual-studio-2008-first-impressions.html" title="Visual Studio 2008 first impressions" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkUGRn8zeip7ImA9WB9VGUQ.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-8501248968515732623</id><published>2007-12-06T09:53:00.000-07:00</published><updated>2007-12-06T20:30:27.182-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-06T20:30:27.182-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="alt.net" /><title>Job Hunting - questions to ask</title><content type="html">Recently I asked a couple of questions openly to a person who posted a job offer* on the alt.net list which I think are important for discovering the attitude and environment of the potential employer.&lt;br /&gt;&lt;br /&gt;These are more or less the questions I asked:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Does the company use OSS?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;How does the company view OSS solutions?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Are you stuck with basic VS or do you get so use R# or the DevExpress plugins (or other productivity tools)? &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Do your developers get to blog (or is that shunned)? &lt;/li&gt;&lt;br /&gt;&lt;li&gt;Are they allowed to work on OSS projects in their spare time?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Are they allowed to do so on company time for any projects the company (or even just the group) is using?&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I believe these questions provide valuable insight into the employer.&lt;br /&gt;&lt;br /&gt;*Note: I am not currently looking for a job, but if an offer comes up and it is significantly better than my current position I will look into it. It had better have a good pay raise, great benefits, not move me from Bozeman Montana, provide a flexible schedule, allow me to work from home when I want to and give me the flexibility to work on the projects I want to be working on. Ok, maybe that is a little exaggerated, but it had better be a very very good deal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-8501248968515732623?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/8501248968515732623/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=8501248968515732623" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/8501248968515732623?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/8501248968515732623?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/12/job-hunting-questions-to-ask.html" title="Job Hunting - questions to ask" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0MNQHo4eCp7ImA9WB9VGE4.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-2610076617888051171</id><published>2007-12-04T21:41:00.000-07:00</published><updated>2007-12-04T22:11:31.430-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-12-04T22:11:31.430-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="alt.net" /><title>Object to DTO and back in an efficient manner</title><content type="html">Reading &lt;a href="http://www.ayende.com/Blog/archive/2007/12/05/Object--Object-mapping.aspx"&gt;Oren's post about converting an object to a DTO&lt;/a&gt; I got to thinking. Why do all that work of reassigning a bunch of properties if you can avoid it? The DTO is probably going to be serialized before being sent over the wire and only public properties are serialized; it doesn't make much sense to me to run a transform which would need to run at least 1 delegate (1 for every property to property transform), instantiate a new DTO, instantiate a List, instantiate an enumerator and enumerate over a list and instantiate a transformation class just to call a single method on it. It seems to me that most of this extra work can be avoided.&lt;br /&gt;&lt;br /&gt;Here is a naive approach I would consider before running to lists of lambda expressions:&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Name;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; Id;&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Order&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; _dbOrder;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; Order(&lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; o) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _dbOrder = o;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; DbOrder {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (_dbOrder == &lt;span style="color: blue;"&gt;null&lt;/span&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _dbOrder = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; _dbOrder;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Name {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; DbOrder.Name; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { DbOrder.Name = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; Id {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; DbOrder.Id; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { DbOrder.Id = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;explicit&lt;/span&gt; &lt;span style="color: blue;"&gt;operator&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Order&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;OrderDTO&lt;/span&gt; obj) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;Order&lt;/span&gt;(obj.DbOrder);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;OrderDTO&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; _dbOrder;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; OrderDTO(&lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; o) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _dbOrder = o;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;internal&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt; DbOrder {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;if&lt;/span&gt; (_dbOrder == &lt;span style="color: blue;"&gt;null&lt;/span&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _dbOrder = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;DbOrder&lt;/span&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; _dbOrder;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; CustomerName {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; DbOrder.Name; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { DbOrder.Name = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;int&lt;/span&gt; ID {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; DbOrder.Id; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { DbOrder.Id = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;explicit&lt;/span&gt; &lt;span style="color: blue;"&gt;operator&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;OrderDTO&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;Order&lt;/span&gt; obj) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;OrderDTO&lt;/span&gt;(obj.DbOrder);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The reason I would consider doing this this way is because both the Business class and the DTO class are nothing more than proxies to the data. Since this is the case, a &lt;a href="http://en.wikipedia.org/wiki/Proxy_pattern"&gt;Proxy pattern&lt;/a&gt; seems to me to be the best way to treat them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-2610076617888051171?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/2610076617888051171/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=2610076617888051171" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2610076617888051171?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/2610076617888051171?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/12/object-to-dto-and-back-in-efficient.html" title="Object to DTO and back in an efficient manner" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;C0cFRHg9eip7ImA9WB9VEU8.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-729622247270698457</id><published>2007-11-26T16:47:00.000-07:00</published><updated>2007-11-26T16:50:15.662-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-11-26T16:50:15.662-07:00</app:edited><title>heh - 88 % geek</title><content type="html">&lt;a href="http://www.justsayhi.com/bb/geek"&gt;88% Geek&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;found on &lt;a href="http://fredericiana.com/2007/11/24/how-geek-are-you/"&gt;http://fredericiana.com/2007/11/24/how-geek-are-you/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-729622247270698457?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/729622247270698457/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=729622247270698457" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/729622247270698457?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/729622247270698457?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/11/heh-88-geek.html" title="heh - 88 % geek" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEYFSXY_eip7ImA9WB9QFUU.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-6760774054673207622</id><published>2007-10-28T09:33:00.000-06:00</published><updated>2007-10-28T09:41:58.842-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-28T09:41:58.842-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="alt.net" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><title>[altnetconf] RE: What is your current "task system" of choice, and how tied are you to it?</title><content type="html">I was reading a post on the alt.net mailing list that just showed up on my inbox and thought it would be best to reply here:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We use Bugzilla for tracking everything that goes on with our applications. We have tried getting rid of it and failed too many times now (to replace it with JIRA, Fogbugz, mantis, SugarCRM, SalesForce and VSTS to name a few), there is just no better application. Bugzilla is not exactly what we want, but neither is anything else. We have since gotten rid of the idea of replacing Bugzilla and have integrated it with the rest of our processes. It receives commit messages from subversion; it will soon receive error reports directly from the application; we are looking into getting ccnet build reports to integrate into it. Our customer service had been using sharepoint to track and deal with their tasks, but they will soon be switching fully into Bugzilla. Our scrum board is nothing more than a shared search that looks at bugs that block a sprint tracker (this works really well as I work from Montana and the rest of the company is in Ohio, Pennsylvania and New Jersey and an actual whiteboard would be rather impossible). We now use it to do everything from manage releases to tracking defects and enhancements to track modifications made to the firewalls and network infrastructure to record helpdesk phone calls with their solutions.&lt;br /&gt;&lt;br /&gt;Needless to say, our company runs off Bugzilla (yes, that takes BDD to a whole new level).&lt;br /&gt;&lt;br /&gt;Even though it is not perfect and the imperfections are glaringly obvious (yet nearly impossible to explain how to fix), wherever it is good it is almost perfect. The perfect tools for this would fade into the background and no one would realize they were using them. It is very natural to use a buglist for the scrum board. It is also quite natural to commit a revision to subversion and have a bug get resolved as a side effect (well about as natural as the act of committing in subversion can be). Or to publish a release (another commit that goes against a different bug) then get up and go get a drink as CruiseControl.NET updates the qa environment and bugzilla resolves all the bugs waiting to get to qa, sending emails to the relevant testers that the issues are ready for them to verify, all without any user interaction (other than the commit).&lt;br /&gt;&lt;br /&gt;What isn’t good about it is that anything that isn’t integrated or doesn’t have a natural appropriate workflow from the business perspective (regardless of the tool) is very difficult to get anyone in a habit of using (time tracking for example has not caught on despite the fact that we need to do it and know we have for the past 2 years). If the item that we try to quantify with Bugzilla is not a direct result or direct byproduct that appears on its own (even though it is something that can be figured out and we know how to do so) then it inevitably doesn’t get tracked.&lt;br /&gt;&lt;br /&gt;Time tracking is an example there, but so are:&lt;br /&gt;“What UI areas does issue X affect that will be visible to end users?”&lt;br /&gt;“Does this issue need to be in release notes?”&lt;br /&gt;“What was the outcome of meeting N on mm/dd/yyyy which related to this bug and why was implementation A taken over B?”&lt;br /&gt;“What meetings has this bug been brought up in?”&lt;br /&gt;“How much impact does this issue have with end users?”&lt;br /&gt;&lt;br /&gt;We have been trying to figure out how to quantify those questions and many like them for several years and that is why we have tried other systems.&lt;br /&gt;&lt;br /&gt;Additionally we have run into another issue which dwarfs the questions of this topic, as ultimately I feel that any of those systems could have wound up working for us (except VSTS, that one just didn’t fit the bill at all) had they been introduced at the right time (Bugzilla was introduced early and was simply leaps and bounds better than mere email), and that question is: “How do you deal with taking over another company that is at a different location and uses an entirely different task system?” The single biggest problem with Bugzilla at our company is that it isn’t enough to receive the corporate Buy-In from the higher ups in other locations who are already entrenched in a different system. It is far more important to be using a single task system companywide which works good for most things (and excels at a couple) than it is to sit down and figure out which system is best for you right now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-6760774054673207622?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/6760774054673207622/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=6760774054673207622" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/6760774054673207622?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/6760774054673207622?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/10/altnetconf-re-what-is-your-current-task.html" title="[altnetconf] RE: What is your current &quot;task system&quot; of choice, and how tied are you to it?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;A0cNQnY9fCp7ImA9WB9QEks.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-8898357664581143375</id><published>2007-10-24T17:06:00.000-06:00</published><updated>2007-10-24T17:38:13.864-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-24T17:38:13.864-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><title>Schwartzian Transform in C# 2.0</title><content type="html">In case someone was reading &lt;a href="http://jcheng.wordpress.com/2007/08/23/schwartzian-transform-in-c-30/"&gt;Joe Cheng's post about performing a Schwartzian Transform in C# 3.0&lt;/a&gt; and was wondering what it would look like in 2.0 code, here it is:&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; SchwartzSort&amp;lt;E, S&amp;gt;(&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;E&amp;gt; list, &lt;br /&gt;                                       &lt;span style="color: #2b91af;"&gt;Converter&lt;/span&gt;&amp;lt;E, S&amp;gt; converter, &lt;br /&gt;                                       &lt;span style="color: #2b91af;"&gt;Comparison&lt;/span&gt;&amp;lt;S&amp;gt; comparison) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;KeyValuePair&lt;/span&gt;&amp;lt;S, E&amp;gt;&amp;gt; pairs = list.ConvertAll&amp;lt;&lt;span style="color: #2b91af;"&gt;KeyValuePair&lt;/span&gt;&amp;lt;S, E&amp;gt;&amp;gt;(&lt;span style="color: blue;"&gt;delegate&lt;/span&gt;(E x) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;KeyValuePair&lt;/span&gt;&amp;lt;S, E&amp;gt;(converter(x), x);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pairs.Sort(&lt;span style="color: blue;"&gt;delegate&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;KeyValuePair&lt;/span&gt;&amp;lt;S, E&amp;gt; x, &lt;span style="color: #2b91af;"&gt;KeyValuePair&lt;/span&gt;&amp;lt;S, E&amp;gt; y) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;return&lt;/span&gt; comparison(x.Key, y.Key);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;for&lt;/span&gt; (&lt;span style="color: blue;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; list.Count; i++) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; list[i] = pairs[i].Value;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Sorts a list using a Schwartzian transform (applies a conversion &lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; function to each element and sorts by the value of that function).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;typeparam name="E"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The type of element to be sorted&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;typeparam name="S"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The type of the element to sort by&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;param name="list"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The list to be sorted (sort occurs in place).&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;param name="converter"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; The converter function (converts element of type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;E&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt; to type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;S&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;param name="comparison"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; The comparison function, compares 2 values of type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;S&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;seealso cref="Sort{E,S}(List{E},Converter{E,S})"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Sort&amp;lt;E, S&amp;gt;(&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;E&amp;gt; list, &lt;span style="color: #2b91af;"&gt;Converter&lt;/span&gt;&amp;lt;E, S&amp;gt; converter, &lt;span style="color: #2b91af;"&gt;Comparison&lt;/span&gt;&amp;lt;S&amp;gt; comparison) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SchwartzSort(list, converter, comparison);&lt;br /&gt;}&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Sorts a list using a Schwartzian transform using the default comparer &lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; on type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;S&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt; (applies a conversion function to each element &lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; and sorts by the value of that function).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;typeparam name="E"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The type of element to be sorted&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;typeparam name="S"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The type of the element to sort by&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;param name="list"&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The list to be sorted (sort occurs in place).&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;param name="converter"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; The converter function (converts element of type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;E&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt; to type &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;S&lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/code&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: gray;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: gray;"&gt;&amp;lt;seealso cref="Sort{E,S}(List{E},Converter{E,S},Comparison{S})"/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Sort&amp;lt;E, S&amp;gt;(&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;E&amp;gt; list, &lt;span style="color: #2b91af;"&gt;Converter&lt;/span&gt;&amp;lt;E, S&amp;gt; converter) &lt;span style="color: blue;"&gt;where&lt;/span&gt; S:&lt;span style="color: #2b91af;"&gt;IComparable&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SchwartzSort(list, converter, &lt;span style="color: blue;"&gt;delegate&lt;/span&gt;(S x, S y) { &lt;span style="color: blue;"&gt;return&lt;/span&gt; x.CompareTo(y); });&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Obviously this is not quite as aesthetically pleasing as the 3.0 version, but it is still useful for any developers doing 2.0 coding out there and need to sort a list by the results of a function. Here is an example of how it would be used:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; _foo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; _bar;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Foo {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; _foo; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { _foo = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Bar {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; _bar; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { _bar = &lt;span style="color: blue;"&gt;value&lt;/span&gt;; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;public&lt;/span&gt; foobar(&lt;span style="color: blue;"&gt;string&lt;/span&gt; foo, &lt;span style="color: blue;"&gt;string&lt;/span&gt; bar) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _foo = foo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _bar = bar;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Assuming class foobar:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre style="font-family: Courier New; font-size: 10pt; color: black; background: white;"&gt;&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;&amp;gt; items = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;&amp;gt;(4);&lt;br /&gt;items.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"a"&lt;/span&gt;,&lt;span style="color: #a31515;"&gt;"b"&lt;/span&gt;));&lt;br /&gt;items.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"asdf"&lt;/span&gt;,&lt;span style="color: #a31515;"&gt;"jkl"&lt;/span&gt;));&lt;br /&gt;items.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"green"&lt;/span&gt;,&lt;span style="color: #a31515;"&gt;"purple"&lt;/span&gt;));&lt;br /&gt;items.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"c"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"a"&lt;/span&gt;));&lt;br /&gt;&amp;nbsp;&lt;br /&gt;Sort&amp;lt;&lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt;,&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;(items, &lt;span style="color: blue;"&gt;delegate&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;foobar&lt;/span&gt; item) { &lt;span style="color: blue;"&gt;return&lt;/span&gt; item.Foo; });&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-8898357664581143375?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/8898357664581143375/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=8898357664581143375" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/8898357664581143375?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/8898357664581143375?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/10/schwartzian-transform-in-c-20.html" title="Schwartzian Transform in C# 2.0" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkMFQ3gzfyp7ImA9WB9SFEs.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-3574448036787996227</id><published>2007-10-03T21:16:00.000-06:00</published><updated>2007-10-03T21:26:52.687-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-03T21:26:52.687-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="talking_to_myself" /><category scheme="http://www.blogger.com/atom/ns#" term="color" /><category scheme="http://www.blogger.com/atom/ns#" term="rambling" /><title>Colors</title><content type="html">I don't know about these colors. I know I didn't like what was there before, but I don't have any idea if this is any good now. I do like this layout much better. But, I don't know much of anything about these colors because I am colorblind. I think some of the borders and such are a shade of green on the blog side and I don't know how well they go together. I suppose I will be trying to figure this out for a long time. Any help would be appreciated. Also, ignore the image colors, they were there before. I will get to them at some point.&lt;br /&gt;&lt;br /&gt;Some sites I used to help get myself this far with the colors:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://pourpre.com/colordb/?i=cF69D30&amp;amp;t=tr&amp;amp;l=eng"&gt;colordb&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.stylephreak.com/cm.php"&gt;style:phreak&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://genopal.com/online.php"&gt;GenoPal Online&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wellstyled.com/tools/colorscheme2/index-en.html#"&gt;Color schemes generator 2&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-3574448036787996227?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/3574448036787996227/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=3574448036787996227" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3574448036787996227?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/3574448036787996227?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/10/colors.html" title="Colors" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;C0IERns-eip7ImA9WB9SFEs.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-4770291622093829880</id><published>2007-10-03T19:29:00.000-06:00</published><updated>2007-10-03T19:31:47.552-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-10-03T19:31:47.552-06:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="msrl" /><category scheme="http://www.blogger.com/atom/ns#" term="mono" /><title>Read only source?</title><content type="html">&lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx"&gt;ScottGu on releasing read only source code for .NET 3.5&lt;/a&gt;&lt;br/&gt;&lt;br /&gt;&lt;p&gt;I don't know about this. I will not be looking at any code under the MS-RL. It seems like having that license makes the code supplied under it bait.  I wonder how it will affect the number of contributors to mono? Once you look at the Microsoft .NET source, you can no longer contribute to mono.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;It seems like embrace, extend, extinguish to me. First Microsoft embraces all developers by making it really easy to look at and use the source for the framework. They continue working on it to build up libraries for anything imaginable. Then a few years later they bombard open implementations and competitors with the full force of their legal department. Or worse, they eat up so much of the development pool that there is no one left to compete with them, they get in with colleges to use their implementation and have people write books about it, etc. And I was beginning to think the MS dev offices were a whole different better side of MS.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Kudos to the hard working guys at MS who got it this far, but I am unsure that this is far enough.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-4770291622093829880?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://16randombytes.blogspot.com/feeds/4770291622093829880/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4255370320531784090&amp;postID=4770291622093829880" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4770291622093829880?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4770291622093829880?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/10/read-only-source.html" title="Read only source?" /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUIMQH0_fyp7ImA9WB9SEUQ.&quot;"><id>tag:blogger.com,1999:blog-4255370320531784090.post-4041810719502844645</id><published>2007-09-30T15:40:00.000-06:00</published><updated>2007-09-30T17:06:21.347-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2007-09-30T17:06:21.347-06:00</app:edited><title>My frist psot.</title><content type="html">Ok, so not quite that exciting; would have expected the url to be taken though, but alas, it is mine now. So what is this going to be? Well it should be whatever I feel like. I expect mostly C#, OOP and asp.NET in particular because that is my job at the moment, but whatever I feel like ranting about I guess.&lt;br /&gt;&lt;br /&gt;About me:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I live in Bozeman, Montana.&lt;/li&gt;&lt;li&gt;I work in Stroudsburg, Pennsylvania (yeah, thats something of a commute!).&lt;/li&gt;&lt;li&gt;I am a software developer, mostly writing C# for a couple asp.net applications and a large library, but I occasionally do some perl, php, vbscript, c++, ....&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I like to solve problems (hence I am a programmer).&lt;/li&gt;&lt;li&gt;I love to read (this whole blogosphere has me hooked, I am subscribed to several hundred blogs and blog aggregations and I read every post, about 80 posts a day, and that ignores the books I am reading [right now, &lt;span style="font-style: italic;"&gt;The Martians&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;The Salmon of Doubt&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Professional DotNetNuke 4&lt;/span&gt;]).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;I enjoy snowboarding, hiking, swimming, and generally being outside.&lt;/li&gt;&lt;li&gt;I graduated college with 3 degrees (Computer Science, Computer Security and Mathematics) because I was bored for the most part and the school I went to did not have, nor did I know to look for, adequate research opportunities.&lt;/li&gt;&lt;li&gt;I would like to go on for my PhD in CS in the hopes of furthering research in the field and better educating future persons in the profession.&lt;/li&gt;&lt;li&gt;As for research areas I have always been particularly interested in parallel computing and compiler construction (esp. compiler optimizations for parallel environments and languages for such), but I have been recently coming to enjoy the field of software engineering and the interaction I see it should be having with logic. I have a couple of ideas started for various papers/books I intend to get to writing and I hope the fact I just wrote that provides me the push I need to complete them.&lt;/li&gt;&lt;/ul&gt;Hmm, that was a bit more than I expected to write. No more misspelled titles to reference slashdot though I think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4255370320531784090-4041810719502844645?l=16randombytes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4041810719502844645?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4255370320531784090/posts/default/4041810719502844645?v=2" /><link rel="alternate" type="text/html" href="http://16randombytes.blogspot.com/2007/09/my-frist-psot.html" title="My frist psot." /><author><name>fallout</name><uri>http://www.blogger.com/profile/07655560038540606489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author></entry></feed>

