<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicious.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mike Nichols - Son Of Nun Technology : featured</title><link>http://devlicious.com/blogs/mike_nichols/archive/tags/featured/default.aspx</link><description>Tags: featured</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>Solo A Pensoso</title><link>http://devlicious.com/blogs/mike_nichols/archive/2008/04/23/solo-a-pensoso.aspx</link><pubDate>Thu, 24 Apr 2008 06:52:53 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:40189</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>1</slash:comments><comments>http://devlicious.com/blogs/mike_nichols/archive/2008/04/23/solo-a-pensoso.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://devlicio.us/blogs/mike_nichols/WindowsLiveWriter/SoloAPensoso_9CF3/andrew_wyeth_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="186" alt="andrew_wyeth" src="http://devlicio.us/blogs/mike_nichols/WindowsLiveWriter/SoloAPensoso_9CF3/andrew_wyeth_thumb.jpg" width="244" align="right" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Jimmy Bogard has a &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/04/22/should-you-tdd-when-flying-solo.aspx" target="_blank"&gt;post&lt;/a&gt; that hits the nail on the head with being a lonely programmer yet still applying TDD. I have been asked by two separate people recently what resources they should consider looking into for starting out in programming. Even though I am hardly an authority, I inevitably encourage folks just now getting into it to start learning how to apply TDD. Here are a few other benefits which I see TDD bringing to the solo developer.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Refactoring is encouraged instead of rewriting &lt;/strong&gt;. Having the freedom to do with the code what I want would usually leave the door of rewriting open to me. This not only stunts my growth as a developer who needs to learn to write code that is malleable, but also costs lots of money. But without tests in place, the paranoia would sometimes drive me to do a rewrite since the old code just didn&amp;#39;t look perfect.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;BUFD (Big Up Front Design) has a greater chance to be suppressed&lt;/strong&gt;. One of the problems with working alone is the freedom to think big about all the neat things I &lt;em&gt;could &lt;/em&gt;do rather than solving how to execute the project requirements. Since there isn&amp;#39;t someone sitting their making a face because you are off-topic on a requirement, the humble [Test] acts as that face that isn&amp;#39;t impressed by my gold-plated code.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Programming remains fun because it is doing stuff. &lt;/strong&gt;Since there aren&amp;#39;t the interesting discussions with peers or a sense of teamwork, the neat feeling we get when we see the computer doing our bidding serves to maintain some inspiration for the task-at-hand. If you are having to run the debugger and fight your way through a million NullRef exceptions or other misteaks to get to the point where you see something happening it is easy to get sidetracked or stop having fun. The feedback loop is more important for my sanity than the projects&amp;#39; success.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;I am still learning. &lt;/strong&gt;Working in small chunks seems to promote experimentation in me more than a big empty project template. If there are things I need to play around with I feel like it is easier and okay to do that within a test fixture...I realize this isn&amp;#39;t &amp;#39;TDD&amp;#39; in the sense of driving out my design using tests, but it nonetheless gives me the impression that I am free play around with something before I head the design that way.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Parameters are liberating. &lt;/strong&gt;Stravinsky once said &amp;#39;The more constraints one imposes, the more one frees one&amp;#39;s self. And the arbitrariness of the constraint serves only to obtain precision of execution.&amp;#39; I have found the simple constraint of getting a test to pass drives me to improvise more in making it do so, usually making me think more creatively.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;All I know is that I wasn&amp;#39;t delivering features to my clients with as much confidence or timeliness before I started applying the principles the people who advocate TDD do. It isn&amp;#39;t simply a matter of being disciplined, because I was quite disciplined, but I needed to focus that discipline into an paradigm that fed me as much as I feed it. For this solo pilot, TDD has scratched that itch.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=40189" width="1" height="1"&gt;</description><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/featured/default.aspx">featured</category><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/Test+Driven+Design+_2800_TDD_2900_/default.aspx">Test Driven Design (TDD)</category></item><item><title>Notification Services Distinguished From Logging Services</title><link>http://devlicious.com/blogs/mike_nichols/archive/2008/02/11/notification-services-distinguished-from-logging-services.aspx</link><pubDate>Mon, 11 Feb 2008 09:23:44 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:39419</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>6</slash:comments><comments>http://devlicious.com/blogs/mike_nichols/archive/2008/02/11/notification-services-distinguished-from-logging-services.aspx#comments</comments><description>&lt;p&gt;Freely admitting my na&amp;#239;vet&amp;#233; and rookie/booter/redshirt status , I ask a simple question: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Why are messaging services such as logging often implemented via a pattern employing some kind of globally accessible object, yet similar services for passing messages from a domain model (perhaps using a &lt;/em&gt;&lt;a href="http://martinfowler.com/eaaDev/Notification.html" target="_blank"&gt;&lt;em&gt;Notification&lt;/em&gt;&lt;/a&gt;&lt;em&gt; pattern) up to a client typically shown with handling inside of a controller/presenter try...catch statement?&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I realize this is one of those error-prone &amp;#39;one-size-fits-all&amp;#39; questions. It just seems like logging is messaging and so is notification, so why do we pass strings to calling clients for notifying them of the results of their actions while we have frameworks and static objects writing our log messages?&lt;/p&gt;  &lt;p&gt;I experimented with an Notification-like object which was bound to my Unit of Work so that events/messages that needed to get communicated to the user would get aggregated and flushed after the unit of work was complete. This &amp;#39;worked&amp;#39; by letting me simplify and standardize but I himmed-n-hawwed (redneck design technique) about the wisdom of that and in my current app haven&amp;#39;t implemented it again. &lt;/p&gt;  &lt;p&gt;Consider something like this, where we are using a globally accessibly Log object and have a &amp;#39;Client&amp;#39; method that writes the message not to a log file, but is aggregated for consumption later depending on the client type:&lt;/p&gt;  &lt;div&gt;   &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Log.For(MyObject.GetType()).Client(&lt;span style="color:#006080;"&gt;&amp;#39;The biz rule prevents this from happening.&amp;#39;&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt; The objections I can come up with are:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Doing something like this in your Domain Model violates keeping a clean separation between Domain and Client. &lt;/li&gt;

  &lt;li&gt;If something can&amp;#39;t happen as expected it IS an exception and so should be handled in traditional try..catch block&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But then my answers are&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;I am logging things that happen in my domain, so how is that different than sending client messages out? Obviously I won&amp;#39;t be passing stack traces to this &amp;#39;Client&amp;#39; and the messages would be &amp;#39;prettier&amp;#39; but I&amp;#39;d want to notify things like specification constraint violations, side-effects which were intended and noteworthy,&amp;#160; and so on, so why is throwing and exception for that (so that my client will catch it) better? &lt;/li&gt;

  &lt;li&gt;I know the common view of exceptions is that things that can&amp;#39;t be executed as expected are &lt;em&gt;exceptional&lt;/em&gt; and so should be in a try..catch and handled appropriately. Ok, but I &lt;em&gt;expect &lt;/em&gt;users to attempt some operations that due to some rule are not valid.&amp;#160; I am not talking about invalid or missing data, but rather rules which perhaps due to the results of other data make the current request invalid. Or perform some operation that changes state in many objects which is not invalid or exceptional.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I use DTOs to pass from my Tasks layer (application services in DDD-speak I believe) up to my controller and its not overwhelming to just standardize and implement these common message carriers on up the chain, but there are many times when I&amp;#39;d like to notify the client of many changes that occurred due to the action they just took . For example, we have Materials Tests that can have retests, creating a parent-child relationship. Assigning a retest automatically removes it from one parent to another parent. This all happens and the new DTO is passed to the controller, but I want to let them know all the side-effects this action caused. Something like &amp;#39;Test# 32 removed from Test#45.&amp;#160; Sample Numbers have been regenerated for this project. &amp;#39;&amp;#160; &lt;/p&gt;

&lt;p&gt;I commonly am writing repetitive code to place messages into some kind of hash that is parsed and displayed to the user, and page design changes can make a lack of common practice painful when there is much repetition like this. Even though I keep actions as atomic as possible, there are still bound to be many state changes that are worth reporting to the user, no?&lt;/p&gt;

&lt;p&gt;There are a ton of things I am sure I am not considering and I really don&amp;#39;t want a slough of staticy global &amp;quot;Manager&amp;quot;-type objects doing infrastructure stuff invading my domain, but I&amp;#39;d love to hear how other folks implement client messages up the chain while promoting code-reuse in the controller/client layers or point out considerations I am no doubt missing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=39419" width="1" height="1"&gt;</description><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/featured/default.aspx">featured</category></item><item><title>Developer's Vista Setup</title><link>http://devlicious.com/blogs/mike_nichols/archive/2007/12/05/developer-s-vista-setup.aspx</link><pubDate>Thu, 06 Dec 2007 07:19:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:38986</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>15</slash:comments><comments>http://devlicious.com/blogs/mike_nichols/archive/2007/12/05/developer-s-vista-setup.aspx#comments</comments><description>&lt;p&gt;Moving to a new machine can be like moving from a house you&amp;#39;ve lived in a long time...you just take things for granted after a while that you have set up.&lt;/p&gt;  &lt;p&gt;I got a new machine with Vista on it and decided to just start all over again installing only those things I really USE. Along the way, I had to search some resources to help me do a better job installing tools I have to have to do my job. So here&amp;#39;s a list of some quick tips that have gotten me (mostly) up to speed on the new OS. Some are tool-related and some are just Vista oddities I had to learn. This all assumes UAC is turned on (if you like pain and suffering).&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;NAnt - &lt;/strong&gt;nothing too different here, except be sure to run your command-line as an administrator. Here&amp;#39;s the &lt;a href="http://nant.sourceforge.net/release/0.85/help/introduction/installation.html" target="_blank"&gt;standard way of installing NAnt&lt;/a&gt; and &lt;a href="http://www.vistaclues.com/always-run-a-command-prompt-as-administrator/" target="_blank"&gt;here&amp;#39;s how to always run your command-line as an administrator&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Subversion&lt;/strong&gt; - want to just type &amp;#39;svn&amp;#39; from the command-line? The best installer I have found is &lt;a href="http://downloads.open.collab.net/collabnet-subversion.html" target="_blank"&gt;CollabNet&amp;#39;s&lt;/a&gt;. I used other installers but this installs Apache and sets up repository directory for you too, doing some of the steps &lt;a href="http://subversion.open.collab.net/articles/svnserve-service.htm" target="_blank"&gt;here&lt;/a&gt;, including installing Subversion as a service for you. Nice. After you have installed it, you&amp;#39;ll want to go into the firewall and open up the tcp port (3690 default) and also go into the admin MMC services list and start the service. Once done, you should be able to run &amp;#39;svn&amp;#39; from the command line. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;VisualSVN&lt;/strong&gt; - This is more of an VS 2008 issue, but be sure you are current on VisualSVN&amp;#39;s latest version, &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/11/27/vs-2008-compatibility-with-older-vs-2005-add-in-packages.aspx" target="_blank"&gt;per this post&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Total Commander - &lt;/strong&gt;Windows explorer still sucks and Total Cmd works on Vista.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;NVIDIA driver&lt;/strong&gt; - Have an NVidia card and the driver sucks (computer won&amp;#39;t sleep, etc.)? There are &lt;a href="http://forum.notebookreview.com/showthread.php?t=166532" target="_blank"&gt;tips here&lt;/a&gt; to improve Vista performance, including using a modified driver .inf to fix the lame laptop drivers for these cards. The site to get them has been down so you can try &lt;a href="http://forums.nvidia.com/index.php?showtopic=52555" target="_blank"&gt;here to get the .zip&lt;/a&gt;. I installed 163.75 and my computer sleeps now. Also ,this seemed to fix sluggish wireless keyboard action I was having. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;TortoiseSVN - &lt;/strong&gt;works fine on Vista, though I read about some problems in the past. I haven&amp;#39;t had any issues yet.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Unlocker - &lt;/strong&gt;installed just fine and works.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;IIS 7-&lt;/strong&gt; Really nice and the UI is sweet. Just be sure to enable Windows Authentication on your site if you are debugging from&amp;#160; VS.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Notepad++ - &lt;/strong&gt;The replacement for notepad.exe on the site works in Vista, but you&amp;#39;ll need to run as administrator in all the usual places. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;These are the primary tools I am using through the day that took a little work and investigation to get back to where I like things.&lt;/p&gt;  &lt;p&gt;Vista hasn&amp;#39;t been as lame or difficult as I have read so often, but it also isn&amp;#39;t a step up either I think. It&amp;#39;s hard to tell sometimes if the shutdown hangs, sleep failures, etc. are due to Vista or driver compatibility but I can say that things don&amp;#39;t feel as stable as they did on XP. Still I haven&amp;#39;t had any showstoppers related to development so that&amp;#39;s good.&lt;/p&gt;  &lt;p&gt;I&amp;#39;ll post more of these as I discover things I had to figure out.&amp;#160; The only real gripe has been the silent failure of services that haven&amp;#39;t been given administrative permission explicitly. Sometimes a service you expect to run doesn&amp;#39;t because it isn&amp;#39;t running as administrator...DaemonTools did that to me when I was trying to mount VS 2008 install.&lt;/p&gt;  &lt;p&gt;Hope this helps some one...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=38986" width="1" height="1"&gt;</description><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/featured/default.aspx">featured</category></item><item><title>Page Lifecycle Study : Part One- The Project</title><link>http://devlicious.com/blogs/mike_nichols/archive/2007/10/04/page-lifecycle-study-part-one-the-project.aspx</link><pubDate>Thu, 04 Oct 2007 08:04:53 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:38597</guid><dc:creator>Michael Nichols</dc:creator><slash:comments>9</slash:comments><comments>http://devlicious.com/blogs/mike_nichols/archive/2007/10/04/page-lifecycle-study-part-one-the-project.aspx#comments</comments><description>&lt;p&gt;This is one of those posts that pains me to write. I blame Monorail for the pain that I am now acutely aware of in working with the Web Forms model in ASP.NET. But that&amp;#39;s a whole other post...&lt;/p&gt; &lt;p&gt;Dealing with the events that take place in the lifetime of a Page in WebForms is tricky once you get beyond the demo samples. Dynamic loading of controls based on state, collection control (ie, Repeater) value persistence between postbacks, and event timing of web controls immediately reveal to the excited &amp;quot;look I can drag a GridView and see my employees table&amp;quot; developer that he has just stepped in a big pile of over-architecture and got bizarre form behavior all over him.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://devlicio.us/blogs/mike_nichols/WindowsLiveWriter/PageLifecycleStudy_30B/steppedonit.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="180" alt="steppedonit" src="http://devlicio.us/blogs/mike_nichols/WindowsLiveWriter/PageLifecycleStudy_30B/steppedonit_thumb.png" width="240" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;And that is with ViewState &lt;strong&gt;ON&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;A &lt;a href="http://blechie.com/WPierce/Default.aspx" target="_blank"&gt;wise blogger&lt;/a&gt; once wrote &lt;a href="http://blogs.meetandplay.com/WPierce/archive/2006/12/14/ViewState_is_the_Devil.aspx" target="_blank"&gt;ViewState is the devil&lt;/a&gt;&amp;nbsp;and shortly after that I was checking out &lt;a href="http://scottwater.com/blog/archive/asp-net-state-management-tips/" target="_blank"&gt;Scott Watermasysk&amp;#39;s ASP.NET tips&lt;/a&gt;&amp;nbsp;and dealing with bloated pages in my own application...I was encouraged to turn ViewState OFF and deal with the consequences. I really HAD to since my ViewState had gotten out of control. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;As if that didn&amp;#39;t complicate matters enough, I was using the Model-View-Presenter pattern and wrestled with how to implement this with a stateless view (more or less) that has a complex&amp;nbsp;strategy&amp;nbsp;for restoring values from the Request.Form collection while making the view the entry point for requests, thus seemingly forcing my Presenter/Controller into submission to the famed ASP.NET Page Lifecycle...something I was hoping to avoid.&lt;/p&gt; &lt;p&gt;I decided it was time to&amp;nbsp;just&amp;nbsp;isolate all this&amp;nbsp;and create a test bed where I could discover exactly what is happening when with actual controls and get feedback from this monster to tell me what it demands for me to simply pass data back and forth in a text stream. So I created this simple project that has quite a bit of sample data and different ways to see events firing during the postbacks. Controls like the Repeater and DropDownList are absolutely non-intuitive once ViewState is OFF and so are worth a close look on how to persist values. Also, the event handling of simple controls like the TextBox require some deeper understanding once you turn ViewState off. &lt;/p&gt; &lt;p&gt;I simply had quite a bit of difficulty finding actual code that showed things happening at different times when I was first swimming in the sea of events ASP.NET offers...all I could find were pretty diagrams and lots of code jammed in Page_Load with the occasional exotic mention of the &amp;#39;catch-up&amp;#39; performed by controls upon Controls.Add to the control hierarchy.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;So for this first post, &lt;a href="http://devlicio.us/blogs/mike%5Fnichols/downloads/PageLifecycleStudy.zip" target="_blank"&gt;here is the project&lt;/a&gt;&amp;nbsp;. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;DISCLAIMER: It&amp;#39;s not pretty, but rather could maybe be useful for people who are confused about what is happening in their pages or to teach others.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I have since settled down quite a bit regarding how I prefer to implement MVP since I created this. I&amp;#39;ll post more on what I do with MVP in the future.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=38597" width="1" height="1"&gt;</description><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/featured/default.aspx">featured</category><category domain="http://devlicious.com/blogs/mike_nichols/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>