<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-24481570</id><updated>2011-11-06T02:32:21.110-07:00</updated><category term='altnetconf'/><category term='altnetconf song'/><title type='text'>Developer Ramblings</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>JAGID</name><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>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24481570.post-7594474860979186815</id><published>2007-10-27T08:42:00.000-06:00</published><updated>2007-10-27T08:48:15.871-06:00</updated><title type='text'>Elegance Awaits</title><content type='html'>It's not been long since I &lt;a href="http://jagid.blogspot.com/2007/10/im-back.html"&gt;jumped ship&lt;/a&gt; from my company blog and started posting here again.&lt;br /&gt;&lt;br /&gt;Never being one to stand still I'm moving again this time to &lt;a href="http://elegantcode.com/"&gt;Elegant Code&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'd like to extend a big thank you to David Starr for allowing myself, David Betts and Jarod Ferguson to capitalize on the excellent brand that he has built. This is going to be so much fun...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-7594474860979186815?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/7594474860979186815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=7594474860979186815' title='40 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7594474860979186815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7594474860979186815'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/elegance-awaits.html' title='Elegance Awaits'/><author><name>JAGID</name><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>40</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24481570.post-961198876087978587</id><published>2007-10-26T15:57:00.001-06:00</published><updated>2007-10-26T15:57:18.757-06:00</updated><title type='text'>SQL Anywhere Tool Issues</title><content type='html'>&lt;p&gt;Lately I've been working with SQL Anywhere 10. It's always hard working with new because invariably different paradigms are used (which is good) and of course it takes time to grok them. However knowing this doesn't stop me from being frustrated during the learning. &lt;/p&gt;  &lt;p&gt;And unfortunately sometimes parts of the toolset are below par. Interactive SQL is an example of a truly horrible tool. It lacks any advanced features. F5 executes (good) but to execute a selected portion of the SQL you have to hit F9 which gets me every time.&lt;/p&gt;  &lt;p&gt;I just exited the tool and it prompted me to save the changes that I had made to a SQL script. All looked good and I said yes. Then I was informed that the file was locked and the app just closed. A stream of expletives was issued from my mouth. Just what I need on a Fri afternoon.&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-961198876087978587?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/961198876087978587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=961198876087978587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/961198876087978587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/961198876087978587'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/sql-anywhere-tool-issues.html' title='SQL Anywhere Tool Issues'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-6618329138949780533</id><published>2007-10-26T15:10:00.001-06:00</published><updated>2007-10-26T15:10:24.548-06:00</updated><title type='text'>CruiseControl.NET and MSBuild</title><content type='html'>&lt;p&gt;I've used NAnt for years. But for many reasons on a new project I decided to give MSBuild a shot. Everything worked great on my laptop but when I moved to the CC.NET build server I ran into a few problems. I thought that it would be useful to document the problems and solutions:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Issue 1&lt;/strong&gt;&lt;/p&gt;  &lt;pre&gt;&amp;lt;error code=&amp;quot;MSB4019&amp;quot; file=&amp;quot;C:\CruiseControlData\abf\WorkingDirectory\Website\ABF.csproj&amp;quot;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; line=&amp;quot;544&amp;quot; column=&amp;quot;11&amp;quot;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0; &amp;lt;![CDATA[The imported project &amp;quot;C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\WebApplications\&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; Microsoft.WebApplication.targets&amp;quot; was not found. Confirm that the path in the &amp;lt;Import&amp;gt; declaration&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; is correct, and that the file exists on disk.]]&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;/error&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Thanks to Scott Allan for the &lt;a href="http://odetocode.com/Blogs/scott/archive/2006/05/30/3802.aspx"&gt;answer&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Issue 2&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;error code=&amp;quot;MSB3091&amp;quot; file=&amp;quot;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets&amp;quot;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; line=&amp;quot;1669&amp;quot; column=&amp;quot;9&amp;quot;&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0; &amp;lt;![CDATA[Task failed because &amp;quot;LC.exe&amp;quot; was not found, or the .NET Framework SDK v2.0 is not installed.&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; The task is looking for &amp;quot;LC.exe&amp;quot; in the &amp;quot;bin&amp;quot; subdirectory beneath the location specified in the&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; SDKInstallRootv2.0 value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework.&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0; You may be able to solve the problem by doing one of the following:&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; 1.) Install the .NET Framework SDK v2.0.&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; 2.) Manually set the above registry key to the correct location.&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; 3.) Pass the correct location into the &amp;quot;ToolPath&amp;quot; parameter of the task.]]&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;/error&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This one is a little easier because it tells you what to do. I saw some warnings elsewhere in the build output about the SDK being missing so to avoid future issues I downloaded and installed it.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now everything works. Sweet!&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-6618329138949780533?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/6618329138949780533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=6618329138949780533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/6618329138949780533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/6618329138949780533'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/cruisecontrolnet-and-msbuild.html' title='CruiseControl.NET and MSBuild'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-7195524354017797495</id><published>2007-10-24T11:40:00.000-06:00</published><updated>2007-10-24T12:06:28.562-06:00</updated><title type='text'>NHibernate AliasToBean Transformations</title><content type='html'>NHibernate's AliasToBean result transformer looks very useful. It allows you to map to unmanaged entities (don't ask why we have some of these!)&lt;br /&gt;&lt;br /&gt;If you look at &lt;a href="http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/querysql.html#d0e9192"&gt;the docs&lt;/a&gt; you can see how this is supposed to work. However when I tried to implement this I kept receiving a "NHibernate.QueryException: Return types of SQL query were not specified". To workaround this I had to use the AddScalar() method to define the return types which is actually what I was trying to avoid by using the transformer:&lt;pre&gt;&lt;br /&gt;ISQLQuery q =_session.CreateSQLQuery("SELECT c1 ID FROM t1 i WHERE c2 = :value1");&lt;br /&gt;q.SetInt64("value1", value1);&lt;br /&gt;q.SetResultTransformer(Transformers.AliasToBean(typeof(UnmanagedEntity)));&lt;br /&gt;q.AddScalar("ID", NHibernateUtil.String);&lt;br /&gt;return (List&lt; UnmanagedEntity &gt;)q.List&lt; UnmanagedEntity &gt;();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I'll post this on the forums to determine whether my problem is due to a bug or a misunderstanding on my part.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-7195524354017797495?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/7195524354017797495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=7195524354017797495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7195524354017797495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7195524354017797495'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/nhibernate-aliastobean-transformations.html' title='NHibernate AliasToBean Transformations'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-3128370428337932234</id><published>2007-10-22T13:46:00.000-06:00</published><updated>2007-10-22T21:25:24.556-06:00</updated><title type='text'>Anonymous Delegate Overuse Anti-Pattern</title><content type='html'>I like anonymous delegates and generics and use them both a lot. The combination affords considerable flexibility and allows me to keep my code &lt;a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself"&gt;DRY&lt;/a&gt;. However it's easy to take any technique too far. Just because you can do something doesn't mean that you should.&lt;br /&gt;&lt;br /&gt;For example consider these two methods:&lt;br /&gt;&lt;pre&gt;      private const string TEST_DATA = "1,2,3,4";&lt;br /&gt;&lt;br /&gt;      private string ToXml()&lt;br /&gt;      {&lt;br /&gt;          StringBuilder sb = new StringBuilder();&lt;br /&gt;          foreach (string s in TEST_DATA.Split(','))&lt;br /&gt;          {&lt;br /&gt;              sb.Append("&lt;item&gt;&lt;item&gt;" + s + "&lt;/item&gt;&lt;/item&gt;");&lt;br /&gt;          }&lt;br /&gt;          return sb.ToString();&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      private List&lt;string&gt; ToList()&lt;br /&gt;      {&lt;br /&gt;          List&lt;string&gt; list = new List&lt;string&gt;();&lt;br /&gt;          foreach (string s in TEST_DATA.Split(','))&lt;br /&gt;          {&lt;br /&gt;              list.Add(s);&lt;br /&gt;          }&lt;br /&gt;          return list;&lt;br /&gt;      }&lt;br /&gt;&lt;/pre&gt;There is duplication in the two foreach blocks. It is possible to remove this using a combination of anonymous delegates and generics:&lt;pre&gt;      private delegate void MyDelegate&lt;t&gt;(T instance, string s);&lt;br /&gt;&lt;br /&gt;      private void Process&lt;t&gt;(MyDelegate&lt;t&gt; myDelegate, T instance)&lt;br /&gt;      {&lt;br /&gt;          foreach (string s in TEST_DATA.Split(','))&lt;br /&gt;          {&lt;br /&gt;              myDelegate(instance, s);&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      private string ToXmlUsingAnonymousDelegate()&lt;br /&gt;      {&lt;br /&gt;          StringBuilder sb = new StringBuilder();&lt;br /&gt;          Process(&lt;br /&gt;              delegate(StringBuilder tmp, string s)&lt;br /&gt;              {&lt;br /&gt;                  tmp.Append("&lt;item&gt;&lt;item&gt;" + s + "&lt;/item&gt;&lt;/item&gt;");&lt;br /&gt;              }, sb);&lt;br /&gt;          return sb.ToString();&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      private List&lt;string&gt; ToListUsingAnonymousDelegate()&lt;br /&gt;      {&lt;br /&gt;          List&lt;string&gt; list = new List&lt;string&gt;();&lt;br /&gt;          Process(&lt;br /&gt;              delegate(List&lt;string&gt; tmp, string s)&lt;br /&gt;              {&lt;br /&gt;                  tmp.Add(s);&lt;br /&gt;              }, list);&lt;br /&gt;          return list;&lt;br /&gt;      }&lt;br /&gt;&lt;/pre&gt;The resulting code is DRYer but it's definitely not easier to understand. If you had to maintain this how happy would you be?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-3128370428337932234?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/3128370428337932234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=3128370428337932234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/3128370428337932234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/3128370428337932234'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/anonymous-delegate-overuse-anti-pattern.html' title='Anonymous Delegate Overuse Anti-Pattern'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-3927341855301098316</id><published>2007-10-15T11:09:00.000-06:00</published><updated>2007-10-15T11:22:23.197-06:00</updated><title type='text'>Unique Error Nightmare</title><content type='html'>I am working on a web application that uses SQL Anywhere 10. I am in the process of porting the DAL to NHibernate. I wrote a custom driver as the existing one only supports v9 -I'll contribute it once I'm sure that it's working OK.&lt;br /&gt;&lt;br /&gt;Everything was going great until Fri afternoon. Some of the code that I haven't ported yet invokes ExecuteScalar() on the IDbCommand.&lt;br /&gt;&lt;br /&gt;Suddenly the web app stopped working and I saw this in the Event Log:&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in; font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;Event Type: Error&lt;br /&gt;Event Source: .NET Runtime&lt;br /&gt;Event Category: None&lt;br /&gt;Event ID: 1023&lt;br /&gt;Date: 10/15/2007&lt;br /&gt;Time: 10:59:48 AM&lt;br /&gt;User: N/A&lt;br /&gt;Computer: xxx&lt;br /&gt;Description: .NET Runtime version 2.0.50727.1378 - Fatal Execution Engine Error (7A09239C) (80131506)&lt;/span&gt;&lt;/p&gt;  I resorted to the debugger (this is hard for a TDD advocate!) and when I used the Immediate Window to inspect the results of the call (Intellisense was not invoking) I saw:&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in; font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;"Cannot obtain value of local or argument "xxx" as it is not available at this instruction pointer, possibly because it has been optimized away."&lt;/span&gt;&lt;/p&gt;I wrote a Console app and I see yet another error:&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in; font-family: courier new;"&gt;&lt;span style="font-size:85%;"&gt;FatalExecutionEngineError was detected&lt;br /&gt;Message: The runtime has encountered a fatal error. The address of the error was at 0x79f63d6d, on thread 0x1554. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.&lt;/span&gt;&lt;/p&gt;The wonderful thing is that the problem is not reproducible on any other machine other than my laptop. Don't you just love being a developer!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-3927341855301098316?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/3927341855301098316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=3927341855301098316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/3927341855301098316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/3927341855301098316'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/unique-error-nightmare.html' title='Unique Error Nightmare'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-2291974706679157912</id><published>2007-10-12T08:27:00.000-06:00</published><updated>2007-10-12T17:45:46.744-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='altnetconf song'/><title type='text'>With Appologies to Roy Osherove (and Oasis)</title><content type='html'>One of the ideas floated by &lt;a href="http://weblogs.asp.net/rosherove/"&gt;Roy&lt;/a&gt; last weekend in Austin was to compose an ALT.NET song. I was unable to contribute because I had to get to the airport. However last night I was noodling around and this popped out (&lt;a href="http://en.wikipedia.org/wiki/Finbarr_Saunders"&gt;fnarr!&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;It's a shameless rip off of Wonderwall by Oasis. I pretty much kept the second verse intact because it seemed to fit the mood of ALT.NET well. It's a work in progress but given my lack of free time it's not going to be finished anytime soon. So here it is. Enjoy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Verse 1&lt;/span&gt;&lt;br /&gt;Today is gonna be the day&lt;br /&gt;That we're gonna have ourselves a coup&lt;br /&gt;Web Forms and drag and drop are&lt;br /&gt;Shit that we refuse to do&lt;br /&gt;I would really like to try and practice BDD&lt;br /&gt;But I don't know how&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Verse 2&lt;/span&gt;&lt;br /&gt;Backbeat the word is on the street&lt;br /&gt;That the fire in your heart is out&lt;br /&gt;I'm sure you've heard it all before&lt;br /&gt;But you never really had a doubt&lt;br /&gt;I don't believe that any Mort feels&lt;br /&gt;The way I do about TDD&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Bridge&lt;/span&gt;&lt;br /&gt;And all the roads we have to walk are winding&lt;br /&gt;The pros and cons of late and early binding&lt;br /&gt;I would really like to try and Practice BDD&lt;br /&gt;But I don't know how&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Chorus&lt;/span&gt;&lt;br /&gt;Said maybe&lt;br /&gt;I found the thing that's gonna save me&lt;br /&gt;But I wonder if&lt;br /&gt;I am alternative?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-2291974706679157912?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/2291974706679157912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=2291974706679157912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/2291974706679157912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/2291974706679157912'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/with-appologies-to-roy-osherove-and.html' title='With Appologies to Roy Osherove (and Oasis)'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-7314129971974824477</id><published>2007-10-08T11:44:00.000-06:00</published><updated>2007-10-09T16:12:51.959-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='altnetconf'/><title type='text'>ALT.NET Aftermath</title><content type='html'>Wow!&lt;br /&gt;&lt;br /&gt;Let me say that again.&lt;br /&gt;&lt;br /&gt;Wow!&lt;br /&gt;&lt;br /&gt;I really can't think of a superlative that adequately describes the ALT.NET experience. It was certainly everything that I hoped that every other conference that I attended would be (but invariably wasn't). The people were amazing. The level of debate was exceptional. On a given topic almost everyone present was at least conversant. In any session or side-discussion a large portion of the participants had considerable experience with the tool or technique in question. And often there was one or more industry recognized expert present.&lt;br /&gt;&lt;br /&gt;What I found particularly interesting was that broadly we all have the same pain points. That is why we could have the endless BDD or anemic domain model discussions. And that is what excites me so much about the future - there are so many problems to solve. And of course it's going to take more than just the ALT.NET community to solve them.&lt;br /&gt;&lt;br /&gt;I'm still processing the actual discussions. However the one thing that I am in no doubt about is that the upcoming MVC Framework from Microsoft totally rocks. It's completely extensible and plugable.&lt;br /&gt;&lt;br /&gt;Wanna dump Web Forms (the default view) and use Brail. Go ahead.&lt;br /&gt;&lt;br /&gt;Wanna use Windsor or Spring.NET or Structure Map for DI. You can.&lt;br /&gt;&lt;br /&gt;Note that we're talking about integration with OSS products here. This is a significant and welcome change from the beast of Redmond.&lt;br /&gt;&lt;br /&gt;It was already obvious that Scott Guthrie was brilliant but until I saw him in action I did not realize how much I had underestimated him. He's funny too - describing the day that Web Site Projects were released as "the worst day of his life". I can't wait for the CTP (6-8 weeks).&lt;br /&gt;&lt;br /&gt;More on ALT.NET later....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-7314129971974824477?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/7314129971974824477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=7314129971974824477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7314129971974824477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/7314129971974824477'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/altnet-aftermath.html' title='ALT.NET Aftermath'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-351392096571515744</id><published>2007-10-06T09:11:00.000-06:00</published><updated>2007-10-06T09:17:15.600-06:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='altnetconf'/><title type='text'>Defining Alternative</title><content type='html'>I'm down in Austin, TX for &lt;a href="http://www.blogger.com/%20http://www.altnetconf.com/"&gt;ALT.NET&lt;/a&gt;. It's been a great experience so far. It's a little difficult not to be star struck. For non-developers the analogy would be sneaking into a Hollywood party - look, there's Tom Cruise!&lt;br /&gt;&lt;br /&gt;In previous posts I've lamented about the fact that at conferences the worst part is often the actual presentations. The best bits are inevitably the discussions that occur in between. The great thing about the Open Spaces format is that the whole event is basically the discussion in between part.&lt;br /&gt;&lt;br /&gt;There was a debate at the beginning about the meaning of ALT.NET. It was fascinating to see the different opinions in the room. I must admit that I was a little surprised (and disappointed) by some of the vitriol that was expressed towards Microsoft. Thankfully this was very much in the minority. What was very encouraging however was the large presence from Redmond. The winds of change are blowing...&lt;br /&gt;&lt;br /&gt;My take on the meaning of ALT.NET is that something that is alternative is defined by what it is isn't, not what it is. This alternative nature is characterized by the fact that the conference participants are doing things that the majority of .NET developers are not. A common trait amongst the people in the room is their open mindedness. There is more than one way to solve a given problem. They are interested in using the best tools, not the best tools from any particular vendor. These tools support their values, not the other way round.&lt;br /&gt;&lt;br /&gt;I appreciate that the name is somewhat divisive. But I don't consider that to be a bad thing because it encourages debate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-351392096571515744?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/351392096571515744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=351392096571515744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/351392096571515744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/351392096571515744'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/defining-alternative.html' title='Defining Alternative'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-920178601668850299</id><published>2007-10-06T08:07:00.000-06:00</published><updated>2007-10-06T08:36:16.996-06:00</updated><title type='text'>I'm back!</title><content type='html'>It's been a long time since I've posted here. But I've not been idle. I've been &lt;a href="http://www.treetoptech.com/Treetop_Blog/"&gt;blogging&lt;/a&gt; on the site of the company that I work for. However I have found that using that forum to be somewhat…limiting. Anyone who knows me will no doubt vouch that I am highly opinionated. To be honest I have to be too careful about what I say when there is a direct link to my employer. So I'm reverting to posting here. You've been warned...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-920178601668850299?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/920178601668850299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=920178601668850299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/920178601668850299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/920178601668850299'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2007/10/im-back.html' title='I&apos;m back!'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115639630140623234</id><published>2006-08-23T23:05:00.000-06:00</published><updated>2006-08-23T23:16:42.563-06:00</updated><title type='text'>Thinking Outside The Box (More JavaScript Security Risks)</title><content type='html'>Periodically someone gets creative with JavaScript and manages to do something that its creators did not anticipate. The latest one that I found uses inline CSS styles and JavaScript to determine which sites on a pre-defined list you have visited. You can certainly see the potential for some nefarious uses. Here's a &lt;a href="http://techfoolery.com/archives/2006/08/21/2042/"&gt;link to the original article and a version that works on IE&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115639630140623234?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115639630140623234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115639630140623234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115639630140623234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115639630140623234'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/08/thinking-outside-box-more-javascript.html' title='Thinking Outside The Box (More JavaScript Security Risks)'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115618223059304488</id><published>2006-08-21T11:26:00.000-06:00</published><updated>2006-08-21T11:43:50.613-06:00</updated><title type='text'>IoC Bliss</title><content type='html'>I chose Spring.NET to manage my dependencies. It was a hard choice because I didn't see a whole lot of traction in any of the .NET IoC containers so there were few differentiating factors between the options. During my investigation I did determine that StrucutreMap was the first .NET container (and I awakened a painful memory about a lost opportunity with Jeremy in the process). Ultimately I chose Spring.NET because I know how to use it already, it has multiple commiters and because of the strengths of the Java version (if the .NET edition ever catches up then I would be very happy indeed).&lt;br /&gt;&lt;br /&gt;With IoC in place and Rhino Mocks providing the ability to dynamically mock dependent objects development is proceeding at a breakneck pace. Life is good!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115618223059304488?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115618223059304488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115618223059304488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115618223059304488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115618223059304488'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/08/ioc-bliss.html' title='IoC Bliss'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115574063102262294</id><published>2006-08-16T08:55:00.000-06:00</published><updated>2006-08-16T09:07:02.786-06:00</updated><title type='text'>Which IoC Container?</title><content type='html'>I've used Spring successfully in Java projects. It is hard for me to understate how wonderful it is. I have always felt that the real benefit of IoC containers is that they promote good programming practices, in particular programming to interfaces which enables TDD. Of course ultimately you use the container to manage your dependencies but this is nothing that can't be achieved using the Service Locator pattern. The additional win of IoC is that there is no dependency on the Service Locator itself.&lt;br /&gt;&lt;br /&gt;As I hinted in my previous posting it is time to consider an IoC container for .NET. My initial thoughts were to turn to Spring but the .NET version is very immature compared to its Java compatriot, especially outside of the core DI features (Hibernate integration, JDBC templates and declarative transactions spring to mind...if you pardon the pun). Jeremy Miller's Structure map and the Castle project are alternatives.&lt;br /&gt;&lt;br /&gt;So it's time to do some research and determine which option best suits my needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115574063102262294?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115574063102262294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115574063102262294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115574063102262294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115574063102262294'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/08/which-ioc-container.html' title='Which IoC Container?'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115533912577476498</id><published>2006-08-11T17:10:00.000-06:00</published><updated>2006-08-11T17:32:05.786-06:00</updated><title type='text'>ORM: The Second Coming</title><content type='html'>I used Hibernate on a Java project last year. The endeavor was successful but the learning curve was steep and I recall some painful moments. By the time that we were done I had concluded that ORMs definitely could like up to their potential but it was going to be the third or fourth implementation before I really became comfortable with them. Since then I've spent my time in the .NET wilderness but always on existing projects that already had a Data Access Layer.&lt;br /&gt;&lt;br /&gt;This recently changed when a brand spanking new .NET 2.0 project came my way. I decided to use NHibernate for no hassle data access. I like to understand the basics first so initially I implemented something simple using nothing more than the documentation on the website and some vague recollections from last year. However very quickly I had a functional and transactional parent-child relationship.&lt;br /&gt;&lt;br /&gt;Next I started to look for an optimal approach. Once again I found an excellent article by &lt;a href="http://www.codeproject.com/aspnet/NHibernateBestPractices.asp"&gt;Billy McCafferty&lt;/a&gt;. A lot of reasonably advanced concepts are tackled but the result is sweet. And there's a gold-mine of things to learn for anyone who wants to sharpen their skills.&lt;br /&gt;&lt;br /&gt;With an entire (and ostly reusable) Data Access Layer completed in only a few days I'm next going to tackle Dependency Injection...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115533912577476498?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115533912577476498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115533912577476498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115533912577476498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115533912577476498'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/08/orm-second-coming.html' title='ORM: The Second Coming'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115386730718218890</id><published>2006-07-25T16:23:00.000-06:00</published><updated>2006-07-25T16:53:49.246-06:00</updated><title type='text'>MVP - The Resurrection</title><content type='html'>In my previous post I alluded to a &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/ImpMVCinASP.asp"&gt;poor article about MVP&lt;/a&gt; on the Microsoft Patterns &amp; Practices site that seems to misunderstand some of the key concepts underlying this pattern.&lt;br /&gt;&lt;br /&gt;However redemption for Microsfot is at hand in &lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/08/DesignPatterns/default.aspx"&gt;an article by Jean-Paul Boodhoo&lt;/a&gt; in the August 2006 issue of MSDN Magazine. However you can see that the result of proper separation is a whole lot of code (14 projects for a trivial 1 page aspx!)&lt;br /&gt;&lt;br /&gt;If you have been paying attention then you wil know that MVP has, at least according to Martin Folwer, been retired and replaced by two alternatives - Supervising Controller and Passive View. As it's name suggests the 2nd of these is the most pure (extreme) version where the View is no longer responsible for updating itself from the Model. Jean-Paul's article falls into this category. The question that you will need to ask yourself next time you are creating an aspx page is how much is too much in a View.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115386730718218890?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115386730718218890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115386730718218890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115386730718218890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115386730718218890'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/07/mvp-resurrection.html' title='MVP - The Resurrection'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-115384435749654775</id><published>2006-07-25T10:18:00.000-06:00</published><updated>2006-07-25T10:38:56.130-06:00</updated><title type='text'>MVP RIP</title><content type='html'>If you have ever tried to unit test an aspx page then you've probably discovered that the tight coupling with the ASP.NET runtime makes this task difficult if not impossible. Of course there are other options such as Selenium or NUnitAsp but these are really integration testing tools - the tests are several orders of magnitude slower to run and time consuming to write and maintain.&lt;br /&gt;&lt;br /&gt;The answer was the Model View Presenter (MVP) pattern. This is a variation on the classic Model View Controller pattern with a paper thin View layer (note to Microsoft - the code-behind is the View and NOT the Controller!). An excellent article on how to implement MVP in ASP.NET was written by &lt;a href="http://www.codeproject.com/useritems/ModelViewPresenter.asp"&gt; Bill McCafferty&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;However MVP is dead. I know this because &lt;a href="http://martinfowler.com/eaaDev/ModelViewPresenter.html"&gt;Martin Fowler says so&lt;/a&gt;. Of course it's not really dead, it's simply been split into the &lt;a href="http://martinfowler.com/eaaDev/PassiveScreen.html"&gt;Passive View&lt;/a&gt; and &lt;a href="http://martinfowler.com/eaaDev/SupervisingPresenter.html"&gt;Supervising Controller/Presenter&lt;/a&gt; patterns. I'm still digesting the implicatioins of this change and will be sure to comment more on it later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-115384435749654775?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/115384435749654775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=115384435749654775' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115384435749654775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/115384435749654775'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/07/mvp-rip.html' title='MVP RIP'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-114961212985490716</id><published>2006-06-06T09:56:00.000-06:00</published><updated>2006-07-14T12:19:18.500-06:00</updated><title type='text'>Slow Tests = No Tests</title><content type='html'>Despite the conclusion of my previous post my conscience got the better of me (it usually does). Therefore I decided to implement automatic tests for our calculation engine. I could write a wrapper class to take care of most of the setup and if these calculations are wrong the whole system is a bust.&lt;br /&gt;&lt;br /&gt;However almost immediately I ran into a problem. We use the Data Access Application Block from the Enterprise Library. One of the first things that our calculation engine does is execute a query to retrieve a pile of XML from the database. The first time that this code is executed from NUnit everything looks great (sub-second execution time). The second time however the test takes over40 seconds to complete.  A fundamental TDD principle is that the faster your tests are the more frequently you will run them and the more frequently you will find problems. I need a lot of different tests here and if they will take hours to execute I'm not going to run them!&lt;br /&gt;&lt;br /&gt;I created a simple test case and started to experiment. I tried implementing the XmlReader properly (at least as defined in the documentation). I tried using a DataSet instead of an XmlReader. I tried using SQL Server as the database in case this was an MSDE issue but it is not. I tried using a simple query that didn't even include the FOR XML AUTO clause. I tried kicking the wall and swearing. None of these made any difference.&lt;br /&gt;&lt;br /&gt;I used a profiling tool to look at what's happening in the database. The query execution time is approximatley the same each time. However on the 2nd and subsequent executions the Audit Logout event for my SPID (and a companion shadow process) is over 40 seconds.&lt;br /&gt;&lt;br /&gt;The problem does not occur in the web application itself. And if I run the NUnit tests using the 'Debugger' option of TestDriven.NET add-in (which of course is slower than standard execution) I do not encounter the issue. If I restart Visual Studio (or the TD.NET add-in from the system tray) the first execution is good and then the problem resurfaces. I experience the problem if running the tests from nunit-gui.exe but not from nunit-console.exe.&lt;br /&gt;&lt;br /&gt;Currently I am stumped. I suspect that a resource is not being cleaned up properly but how to identify which one is beyond me. Experience has taught me to take a break and come back to this later. Hopefully I'll have a revelation!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-114961212985490716?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/114961212985490716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=114961212985490716' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114961212985490716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114961212985490716'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/06/slow-tests-no-tests.html' title='Slow Tests = No Tests'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-114928877211998873</id><published>2006-06-02T16:42:00.000-06:00</published><updated>2006-06-05T08:51:19.600-06:00</updated><title type='text'>Designing for testability</title><content type='html'>I've investigated a bewildering number of TDD tools and integrated some into an existing application that I inherited. It's been a great learning experience. One of the tools that I evaluated at was FitNesse. It looks fantastic and I wrote a bunch of test tests (great English there!) but ultimately I did not integrate it into the application. I must admit that I was conscious of making things excessively difficulty for the poor schmuck who will have to support the application when I've moved onto something new and shiny. But the deciding issue was that I was not able to find a piece of the application where I could get significant value from using FitNesse as opposed to standard unit tests.&lt;br /&gt;&lt;br /&gt;That changed today when I started to look at some issues with our calculation engine. It is crying out for FitNesse tests. Our user community are much better placed to know what results to expect compared to the developers. But the difficulty of writing tests (of any type) in the calculation engine is phenomenal  due to large number of setup steps and multiple layers that must be traversed in order to perform a calculation.&lt;br /&gt;&lt;br /&gt;One of the most powerful lessons that I have learned is that TDD retrofitting is horribly painful if the application was not designed with TDD in mind. A lack of interfaces is the obvious crime and because no form of Dependency Injection is used (everything is hardwired together) it is impossible to test discrete pieces of functionality. Without a comprehensive suite of tests I don't want to risk a major refactoring exercise and that is going to leave FitNesse on the sidelines for this project which is a crying shame.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-114928877211998873?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/114928877211998873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=114928877211998873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114928877211998873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114928877211998873'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/06/designing-for-testability.html' title='Designing for testability'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-114619891722702489</id><published>2006-04-27T22:27:00.000-06:00</published><updated>2006-04-27T22:38:01.746-06:00</updated><title type='text'>TDD Uncertainty</title><content type='html'>Scott Bellware was in town today for a TDD presentation. I am not sure how successful he was in persuading the audience that writing tests first and developing in tiny increments would help improve their code (it's a paradigm shift that takes some getting used to) but nevertheless it was an informative and at times amusing presentation.  And it's great to see people of this caliber coming to Idaho.&lt;br /&gt;&lt;br /&gt;In addition he did make me aware if some great tools such as Rhino Mocks (NMock hasn't been updated since June 2004 and could do so much more). It was also interesting to note that he actually used Spring .NET which rocks in the Java world but seems to be struggling to gain traction in Microsoftland.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-114619891722702489?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/114619891722702489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=114619891722702489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114619891722702489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114619891722702489'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/04/tdd-uncertainty.html' title='TDD Uncertainty'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-114309499271551300</id><published>2006-03-22T22:57:00.000-07:00</published><updated>2006-03-22T23:23:12.733-07:00</updated><title type='text'>File Upload Frustrations</title><content type='html'>&lt;span style="font-family:arial;"&gt;In .NET 1.1 it is relatively simple to provide file upload functionality using an HtmlInputFile control e.g.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;input id="inputFile" type="file" runat="server"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Where I ran into problems was when the file exceeded the maximum size. This is controlled by the maxRequestLength attribuite of the httpRuntime element in the config file hierarchy. The default value is 4096 KB. After some expoerimentation I determined that the error could only be trapped by the Application_Error event handler in global.asax.cs. I wanted to redirect back to the calling page and display a message but I could not get this to work. Some research showed that I was not alone: &lt;a href="http://www.google.com/search?q=c%23+%22Maximum+request+length+exceeded%22&amp;hl=en"&gt;http://www.google.com/search?q=c%23+%22Maximum+request+length+exceeded%22&amp;amp;hl=en&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;I ended up using Response.Write() to output an error message on the empty page that resulted from Server.ClearError() in the event handler (you need this to stop the error bubbling up to be handled as defined by the customErrors element in web.config). I added an &amp;lt;a&amp;gt; tag that contained a JavaScript link to take the user back to where they came from but was not particularly happy with this solution.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-114309499271551300?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/114309499271551300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=114309499271551300' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114309499271551300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114309499271551300'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/03/file-upload-frustrations_22.html' title='File Upload Frustrations'/><author><name>JAGID</name><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><id>tag:blogger.com,1999:blog-24481570.post-114296546037048830</id><published>2006-03-21T11:21:00.000-07:00</published><updated>2006-03-21T11:30:11.233-07:00</updated><title type='text'>There has to be an easier way...</title><content type='html'>&lt;span style="font-family:arial;"&gt;I am working on a C# application in .NET 1.1. I have a Repeater web control to which I bind an IList of objects. Upon postback I need to know the ID of the object that I bound so that can associate the data with the correct object. I went down a lot of dead ends first but eventually I stumbled upon this solution.&lt;br /&gt;&lt;br /&gt;I created an event handler for the ItemDataBound event of the Repeater where I added the UniqueID of each control to a Hashtable. After all of the items were bound (PreRender event of the repeater) I stored the Hashtable in Viewstate. After postback I retrieve the Hashtable from Viewstate and look up the UniqueID of each RepeaterItem.&lt;br /&gt;&lt;br /&gt;This is a relatively simple approach to reproduce but it seems like a lot of work and that the framework should be able to help me more. Any ideas?&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24481570-114296546037048830?l=jagid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jagid.blogspot.com/feeds/114296546037048830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=24481570&amp;postID=114296546037048830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114296546037048830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24481570/posts/default/114296546037048830'/><link rel='alternate' type='text/html' href='http://jagid.blogspot.com/2006/03/there-has-to-be-easier-way.html' title='There has to be an easier way...'/><author><name>JAGID</name><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></feed>
