<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8807027887663294571</atom:id><lastBuildDate>Tue, 10 Sep 2024 23:23:52 +0000</lastBuildDate><title>Stefan Moser&#39;s Blog</title><description></description><link>http://stefanmoser.blogspot.com/</link><managingEditor>noreply@blogger.com (Stefan Moser)</managingEditor><generator>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-4049787421290041319</guid><pubDate>Thu, 01 Dec 2011 04:14:00 +0000</pubDate><atom:updated>2011-11-30T20:14:42.498-08:00</atom:updated><title>Boodhoo Voodoo</title><description>&lt;p&gt;Last week I had the absolutely pleasure of attending &lt;a href=&quot;http://blog.developwithpassion.com/&quot;&gt;JP Boodhoo’s&lt;/a&gt; &lt;a href=&quot;http://www.jpboodhoo.com/training.oo&quot;&gt;Develop With Passion Bootcamp&lt;/a&gt; at my company’s office in Regina.&lt;/p&gt;  &lt;p&gt;The title of the course has recently changed from Nothing But .NET because it was misleading, and JP stated so several times during the week.&amp;#160; While we learned a lot about .NET, design patterns and test-driven development, the real goal of the course is to teach developers the skills for learning on their own and opening their minds to alternative programming methods.&amp;#160; So many developers rarely look outside of their own little circle of development for new ideas.&amp;#160; It’s comfortable in their circles and looking elsewhere is something foreign to them.&amp;#160; JP teaches the skills required to make those leaps outside of your comfort zone and be able to continually expand the boundaries of your skillset.&lt;/p&gt;  &lt;p&gt;For some courses it is viable to send one person and have him bring back his learnings to the team.&amp;#160; This is &lt;strong&gt;not&lt;/strong&gt; one of those course.&amp;#160; It &lt;i&gt;has&lt;/i&gt; to be experienced first-hand.&amp;#160; JP is extremely passionate about development and that passion is infectious.&amp;#160; His ability to inspire developers and make people want to become better programmers is second to none.&amp;#160; The course is carefully designed to guide each developer through a personal journey that cannot be replicated by someone else.&amp;#160; JP has a special talent for inspiring people to strive to be better developers, and coupled with his ability to teach the skills to continue learning is a unique combination that has to be experienced in person.&lt;/p&gt;  &lt;p&gt;This is definitely a course where you get out of it what you put into it.&amp;#160; JP really challenges you and forces you outside of your comfort zone.&amp;#160; I can say with certainty that every single person in attendance was quickly forced out of the comfort zone that they were used to being in when coding.&amp;#160; What happened next was up to the individual.&amp;#160; Those who chose to embrace that awkward feeling and challenged themselves to learn something new got full value out of the course.&amp;#160; They learned a lot about patterns and different coding techniques and, more importantly, learned the skills required to keep the momentum of learning going.&amp;#160; They not only became better developers in that week, they have set themselves up for continuing that rapid growth for a long time to come.&amp;#160; However, those who chose to fight the discomfort and actively tried to get back into their developer rut, likely didn’t learn much and won’t have a very positive reflection on the course.&lt;/p&gt;  &lt;p&gt;I highly recommend this course for developers of all levels.&amp;#160; There is nothing more valuable in a developer than an active engagement and desire to continually improve their skills.&amp;#160; I have been involved in the developer community for over 10 years and I know several other people who have taken this course.&amp;#160; They couldn’t say enough good things about it and used the skills they learned to launch their careers to new heights.&amp;#160; Having now taken the course myself, I can honestly say that this course is a great way to propel your skills to the next level.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2011/11/boodhoo-voodoo.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-8375396083487946797</guid><pubDate>Tue, 10 May 2011 05:00:00 +0000</pubDate><atom:updated>2011-05-09T22:00:01.702-07:00</atom:updated><title>The Report of ALT.NET’s Death Was an Exaggeration</title><description>&lt;p&gt;I spent last weekend in Redmond at ALT.NET Seattle 2011 and it was an amazing experience.&amp;#160; This is the 3rd ALT.NET conference that I’ve attended and they’ve all been unique experiences.&lt;/p&gt;  &lt;h2&gt;A New Breed&lt;/h2&gt;  &lt;p&gt;There were very few of the original ALT.NET leaders at the conference, but it was awesome to see so many new people picking up the torch.&amp;#160; There was a significant change in the atmosphere from previous ALT.NET conferences too.&amp;#160; The theme of the conference was “practice don’t preach” and it was reflected in the attendees and conversations.&amp;#160; I had so many great conversations with people based on their experiences and practices that they actually use.&lt;/p&gt;  &lt;p&gt;James Shore gave an excellent keynote speech about cargo cults and how it’s important to understand the substance of an idea.&amp;#160; This concept was solidified for me in a session about CQRS, which many believe is a cargo cult, but it was the most pragmatic conversation about CQRS that I’ve ever had.&amp;#160; There was as much talk about when not to use it as there was about its benefits.&amp;#160; All of the proponents of CQRS warned about the pitfalls and downside to it and provided a lot of experience based expertise.&amp;#160; I didn’t hear a lot of talks with this kind of tone at previous ALT.NET conferences and it really struck me how the community has evolved.&lt;/p&gt;  &lt;h2&gt;Not Satisfied&lt;/h2&gt;  &lt;p&gt;One of the most thought provoking sessions happened near the end of the second day where a great discussion about learning occurred.&amp;#160; If this conversation would have occurred at the first ALT.NET conference that I attended, it would have focused on TDD, Agile and pair programming.&amp;#160; This time around those topics are accepted and we talked about pushing those techniques even further and incorporating organization learning techniques.&amp;#160; It’s great to see how those early topics have been accepted and new ideas can be discussed to raise the bar even higher.&lt;/p&gt;  &lt;p&gt;I had so many conversations with people who didn’t care about buzzwords and rhetoric and just wanted to find better ways to develop software.&amp;#160; It wasn’t about who the big names were, just about sharing ideas.&lt;/p&gt;  &lt;h2&gt;ALT.NET Lives On&lt;/h2&gt;  &lt;p&gt;ALT.NET isn’t dead, not by a long shot.&amp;#160; Just because most of the original ALT.NET leaders have moved on, a new generation of ALT.NETers have picked up the torch and are running with it.&amp;#160; It may not be as in-your-face as it used to be, but those involved in the community are still pushing the .NET community as a whole forward.&amp;#160; The ALT.NET community has evolved and it continues to provide a huge amount of value to the .NET community as a whole.&amp;#160; It was a fantastic experience and I can’t wait to apply all of the new things that I learned.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2011/05/report-of-altnets-death-was.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-5825254018293143191</guid><pubDate>Wed, 02 Mar 2011 00:27:00 +0000</pubDate><atom:updated>2011-03-01T19:58:51.253-08:00</atom:updated><title>Software Developer Résumé Tips</title><description>&lt;p&gt;I’m currently in a situation where I’m part of a hiring team for two different companies.&amp;#160; I’ve been up to my eyeballs in developers’ résumés and I have to say that I’ve been less than impressed.&amp;#160; The problem is that very few developers put anything in their résumé that distinguishes themselves from others.&amp;#160; For the most part I’ve seen long lists of tools and technologies used, lists of places the applicant has worked along with more lists of tools and technologies they’ve used, and a short list of their education.&amp;#160; None of this makes the applicant stand out as a developer.&lt;/p&gt;  &lt;p&gt;Here are some tips that will help your résumé stand out and will get you to the next stage in the hiring process.&lt;/p&gt;  &lt;h2&gt;Passion&lt;/h2&gt;  &lt;p&gt;Tell me that you actually like doing what you do.&amp;#160; Tell me about the books that you’ve read, the user groups you attend, the blogs that you read and the podcasts you listen to.&amp;#160; It’s even better is you can link to your own blog and the open source projects you work on.&amp;#160; Tell me why these things are important to you and how they help make you a better developer.&amp;#160; I need to know that you’re not just coasting through your career and that you’re constantly trying to improve your skill set.&amp;#160; I guarantee you that the job you’re applying for is not exactly the same as the one you have and I need to know that you will be able to adapt and thrive in a new environment.&amp;#160; I want to know that you bring fresh ideas to the team and will help the team take advantage of changing technologies.&lt;/p&gt;  &lt;h2&gt;Champion Change&lt;/h2&gt;  &lt;p&gt;Tell me about how you’ve driven change in your development team to make it more productive, raised the quality of the code or reduced the bug count.&amp;#160; Tell me about a pain that your team had and what you did to fix it.&amp;#160; I want to know that you care about your team and that you care about the products your team produces.&amp;#160; I need to know that you will be an asset to the team and will take action when you see a need.&lt;/p&gt;  &lt;h2&gt;Stand Out&lt;/h2&gt;  &lt;p&gt;Remember that you’re certainly not the only qualified candidate applying for the position and you must make your résumé stand out.&amp;#160; Think about what’s on your résumé and how unique it makes you look.&amp;#160; Ask yourself if it highlights what makes you the best candidate for the position.&lt;/p&gt;  &lt;h2&gt;Work Experience&lt;/h2&gt;  &lt;p&gt;Yes, work experience is important.&amp;#160; The problem is that I’m learning way more about the companies you’ve worked for than I’m learning about you!&amp;#160; Don’t just give me your company’s elevator pitch, your job description and a list of tools.&amp;#160; Tell me about a valuable skill that you learned.&amp;#160; Tell me something outstanding that you did to make the project succeed.&amp;#160; Tell me how this experience has made you a better developer and how you will be able to apply those skills at your new job.&lt;/p&gt;  &lt;p&gt;Think about what makes you stand out as a developer and ask yourself if that is reflected in your résumé.&amp;#160; Make sure that your strongest assets are highlighted and will stand out to the person reading it.&amp;#160; If you follow this advice you will have a much greater chance of moving to the next stage in the hiring process.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2011/03/software-developer-resume-tips.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-5130063062373147579</guid><pubDate>Thu, 24 Feb 2011 22:27:00 +0000</pubDate><atom:updated>2011-02-24T14:28:31.541-08:00</atom:updated><title>ADO.NET Query Causes SQL Server to Ignore Primary Key Index</title><description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;*Disclaimer*&lt;/em&gt;&lt;/strong&gt; I am not a DBA. I&#39;m just a poor, humble developer. I just happened to be the guy standing closest to the server when the DBA quit.&lt;sup&gt;1&lt;/sup&gt;&lt;/p&gt; &lt;h2&gt;The Story&lt;/h2&gt; &lt;p&gt;I came across a performance bottleneck today that had me stumped for a while.&amp;#160; A query to the database, for a single record, by the primary key, was taking 3 seconds.&amp;#160; Let me say that again, by the primary key, for a single record, taking 3 seconds.&amp;#160; How could this possibly be?&amp;#160; I pulled the query out into Management Studio and ran the query again after turning on the option to display the actual query plan. (Query –&amp;gt; Include Actual Execution Plan)&amp;#160; I was quite surprised when the query plan was not using the primary key index at all.&amp;#160; To make a long story short, SQL Server didn’t use the primary key index because the generated query supplied the parameters as NVarChar while the actual columns were VarChars.&lt;/p&gt; &lt;h2&gt;The Cause&lt;/h2&gt; &lt;p&gt;The query was generated by an open source tool, so I was able to dig in to find out how it crafted the query.&amp;#160; Basically it came down to this code:&lt;/p&gt; &lt;pre class=&quot;brush: csharp&quot;&gt;IDbDataParameter parameter = command.CreateParameter();&lt;br /&gt;parameter.ParameterName = paramPrefix + name;&lt;br /&gt;parameter.Value = val ?? DBNull.Value;&lt;br /&gt;command.Parameters.Add(parameter);&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This is pretty standard code for ADO.NET but the key isn’t in what’s there, it’s in what is not there.&amp;#160; The parameter’s type is not specific which causes the .NET framework to use it’s own mapping of .NET type to SQL Server type.&amp;#160; The value that was being passed into this piece of code was a string and automatically got mapped as an NVarChar, or System.Data.DbType.String.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;The Solution&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;To get around this default I needed to use my own mapping to use the non-unicode string type.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;parameter.DbType = DbType.AnsiString;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;With this additional line of code, this query executed infinitely faster; I’m not kidding.&amp;#160; It went from taking around 3 seconds and now consistently measures at 0 milliseconds.&amp;#160; How often can you claim an infinite performance optimization in your system?&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;font size=&quot;1&quot;&gt;This story is not true. It&#39;s a lie, made up.&amp;#160; There’s has never been a DBA here, and if there had been, I would not have set foot anywhere near the server just to avoid such a situation.&amp;#160; However, in many cases I am the Accidental DBA and I find myself struggling through problems just like this one.&lt;/font&gt;&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2011/02/adonet-query-causes-sql-server-to.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-1128498335327320649</guid><pubDate>Thu, 27 Jan 2011 17:27:00 +0000</pubDate><atom:updated>2011-01-27T09:33:51.680-08:00</atom:updated><title>Messing around with C# dynamic</title><description>&lt;p&gt;At last night’s &lt;a href=&quot;http://grou.ps/altnetvan&quot;&gt;ALT.NET Vancouver&lt;/a&gt; meet up we were talking about the dynamic keyword in C# 4.0 and how it could be used for dispatching a message to the appropriate message handler.&amp;#160; The conversation with a look at &lt;a href=&quot;http://twitter.com/lucisferre&quot;&gt;Chris Nicola’s&lt;/a&gt; &lt;a href=&quot;http://lucisferre.net/2011/01/18/being-dynamically-typed-in-a-statically-typed-world/&quot;&gt;blog post on the topic&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The first test that he shows in the post fails.&amp;#160; &lt;/p&gt; &lt;pre class=&quot;brush: csharp&quot;&gt;[Test]&lt;br /&gt;public void cant_pass_base_class_to_function_dynamically()&lt;br /&gt;{&lt;br /&gt;    dynamic handler = new FooMessageHandler();&lt;br /&gt;    IMessage message = new FooMessage();&lt;br /&gt;    handler.Handle(message);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;To me, this was expected.&amp;#160; Despite using the dynamic keyword for the message handler, the C# compiler is still going to use the same algorithm for method matching as it does on a static object.&amp;#160; To make this method pass we need to add our own method matching, and in C# dynamic, that means overriding the TryInvokeMember method.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)&lt;br /&gt;{&lt;br /&gt;    result = null;&lt;br /&gt;&lt;br /&gt;    if (binder.Name == &amp;quot;Handle&amp;quot; &amp;amp;&amp;amp; args.Length == 1 &amp;amp;&amp;amp; args[0].GetType() == typeof(FooMessage))&lt;br /&gt;    {&lt;br /&gt;        Handle((FooMessage) args[0]);&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This code looks to see if the Handle method was being called and then checks if the argument passed in will satisfy the real method then calls then method. It&#39;s not the cleanest code, but the test does pass with this override. We can take it a little further and move the method to the base class so that we don&#39;t have to repeat the override for each message handler.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)&lt;br /&gt;{&lt;br /&gt;    result = null;&lt;br /&gt;&lt;br /&gt;    if (binder.Name == &amp;quot;Handle&amp;quot; &amp;amp;&amp;amp; args.Length == 1 &amp;amp;&amp;amp; args[0].GetType() == typeof(T))&lt;br /&gt;    {&lt;br /&gt;        Handle((T)args[0]);&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return false;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;One of the conclusions that we reached at the meet up was that dynamic is well suited to where reflection would have been used.&amp;#160; I have done message dispatching with reflection in the past and I think I like this approach better once I clean up the code a little more.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;P.S. Also check out Cliff Hammerschmidt’s post on &lt;a href=&quot;http://cliff.hammerschmidt.ca/software-development/graft-on-visitor-in-c&quot;&gt;Graft-on Visitor in C#&lt;/a&gt;.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2011/01/messing-around-with-c-dynamic.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-7590861773290419442</guid><pubDate>Fri, 07 Jan 2011 23:30:00 +0000</pubDate><atom:updated>2011-01-07T15:38:00.242-08:00</atom:updated><title>Inversion of Control: It’s All About Decoupling</title><description>&lt;p&gt;I&#39;ve been using Dependency Injection and Inversion of Control for a few years now and have always wondered why there is such resistance to the concept. I&#39;ve heard the argument that it seems too complex and on a not-so-recent Dot Net Rocks episode, Richard Campbell was concerned that it would make debugging more difficult. To me, Dependency Injection and Inversion of Control are just fancy words for a technique designed to reduce the coupling in your system.&lt;/p&gt;  &lt;p&gt;Coupling is one of those terms that everyone knows, but few pay much attention to on a daily basis. I can remember an exam I wrote for a second year Computer Science course that had the following multiple choice question on it: &lt;/p&gt;  &lt;p&gt;Object-oriented code should exhibit these characteristics:&lt;/p&gt;  &lt;p&gt;a) High coupling, high cohesion    &lt;br /&gt;b) Low coupling, high cohesion     &lt;br /&gt;c) High coupling, low cohesion     &lt;br /&gt;d) Low coupling, low cohesion &lt;/p&gt;  &lt;p&gt;I knew the answer right away, but thinking back on it, I couldn&#39;t have gone into much more detail about what those terms actually meant, or more importantly, how to apply the principles to code. I’ve found that coupling and cohesion are concepts that most people take a long time to apply at anything more than an elementary level.&lt;/p&gt;  &lt;p&gt;At one place where I used to work, the development team completed 360 degree evaluations of the each other. One of the characteristics that we evaluated each other on was that we wrote “quality object-oriented code that displayed a low level of coupling and a high level of cohesion.” Vague I know, but what was most interesting about it was that the developers who wrote the poorest code in this regard scored themselves the highest, and the developers who wrote the best code, scored themselves the lowest. I interpreted this to mean that the developers who fully understood what it meant to write loosely coupled code were able to remove much of the coupling from their code, but were also keenly aware of the coupling that they left behind.&lt;/p&gt;  &lt;p&gt;The argument that IoC makes debugging more difficult doesn’t hold any weight to me.&amp;#160; The argument is that you don’t know exactly which implementation is being called when a method is called because the call is to an interface or an abstract class and not a concrete dependency.&amp;#160; Now listen up people, cause I’m going to let you in on a little secret, THAT’S CALLED LOW COUPLING!&amp;#160; You’re only coupled to the interface, not the implementation, that’s what object orientation is all about!&lt;/p&gt;  &lt;p&gt;So the next time someone tries to argue against IoC because it’s too complicated, just remind them about the foundations of object-oriented programming.&lt;/p&gt;</description><link>http://stefanmoser.blogspot.com/2008/09/inversion-of-control-its-all-about.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-416869576825147981</guid><pubDate>Sat, 06 Nov 2010 19:27:00 +0000</pubDate><atom:updated>2010-11-06T12:27:01.346-07:00</atom:updated><title>Agile Vancouver 2010 Tutorial Materials</title><description>&lt;p&gt;As promised, here are the materials from the Domain Patterns Big &amp;amp; Small tutorial.&amp;#160; Chris has posted his material on &lt;a href=&quot;http://lucisferre.net/2010/11/05/a-brief-introduction-to-cqrs/&quot;&gt;his blog&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://dl.dropbox.com/u/5885776/Domain%20Patterns%20Big%20and%20Small.pptx&quot; href=&quot;http://dl.dropbox.com/u/5885776/Domain%20Patterns%20Big%20and%20Small.pptx&quot;&gt;Domain Patterns Big and Small.pptx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://dl.dropbox.com/u/5885776/Samples%20%28Before%29.zip&quot; href=&quot;http://dl.dropbox.com/u/5885776/Samples%20%28Before%29.zip&quot;&gt;Samples (Before).zip&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title=&quot;http://dl.dropbox.com/u/5885776/Samples%20%28After%29.zip&quot; href=&quot;http://dl.dropbox.com/u/5885776/Samples%20%28After%29.zip&quot;&gt;Samples (After).zip&lt;/a&gt;&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2010/11/agile-vancouver-2010-tutorial-materials.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-2293294219467511521</guid><pubDate>Fri, 26 Mar 2010 19:29:00 +0000</pubDate><atom:updated>2016-06-15T15:23:32.553-07:00</atom:updated><title>Technical Debt, Non-Technical Managers and Tony Soprano</title><description>&lt;p&gt;Yesterday’s &lt;a href=&quot;http://msdn.microsoft.com/en-ca/ff182908.aspx&quot;&gt;Ignite Your Coding&lt;/a&gt; webcast featured &lt;a href=&quot;http://laribee.com/&quot;&gt;Dave Laribee&lt;/a&gt; speaking about &lt;a href=&quot;http://en.wikipedia.org/wiki/Technical_debt&quot;&gt;technical debt&lt;/a&gt;.&amp;#160; It was very insightful and Dave made several great points that make the technical debt metaphor more powerful.&amp;#160; One point that struck a cord with me was that of “high-interest debt”.&amp;#160; I’ve always found the technical debt to be a very powerful when talking with other developers, however, it seems to lose it’s effectiveness when talking with non-technical managers.&lt;/p&gt;  &lt;h2&gt;A Short Story&lt;/h2&gt;  &lt;p&gt;A few years ago I worked on a project that had a lot of technical debt, like mountains of debt.&amp;#160; New development was painfully slow because of all the crappy code that we had to wade through just to make a simple change.&amp;#160; The dev team had all sorts of inside jokes about it and any estimates that were given were always padded with a hefty “tax”.&amp;#160; We all knew that we had loads of technical debt and had to do something about it, but the message always seemed to get lost when communicating this to management.&amp;#160; Looking back now I can’t blame them at all because in their eyes, debt was how you grew the company.&amp;#160; The company had been built with loans from angel investors and venture capitalists and this was considered a good thing, this is how the company was able to grow to the size it had in the short period of time that it had.&lt;/p&gt;  &lt;h2&gt;High-Interest Debt&lt;/h2&gt;  &lt;p&gt;What we as a development team failed to communicate was that the technical debt we had incurred was not the technical equivalent of loans from angel investors and venture capitalists.&amp;#160; No, we had borrowed from &lt;a href=&quot;http://en.wikipedia.org/wiki/Tony_Soprano&quot;&gt;Tony Soprano&lt;/a&gt; and every other loan shark in town, we’d maxed our the credit cards and had 3 mortgages on our homes.&amp;#160; The fact is that in software, the interest rate on technical debt can run much higher than what business people are used to in the financial world.&lt;/p&gt;  &lt;h2&gt;Metaphors&lt;/h2&gt;  &lt;p&gt;This is the inherent danger of all metaphors, they only take the concept so far and end up implying meaning that was never intended.&amp;#160; As business person already has preconceived notions about borrowing and debt that they will carry with them when speaking about this metaphor.&amp;#160; From now on, I will make an effort to clarify the “interest rate” when speaking about technical debt to non-technical managers.&lt;/p&gt;  &lt;h2&gt;Paying Down Technical Debt&lt;/h2&gt;  &lt;p&gt;I would be remiss if I didn’t touch on strategies for paying down technical debt and the best resource I’ve seen is Dave’s article in MSDN magazine titled &lt;a href=&quot;http://msdn.microsoft.com/en-ca/magazine/ee819135.aspx&quot;&gt;“Using Agile Techniques to Pay Back Technical Debt”&lt;/a&gt;.&amp;#160; Go check it out so that you can start to pay down your debt and get Tony off your back so you won’t end up swimming with the fishes!&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2010/03/technical-debt-non-technical-managers.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-9141164108209499562</guid><pubDate>Thu, 18 Mar 2010 19:10:00 +0000</pubDate><atom:updated>2010-03-18T12:10:52.482-07:00</atom:updated><title>Speaking on Domain-Driven Design at .NET BC User Group</title><description>&lt;p&gt;I confirmed this week that I’ll be speaking at the .NET BC User Group in July.&amp;#160; The title of my talk is “Domain-Driven Design: Redux” and it is a reflection of how I would have preferred to learn Domain-Driven Design if I got the chance to start again.&lt;/p&gt;  &lt;p&gt;There is a scene in &lt;a href=&quot;http://www.imdb.com/title/tt0119217/&quot;&gt;Good Will Hunting&lt;/a&gt; where Ben Affleck’s character, Chuck, is in a bar trying to pick up a girl.&amp;#160; Another guy steps in a tries to show up Chuck by spouting his opinions on what he learned in an MIT class that Chuck said he had taken.&amp;#160; Matt Damon’s character, Will, steps in to confront the other guy and lectures him that he only holds his current opinions because he hasn’t taken the follow up course yet, and when he does, he will predictably hold a different opinion.&amp;#160; The point here is that Will has already taken the journey through the stages of learning and he recognizes the mistakes that the other guy is making, simply because he hasn’t progressed far enough in his thinking to understand the higher concepts.&lt;/p&gt;  &lt;p&gt;This is a pattern that happens in Domain-Driven Design all the time, I went through it myself, and it sucks.&amp;#160; When I first learned about DDD I was so caught up in the details of entities, value objects and services, that I lost sight of why I even cared about these patterns.&amp;#160; I spent days trying to decide whether or not entities were allowed to call into services, I spent weeks searching for sample applications that modeled simple domains, I spent months figuring out how I could break the aggregate root pattern.&amp;#160; These are all common stages that DDD newbies progress through, and they’re all pretty much irrelevant to DDD.&lt;/p&gt;  &lt;p&gt;Domain-Driven Design newbies tend to focus on the details of the mechanics of DDD rather than focussing on the essence, “tackling complexity in the heart of software.”&amp;#160; When we ignore the essence and focus on the mechanics, the mechanics feel very cumbersome and many people get frustrated by the complexity that they feel DDD has &lt;em&gt;added&lt;/em&gt;, exactly the &lt;strong&gt;opposite&lt;/strong&gt; effect that was desired.&lt;/p&gt;  &lt;p&gt;This talk will emphasize the parts of Domain-Driven Design that I find are the most valuable.&amp;#160; By focusing on these essential elements, the mechanics become more natural and have their intended effect of making complex logic more easily represented in code.&amp;#160; If you’re interested in hearing more, please join us on July 7th 2010 at the BCIT Burnaby campus for a jam packed evening of all things DDD.&amp;#160; More details here: &lt;a title=&quot;http://www.netbc.ca/DNCal/EventDetail.aspx?date=2010/07/07&quot; href=&quot;http://www.netbc.ca/DNCal/EventDetail.aspx?date=2010/07/07&quot;&gt;http://www.netbc.ca/DNCal/EventDetail.aspx?date=2010/07/07&lt;/a&gt;&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2010/03/speaking-on-domain-driven-design-at-net.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-2061175799744581234</guid><pubDate>Wed, 10 Mar 2010 17:53:00 +0000</pubDate><atom:updated>2010-03-10T09:57:11.009-08:00</atom:updated><title>Judiciously Exposing Collections in the Domain</title><description>&lt;p&gt;This is a follow-up to Jimmy Bogard’s blog post found here: &lt;a href=&quot;http://www.lostechies.com/blogs/jimmy_bogard/archive/2010/03/10/strengthening-your-domain-encapsulated-collections.aspx&quot;&gt;http://www.lostechies.com/blogs/jimmy_bogard/archive/2010/03/10/strengthening-your-domain-encapsulated-collections.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Jimmy does a good job of explaining why exposing your collections as IList or IList&amp;lt;T&amp;gt; is likely not the best choice for your domain.&amp;#160; His basic argument is that collections should only be exposed as immutable collections to client code.&lt;/p&gt;  &lt;p&gt;Like Jimmy, I often expose collections as IEnumerable&amp;lt;T&amp;gt; but have run into problems with that too.&amp;#160; While IList&amp;lt;T&amp;gt; with its 9 methods and 3 properties is&amp;#160; exposing more than you want to, IEnumerable&amp;lt;T&amp;gt; often proves too limited with only its single GetEnumerator() method.&amp;#160; I have found that creating custom collection classes has become an increasingly valuable method for showing intent.&lt;/p&gt;  &lt;p&gt;Let’s take a very simple example, we want to expose a count of the orders that a customer has, and yes, I know there is a Count extension method on IEnumerable&amp;lt;T&amp;gt;, but bear with me, we’re starting simple here.&amp;#160; Using Jimmy’s Customer/Order example, our classes would look like this:&lt;/p&gt;  &lt;pre class=&quot;brush: csharp&quot;&gt;public class Customer&lt;br /&gt;{&lt;br /&gt;    public OrderCollection Orders { get; private set; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class OrderCollection : IEnumerable&amp;lt;Order&amp;gt;&lt;br /&gt;{&lt;br /&gt;    private IList&amp;lt;Order&amp;gt; orders;&lt;br /&gt;&lt;br /&gt;    public int Count&lt;br /&gt;    {&lt;br /&gt;        get { return orders.Count; }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public OrderCollection(IEnumerable&amp;lt;Order&amp;gt; orders)&lt;br /&gt;    {&lt;br /&gt;        this.orders = new List&amp;lt;Order&amp;gt;(orders);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public IEnumerator&amp;lt;Order&amp;gt; GetEnumerator()&lt;br /&gt;    {&lt;br /&gt;        return orders.GetEnumerator();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    IEnumerator IEnumerable.GetEnumerator()&lt;br /&gt;    {&lt;br /&gt;        return GetEnumerator();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Notice that you can still use the Orders property on Customer as an IEnumerable&amp;lt;Order&amp;gt; and we’ve also added a Count property.&amp;#160; That was a very trivial example, so let’s look at something more interesting.&lt;/p&gt;&lt;p&gt;One of our requirements is to track the customer’s most recent order, so let&#39;s add this method to OrderCollection:&lt;/p&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;    public Order GetMostRecent()&lt;br /&gt;    {&lt;br /&gt;        return (&lt;br /&gt;            from o in orders&lt;br /&gt;            orderby o.OrderDate descending&lt;br /&gt;            select o&lt;br /&gt;            ).FirstOrDefault();&lt;br /&gt;    }&lt;/pre&gt;&lt;p&gt;We&#39;ve added a method to our collection class that clearly states its intention.&amp;#160; We haven’t over exposed other methods in order to achieve the requirement.&amp;#160; We can test this method in isolation from the Customer class and we’ve encapsulated the logic and abstracted it away from other code.&lt;/p&gt;&lt;p&gt;There’s all sorts of methods that we could add to OrderCollection as required in our domain.&amp;#160; We could add a method that returned all of the unshipped orders, or the delinquent orders.&amp;#160; Whatever our domain requires, we have a place in our domain where the code belongs.&lt;/p&gt;&lt;p&gt;Collections within the domain are often over exposed and not well encapsulated.&amp;#160; By creating simple custom collection classes we create intention revealing classes that don’t expose unwanted behaviour.&amp;#160; They make the domain more discoverable, testable and encapsulated.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2010/03/judiciously-exposing-collections-in.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-229225068693475078</guid><pubDate>Mon, 26 Oct 2009 22:28:00 +0000</pubDate><atom:updated>2009-10-26T15:28:28.183-07:00</atom:updated><title>My Apps Are On The Topshelf!</title><description>I stumbled across &lt;a href=&quot;http://code.google.com/p/topshelf/&quot;&gt;Topshelf&lt;/a&gt; the other day on Twitter (sorry, can’t remember who) and just deployed my first service using it.&amp;#160; Topshelf is a bootstrapper for services that lets you run them as console apps or Windows Services without have to go through the hassle of actually creating a Windows Services.&amp;#160; The best thing I can say about it is that it just works, no fuss.&amp;#160; You can read this &lt;a href=&quot;http://codebetter.com/blogs/dru.sellers/archive/2009/01/11/topshelf.aspx&quot;&gt;blog post&lt;/a&gt; for more information.&amp;#160; Awesome job guys!  </description><link>http://stefanmoser.blogspot.com/2009/10/my-apps-are-on-topshelf.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-1554883294045298731</guid><pubDate>Thu, 01 Oct 2009 19:27:00 +0000</pubDate><atom:updated>2009-10-01T12:29:10.110-07:00</atom:updated><title>You can do *what* with an Auto Property?</title><description>&lt;p&gt;I hate auto properties.&amp;#160; You know, these things:&lt;/p&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public string UserName { get; set; }&lt;/pre&gt;&lt;p&gt;That’s right, I can’t stand the fact that the language makes it so easy for me to break encapsulation on my objects.&amp;#160; I find it insulting that .NET thinks I would rather save a few character strokes on the keyboard than actually follow the most basic of object-oriented principles.&lt;/p&gt;&lt;p&gt;Until now…&lt;/p&gt;&lt;p&gt;I have this property on an object:&lt;/p&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public string UserName { get { return _userName; } }&lt;/pre&gt;&lt;p&gt;I was a little curious today when I looked at my read-only property (because &lt;strong&gt;&lt;em&gt;all&lt;/em&gt;&lt;/strong&gt; of my properties are read-only) and I noticed that &lt;a href=&quot;http://www.jetbrains.com/resharper/&quot;&gt;ReSharper&lt;/a&gt; had put a barely noticeable little green line under the first two letters of the&amp;#160; property name.&amp;#160; I’d seen this little green line before, but ignored it every time.&amp;#160; I was a little curious what it thought I could to do make this code better, so I hovered my mouse over it and was a little surprised to see it suggest that I should convert it to an auto property.&amp;#160; I mean, seriously ReSharper, there is &lt;strong&gt;&lt;em&gt;no way&lt;/em&gt;&lt;/strong&gt; that I’m going to convert that into an auto property because auto properties &lt;strong&gt;&lt;em&gt;require&lt;/em&gt;&lt;/strong&gt; a setter and setters are &lt;a href=&quot;http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html&quot;&gt;just plain evil&lt;/a&gt;!&amp;#160; Ok, I get the irony in linking to that article since it says setters &lt;strong&gt;&lt;em&gt;and getters&lt;/em&gt;&lt;/strong&gt; are evil, but I’m willing to ignore that for now if you are.&lt;/p&gt;&lt;p&gt;Anyway, ReSharper thought I should use an auto property and I was steadfast against it, but I was curious.&amp;#160; I’ve been using ReSharper for a few years and I accept nearly all of the suggestions it makes, but this one was getting the better of me.&amp;#160; I was all ready to go on a big rant when I accepted the suggestion and ReSharper just went ahead and added the setter for me…but it didn’t…well…not really…at least not how I expected it to.&amp;#160; This is what it did:&lt;/p&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public string UserName { get; private set; }&lt;/pre&gt;&lt;p&gt;A private setter!&amp;#160; Why didn&#39;t &lt;strong&gt;&lt;em&gt;I&lt;/em&gt;&lt;/strong&gt; think of that?!&amp;#160; Alright, you already knew that, this is no big deal to you, that’s OK.&amp;#160; This is one of those little language features that, for whatever reason, I had never stumbled across before.&amp;#160; It’s a small change, but I like it.&amp;#160; I think I’ll accept that suggestion, thanks ReSharper.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/10/you-can-do-what-with-auto-property.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-3137867370245948115</guid><pubDate>Fri, 18 Sep 2009 23:18:00 +0000</pubDate><atom:updated>2009-09-22T19:49:54.658-07:00</atom:updated><title>Business Logic Patterns</title><description>&lt;p&gt;&lt;em&gt;All of the patterns here are taken from Martin Fowler’s excellent book &lt;a href=&quot;http://martinfowler.com/books.html&quot;&gt;Patterns of Enterprise Application Architecture&lt;/a&gt;.&amp;#160; The following is my interpretation of these patterns and the ramifications of each one.&amp;#160; I highly recommend that you refer back to PoEAA for a full explanation of each pattern.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I presented a session on the first day of TechDays in Vancouver called “Layers: The Secret Language of Architects.”&amp;#160; As part of that presentation we discussed some of the different patterns that are used for coding our business logic.&amp;#160; After the session was over, several people commented that they particularly liked this part of the session and encouraged me to blog about it, so without further ado…&lt;/p&gt;  &lt;h1&gt;The Patterns&lt;/h1&gt;  &lt;h3&gt;Transaction Script&lt;/h3&gt;  &lt;p&gt;Transaction script is the simplest of the three patterns.&amp;#160; It is represented by simple procedural code that executes business logic with simple and straight forward programming constructs and does not use object oriented techniques.&lt;/p&gt;  &lt;p&gt;Transaction Script should be used when the application has very simple business logic and is not expected to grow much beyond the initial development effort.&amp;#160; It is very quick and easy to get going with Transaction Script because it does not require much in terms of supporting infrastructure.&amp;#160; However, I strongly recommend that if you decided to use Transaction Script that you make explicit seams around it so that when (yes, when, not if) you decide that your application has outgrown the limits of the pattern it will only mean a rewrite of the business logic and not a rewrite of the entire application.&amp;#160; As the complexity of the system grows, the Transaction Script breaks down quite fast.&amp;#160; It causes a lot of duplication and often results in rigid and brittle systems.&lt;/p&gt;  &lt;p&gt;Here is a sample of some Transaction Script code.&amp;#160;&amp;#160; I’ll be using the canonical example of a funds transfer where a given amount is transferred from one account to another.&amp;#160; The logic is intentionally kept very simple so that it’s easier to talk about the different responsibilities being addressed in the code. &lt;/p&gt;  &lt;pre class=&quot;brush: csharp&quot;&gt;public class FundsTransferService&lt;br /&gt;{&lt;br /&gt;    public void TransferFunds(int fromAccountID, int toAccountID, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        AccountDataAccess dataAccess = new AccountDataAccess();&lt;br /&gt;&lt;br /&gt;        decimal fromAccountBalance = dataAccess.GetAccountBalance(fromAccountID);&lt;br /&gt;        decimal toAccountBalance = dataAccess.GetAccountBalance(toAccountID);&lt;br /&gt;&lt;br /&gt;        fromAccountBalance -= amount;&lt;br /&gt;        toAccountBalance += amount;&lt;br /&gt;&lt;br /&gt;        dataAccess.SetAccountBalance(fromAccountID, fromAccountBalance);&lt;br /&gt;        dataAccess.SetAccountBalance(toAccountID, toAccountBalance);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The code is very simple and straight forward.&amp;#160; A data access class is used to retrieve the current balance from each account, perform the logic and then save the balances back to the data access class.&amp;#160; Note that of the 7 lines of code in the sample, only 2 are actually business logic.&amp;#160; The rest are infrastructure concerns.&lt;/p&gt;&lt;h3&gt;Table Module&lt;/h3&gt;&lt;p&gt;Table Module uses one instance to represent all of the rows in a database table.&amp;#160; Each class wraps some representation of the database table (eg. a DataSet) and will pull out a single row to operate on a single item.&amp;#160; The distinction of this pattern is that the business layer is written in an object oriented manner, but instead of storing the data in the objects, the data is stored in the DataSet.&lt;/p&gt;&lt;p&gt;Although DataSets were quite popular in the .NET world, very few architectures made use of the Table Module pattern.&amp;#160; DataSets were usually passed around to represent state, but the object oriented representation of the business logic was not present.&amp;#160; DataSets were instead used in Transaction Script patterns where classes were simply used to group related methods of procedural code.&amp;#160; Table Module does scale in complexity better than Transaction Script because it can take advantage of object oriented techniques, but it still gets increasingly more difficult to implement new functionality because of the heavy infrastructure concerns that remain in the code.&lt;/p&gt;&lt;p&gt;Here is the same logic rewritten in the Table Module pattern.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public class FundsTransferService&lt;br /&gt;{&lt;br /&gt;    public void TransferFunds(int fromAccountID, int toAccountID, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        Account account = Account.Load();&lt;br /&gt;        account.TransferFunds(fromAccountID, toAccountID, amount);&lt;br /&gt;        account.Save();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Account&lt;br /&gt;{&lt;br /&gt;    private const string AccountTable = &amp;quot;Account&amp;quot;;&lt;br /&gt;    private const string IDColumn = &amp;quot;ID&amp;quot;;&lt;br /&gt;    private const string BalanceColumn = &amp;quot;Balance&amp;quot;;&lt;br /&gt;&lt;br /&gt;    private readonly DataSet dataSet;&lt;br /&gt;&lt;br /&gt;    public static Account Load()&lt;br /&gt;    {&lt;br /&gt;        AccountDataAccess accountDataAccess = new AccountDataAccess();&lt;br /&gt;        DataSet dataSet = accountDataAccess.GetAccountTable();&lt;br /&gt;        return new Account(dataSet);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Account(DataSet dataSet)&lt;br /&gt;    {&lt;br /&gt;        this.dataSet = dataSet;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void TransferFunds(int fromAccountID, int toAccountID, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        DataRow fromAccountRow = GetAccountRow(fromAccountID);&lt;br /&gt;        DataRow toAccountRow = GetAccountRow(toAccountID);&lt;br /&gt;&lt;br /&gt;        decimal fromAccountBalance = (decimal) fromAccountRow[BalanceColumn];&lt;br /&gt;        decimal toAccountBalance = (decimal) toAccountRow[BalanceColumn];&lt;br /&gt;&lt;br /&gt;        fromAccountBalance -= amount;&lt;br /&gt;        toAccountBalance += amount;&lt;br /&gt;&lt;br /&gt;        fromAccountRow[BalanceColumn] = fromAccountBalance;&lt;br /&gt;        toAccountRow[BalanceColumn] = toAccountBalance;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private DataRow GetAccountRow(int accountID)&lt;br /&gt;    {&lt;br /&gt;        foreach (DataRow accountRow in dataSet.Tables[AccountTable].Rows)&lt;br /&gt;        {&lt;br /&gt;            if ((int) accountRow[IDColumn] == accountID)&lt;br /&gt;            {&lt;br /&gt;                return accountRow;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Save()&lt;br /&gt;    {&lt;br /&gt;        dataSet.AcceptChanges();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;There is a lot more code in this example, but note how a subclass of Account could override the TransferFunds method if the business logic required specialized logic.&amp;#160; The subclass could reuse all of the infrastructure code and just change the business logic.&lt;/p&gt;&lt;h3&gt;Domain Model&lt;/h3&gt;&lt;p&gt;Domain Model is an object model that encapsulates both the data and the behaviour.&amp;#160; It takes full advantage of object oriented principles such as encapsulation and polymorphism.&amp;#160; The Domain Model pattern is the best of the three patterns at representing complex domains.&amp;#160; It is the power of isolating the domain from the infrastructure combined with the modeling power of object oriented languages that allows the complexity to scale well when using this pattern.&lt;/p&gt;&lt;p&gt;Business logic implemented with a Domain Model requires significant effort to isolate it from infrastructure concerns.&amp;#160; Because of this additional effort it initially takes longer to develop systems using the Domain Model pattern.&amp;#160; However, due to the powerful methods for representing business logic, it becomes relatively easier (compared to the other patterns that is) to develop as the system grows in complexity.&amp;#160; An initial effort to set up the surrounding infrastructure is rewarded later on by allowing the developers to maintain a constant rhythm and speed of development.&lt;/p&gt;&lt;p&gt;Here is the funds transfer logic as represented using the Domain Model pattern.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public class FundsTransferService&lt;br /&gt;{&lt;br /&gt;    public void TransferFunds(Account fromAccount, Account toAccount, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        fromAccount.Debit(amount);&lt;br /&gt;        toAccount.Credit(amount);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Account&lt;br /&gt;{&lt;br /&gt;    private decimal balance;&lt;br /&gt;&lt;br /&gt;    public void Debit(decimal amount)&lt;br /&gt;    {&lt;br /&gt;        balance -= amount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Credit(decimal amount)&lt;br /&gt;    {&lt;br /&gt;        balance += amount;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Note the simplicity of this solution and that every single line of code is directly representing business logic.&amp;#160; It is this isolation and focus on business logic that allows it to scale well with complexity.&amp;#160; There is no persistence in this code sample, which is intentional, and persistence techniques will be discussed next.&lt;/p&gt;&lt;h4&gt;Persistence in a Domain Model&lt;/h4&gt;&lt;p&gt;In the TechDays presentation we presented Active Record and Domain Model as two separate patterns.&amp;#160; This was a conscious diversion from Fowler’s patterns because this is the way that we have observed systems were being built in the wild, that and the fact that none of us had actually ever seen a system that used Table Module.&amp;#160; The prevalence of Active Record tools and frameworks has caused it to be considered a different pattern than Domain Model.&amp;#160; If you go by Fowler’s definition though, Active Record is a persistence pattern of a Domain Model.&lt;/p&gt;&lt;h2&gt;Active Record&lt;/h2&gt;&lt;p&gt;Active Record uses a one to one mapping between Domain Model classes and tables in the database.&amp;#160; Each class is mapped to a table, each instance is mapped to a row, and each field is mapped to a cell.&amp;#160; Classes are also responsible for loading and saving themselves to the database.&lt;/p&gt;&lt;p&gt;When using Active Record for persistence, we must add some more code to our Domain Model.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public class FundsTransferService&lt;br /&gt;{&lt;br /&gt;    public void TransferFunds(int fromAccountID, int toAccountID, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        Account fromAccount = Account.Load(fromAccountID);&lt;br /&gt;        Account toAccount = Account.Load(toAccountID);&lt;br /&gt;&lt;br /&gt;        fromAccount.Debit(amount);&lt;br /&gt;        toAccount.Credit(amount);&lt;br /&gt;&lt;br /&gt;        fromAccount.Save();&lt;br /&gt;        toAccount.Save();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Account&lt;br /&gt;{&lt;br /&gt;    private decimal balance;&lt;br /&gt;&lt;br /&gt;    public void Debit(decimal amount)&lt;br /&gt;    {&lt;br /&gt;        balance -= amount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Credit(decimal amount)&lt;br /&gt;    {&lt;br /&gt;        balance += amount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static Account Load(int accountID)&lt;br /&gt;    {&lt;br /&gt;        // TODO: Implement this method&lt;br /&gt;        throw new NotImplementedException();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void Save()&lt;br /&gt;    {&lt;br /&gt;        // TODO: Implement this method&lt;br /&gt;        throw new NotImplementedException();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This technique combines the responsibility of persistence and business logic.&amp;#160; Note that we have added some persistence code to business logic, so there is some mixing of concerns.&amp;#160; There are several Active Record frameworks that will allow you to remove much of this code from the entities and let the framework handle it, but the concepts remain the same.&lt;/p&gt;&lt;h2&gt;Object Relational Mapper&lt;/h2&gt;&lt;p&gt;Object Relational Mapper is a pattern that puts a high value on Persistence Ignorance in the Domain Model.&amp;#160; The Domain Model should know nothing about how, or even if, it is persisted to the database.&amp;#160; An Object Relational Mapper is used to map between the Domain Model and the relational database.&amp;#160; Unlike Active Record, the two models can be quite different and take advantage of the powers of each paradigm.&amp;#160; In order to isolate the Domain Model from persistence knowledge, it is usually required to use a Service Facade layer to coordinate the usage of the Object Relational Mapper.&lt;/p&gt;&lt;p&gt;Let’s have a look at the added infrastructure required to use the Object Relational Mapper pattern.&lt;/p&gt;&lt;br /&gt;&lt;pre class=&quot;brush: csharp&quot;&gt;public class FundsTransferFacade&lt;br /&gt;{&lt;br /&gt;    private readonly IAccountRepository accountRepository;&lt;br /&gt;    private readonly IFundsTransferService fundsTransferService;&lt;br /&gt;&lt;br /&gt;    public FundsTransferFacade(IAccountRepository accountRepository, IFundsTransferService fundsTransferService)&lt;br /&gt;    {&lt;br /&gt;        this.accountRepository = accountRepository;&lt;br /&gt;        this.fundsTransferService = fundsTransferService;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void TransferFunds(int fromAccountID, int toAccountID, decimal amount)&lt;br /&gt;    {&lt;br /&gt;        Account fromAccount = accountRepository.Get(fromAccountID);&lt;br /&gt;        Account toAccount = accountRepository.Get(toAccountID);&lt;br /&gt;&lt;br /&gt;        fundsTransferService.TransferFunds(fromAccount, toAccount, amount);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Here we have added a Service Facade layer that handles the translation into the Domain Model &amp;quot;language&amp;quot;. I am also assuming that an Object Relational Mapper is being used, and Aspect Oriented Programming to wrap calls to the Facade Layer which initiates and cleans up the ORM. This is write once code and is not worth showing here.&amp;#160; This is the added infrastructure that is required to get going with a Domain Model, but once it is in place, we can focus more on the business logic.&lt;/p&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;p&gt;We had a look at three difference patterns for representing business logic.&amp;#160; We examined some code samples to illustrate how each pattern will handle increased complexity.&amp;#160; Finally we looked at some of the infrastructure options that we need to implement when using the Domain Model pattern.&amp;#160; I hope this was a valuable exercise, and if not, please leave a comment so that I can improve it.&lt;/p&gt;</description><link>http://stefanmoser.blogspot.com/2009/09/business-logic-patterns.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-2846417734275346757</guid><pubDate>Wed, 16 Sep 2009 05:31:00 +0000</pubDate><atom:updated>2009-09-15T22:33:22.937-07:00</atom:updated><title>TechDays 2009 Retrospective</title><description>&lt;p&gt;I’ve just arrived home after the end of TechDays Vancouver and I feel compelled to write a retrospective on my experience.&amp;#160; I have to say that TechDays was &lt;strong&gt;&lt;em&gt;nothing&lt;/em&gt;&lt;/strong&gt; like I expected.&amp;#160; I want to write this post with complete honesty to best tell the full story.&amp;#160; I hope that this transparency is appreciated.&lt;/p&gt;  &lt;p&gt;About 6 weeks ago there was a &lt;a href=&quot;http://graysmatter.codivation.com/post/An-open-letter-to-John-Bristowe-and-Joey-de-Villa-about-TechDays-SOLID-and-Justice-Gray.aspx&quot;&gt;flurry&lt;/a&gt; &lt;a href=&quot;http://blogs.msdn.com/cdndevs/archive/2009/07/23/techdays-blogs-and-the-fundamentals.aspx&quot;&gt;of&lt;/a&gt; &lt;a href=&quot;http://msmvps.com/blogs/peterritchie/archive/2009/07/23/why-fundamentals-are-important-to-microsoft-s-bottom-line.aspx&quot;&gt;activity&lt;/a&gt; in the blog-o-sphere about the lack of fundamentals covered in TechDays sessions.&amp;#160; I &lt;a href=&quot;http://stefanmoser.blogspot.com/2009/07/software-development-fundamentals-at.html&quot;&gt;replied&lt;/a&gt; to this with my own comments as I felt at the time that, in conferences like TechDays, Microsoft was so intent on marketing that they would not allow any fundamentals sessions.&amp;#160; This blog post got me in trouble because no more than a day later John Bristowe (Developer Evangelist for western Canada) contacted me to ask if I was interested in presenting at TechDays in Vancouver.&amp;#160; I was a little hesitant at first, especially given my thinking at the time, but I decided to explore the opportunity and see where it went.&amp;#160; John sent me a list possible sessions and one session jumped out at me right away.&amp;#160; It was entitled “Test-Driven Development Techniques” but I didn’t really have a lot more to go on.&amp;#160; This was a session that was originally presented at TechEd, so I was given the slides, demo and a video of the original presentation.&amp;#160; I thought the session was alright, but decent enough that it delivered content that would be valuable to the community and did not focus on marketing a Microsoft production.&amp;#160; I have since heard 2nd, 3rd, 4th hand accounts of how John and team had to fight to keep this and another session in TechDays because they did not market a Microsoft product enough.&lt;/p&gt;  &lt;p&gt;A little while later &lt;a href=&quot;http://graysmatter.codivation.com/&quot;&gt;Justice Gray&lt;/a&gt; contacted me with a very cryptic message, but hinting at the fact that there might be opportunity to present some content that was more centered around development foundations.&amp;#160; I responded to him with my ideas, and sure enough, it was soon confirmed that Microsoft had agreed to add an additional Developer Foundations track to TechDays in Vancouver.&amp;#160; I was quite excited about this opportunity because I had a pretty good idea that Justice and I were of similar mind and that this session would be quite aligned with my ideals about software development.&amp;#160; Once the abstracts had been made available to me, I selected the session about the S.O.L.I.D. design principles, which I was quite excited about.&amp;#160; I did feel quite under the gun given that TechDays was not far away and I had already agreed to present another session that I needed to prepare for.&amp;#160; Given that I was already feeling swamped, not to mention I was in the middle of a home renovation, I asked Justice if I could give my input into the vision of the presentation, but ultimately I did not feel that I had the time to fully write it.&lt;/p&gt;  &lt;p&gt;Over the next few weeks I was preparing madly, rewriting the demos and changing up the first couple slides for the TDD talk.&amp;#160; I was collaborating with Justice about the content for the SOLID talk and still trying to find some time to drywall in the evenings.&amp;#160; Once the planning for the Developer Foundations track started coming together, Justice and &lt;a href=&quot;http://msmvps.com/Blogs/PeterRitchie/&quot;&gt;Peter Ritchie&lt;/a&gt; decided on the order of the sessions and it meant that my TDD and SOLID talks were back-to-back on the first day which I wasn’t comfortable with because I felt I would not be able to give either talk my full effort if they were so close.&amp;#160; Given this conflict, it was decided that I switch talks in the Developer Foundations track on the first day and present the Layers session instead.&amp;#160; It wasn’t supposed to be a big deal given that &lt;a href=&quot;http://adventuresinagile.blogspot.com/&quot;&gt;Adam Dymitruk&lt;/a&gt; was responsible for the content of the session.&amp;#160; So now I had somehow gone from zero to three sessions in no less than the span of about 3 weeks and was wondering how the hell I had got myself into such a mess!&lt;/p&gt;  &lt;p&gt;At this point in time my home renovation got put on hold.&amp;#160; I told my wife that I was not allowed to complete the next step until after TechDays was over.&amp;#160; I spent &lt;strong&gt;&lt;em&gt;a lot&lt;/em&gt;&lt;/strong&gt; of time preparing for all of the sessions and have since decided that it is &lt;strong&gt;&lt;em&gt;at least&lt;/em&gt;&lt;/strong&gt; as much work to prepare for a session that someone else writes as it is to prepare your own.&amp;#160; The only difference is that you tend to get the content later if you don’t prepare the content yourself.&lt;/p&gt;  &lt;p&gt;I arrived at the first day of TechDays with a little trepidation, this was after all my first time speaking at a conference of any size.&amp;#160; I watched Adam present S.O.L.I.D. since I was going to present it the next day.&amp;#160; My first session was my TDD talk in the Core Fundamentals and Best Practices track.&amp;#160; Looking back on it now, I think I was so focused on the presentation that I barely noticed that there were over 200 people in the room watching me.&amp;#160; I do feel that it went quite well and that people got the point of what I was trying to convey.&amp;#160; I had an attendee come up to me after and comment on how expressive my test method names were.&amp;#160; I used English readable sentences and he told me that he usually liked to try to keep his method names under 6 characters, but thought it was pretty cool to see some expressive method names.&amp;#160; Now this was not a focus of the presentation at all, but if this is all that he takes home from the session then I think we have to count that as a win.&lt;/p&gt;  &lt;p&gt;After lunch I presented on Layers and I think it went alright.&amp;#160; Of the three presentations that I was presenting, I felt the least comfortable with its content.&amp;#160; Reception to the talk was quite positive, so I’m fairly pleased with how it turned out.&amp;#160; We weren’t quite sure what to expect in the Developer Foundations track given its late addition to the conference, but we were relatively pleased with the 30 or 40 people that were in attendance.&amp;#160; We had roughly the same level of attendance for all four sessions in the track that day.&lt;/p&gt;  &lt;p&gt;I arrived early on day two since I was presenting S.O.L.I.D. in the first time slot of the day.&amp;#160; Justice and I were talking as we were setting up and wondering ifwe&amp;#160; could realistically expect &lt;strong&gt;&lt;em&gt;anyone&lt;/em&gt;&lt;/strong&gt; to show up.&amp;#160; All of the sessions in this track had been presented already the day before so we figured that attendance would have to be less than the previous day.&amp;#160; Needless to say that we were both absolutely shocked when there were not only more people in attendance than the previous day, but the room was &lt;strong&gt;&lt;em&gt;packed!&lt;/em&gt;&lt;/strong&gt;&amp;#160; Seriously!&amp;#160; There were people standing in the back!&amp;#160; I was quite excited about this talk since it was my favourite of the three I was doing, and I was really happy with how it went.&amp;#160; After I finished, an attendee came up to me and told me that he had flown in from Calgary just to attend the Developer Foundations track.&amp;#160; Think about that for a minute.&amp;#160; TechDays is happening in Calgary in November, but he felt that the content of the Developer Foundations track was important enough to spend the extra money to fly to Vancouver just to attend this track.&amp;#160; This absolutely floored me and is probably why I have felt the need to ramble on here for so long.&lt;/p&gt;  &lt;p&gt;The rest of the day I spent relaxing and taking in the other speakers in the Developer Foundations track and the room was just as packed for each one of them.&amp;#160; Something happened between the first and second day of TechDays.&amp;#160; Something compelled a lot more people to attend this track the second day and I’m still at a loss to explain it.&amp;#160; I’m hoping that when we get to read the evaluations that it will shed some light on this.&lt;/p&gt;  &lt;p&gt;The whole experience was &lt;strong&gt;&lt;em&gt;much&lt;/em&gt;&lt;/strong&gt; more than I imagined!&amp;#160; I will freely admit that there was about a 0% chance that I would have attended TechDays if I hadn’t had the opportunity to speak, so I am so glad that John and Justice took a chance on me.&amp;#160; I do mean that they both took a chance on me because I knew both of them only by reputation and by their blogs, and I’m pretty sure they knew even less about me.&amp;#160; I understand the risk that they both took putting their faith in me and I only hope that I met their expectations.&lt;/p&gt;  &lt;p&gt;I want to publically thank John for putting together the Core Fundamentals and Best Practices track, which I have a sneaking suspicion had something to do with the low attendance in the Developer Foundations tracks on the first day.&amp;#160; Whatever battles you had to fight to put this together were worth it.&lt;/p&gt;  &lt;p&gt;I also want to publically thank Justice and Peter for putting together the Developer Foundations track on such short notice.&amp;#160; I know that it &lt;strong&gt;&lt;em&gt;far&lt;/em&gt;&lt;/strong&gt; exceeded my expectations and I’m certain that it exceeded the expectations of &lt;strong&gt;&lt;em&gt;everyone&lt;/em&gt;&lt;/strong&gt; involved.&amp;#160; The biggest thanks goes out to all of the attendees that chose to come to check out my sessions and other sessions in the Developer Foundations track!&amp;#160; Microsoft has said that it was an experimental track and that, if the response was positive, that it would be continued in the future.&amp;#160; All I can say is that I’m looking forward to this track next year!&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/09/techdays-2009-retrospective.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-5380830183869395730</guid><pubDate>Sun, 06 Sep 2009 23:43:00 +0000</pubDate><atom:updated>2009-09-06T16:43:23.993-07:00</atom:updated><title>Why I Love NUnit</title><description>&lt;p&gt;I have to admit that I very little experience with other unit testing frameworks.&amp;#160; I’ve never felt the urge to switch because NUnit has served me so well over the years.&amp;#160; NUnit is simple, effective and does not create additional friction.&amp;#160; NUnit does take some flack for not having changed much over the years, but I think that is a strength because it hasn’t had to.&lt;/p&gt;  &lt;p&gt;Recently I took the plunge into MSTest.&amp;#160; I hadn’t heard many good reviews, but from the outside it looked “the same”.&amp;#160; I mean, all I need to do is replace [TestFixture] with [TestClass] and [Test] with [TestMethod] and it would all work, right?&amp;#160; Wrong.&amp;#160; I was about to post “Why I Hate MSTest” but in the interest of staying positive, I’m posting “Why I Love NUnit” instead.&lt;/p&gt;  &lt;p&gt;NUnit stays out of the way.&amp;#160; It does not impose any structure on the project structure I choose.&amp;#160; I can choose to put test classes in the same assembly as the classes they test, or I can choose to put test classes in a separate assembly.&lt;/p&gt;  &lt;p&gt;Asserts just work.&amp;#160; This is especially evident when comparing collections.&amp;#160; I can compare collections of different types, it doesn’t matter if it is a Collection&amp;lt;T&amp;gt;, an IEnumerable&amp;lt;T&amp;gt; or an IList, NUnit is smart enough to compare each of the items in each collection.&amp;#160; I had not even thought of this until I switched frameworks and it didn’t work.&amp;#160; &lt;/p&gt;  &lt;p&gt;When a test fails, NUnit tells me why the test failed with a very descriptive message.&amp;#160; This is extremely important because I want to maintain the short cycle rhythm of TDD.&amp;#160; Some frameworks rely more on providing links to the code that failed rather than providing a helpful message, but when running tests from the command line or with TestDriven.NET I can only rely on the error message.&lt;/p&gt;  &lt;p&gt;TDD is a practice that strives to create a constant rhythm for the developer in order to maintain constant progress.&amp;#160; NUnit is a framework that just stays out of the way and allows the developer to maintain that rhythm without fuss or interruption.&amp;#160; Simple, concise, effective.&amp;#160; What else would I want?&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/09/why-i-love-nunit.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-7741991024978990221</guid><pubDate>Thu, 27 Aug 2009 18:44:00 +0000</pubDate><atom:updated>2009-08-27T11:47:17.431-07:00</atom:updated><title>This Just In: Developers Value Passion And Fundamentals!</title><description>&lt;p&gt;I just received my MSDN Flash newsletter in my inbox and noticed the results of last week’s poll. The question was “what is the most important trait of a programmer fresh out of college” and I was pleasantly surprised by the results!&lt;/p&gt;&lt;br /&gt;&lt;img style=&quot;TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 294px; CURSOR: hand&quot; id=&quot;BLOGGER_PHOTO_ID_5374716729526139426&quot; border=&quot;0&quot; alt=&quot;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVPiuOe48NreV7PLlIMpaMay3PMD57TCREzNbABIweeCH3k9L5wjET-3rKqbDLoziOeMEhcLU99wk3Xd2J1shW1dARJBGrc4FIh3kObuafSeOBN0SEdHK0Iu_7O-XdaHJ26zKzOiBlXqQ/s320/PollResults.JPG&quot; /&gt;&lt;br /&gt;&lt;p&gt;&lt;a href=&quot;http://www.blogger.com/$PollResults[2].jpg&quot;&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I would like to think that these are traits that are valued in programmers of all skill levels. One could also argue that if you combine the top two results, then programmers that have a passion for continuously learning about fundamentals are the most valued programmers of all! If you agree, then I have fantastic news for you because a &lt;a href=&quot;http://graysmatter.codivation.com/post/Announcing-a-BRAND-NEW-track-for-Microsoft-TechDays-and-a-brand-new-track-chair-(guess-who).aspx&quot;&gt;new track&lt;/a&gt; has been added to TechDays in Vancouver and Toronto!&lt;/p&gt;&lt;br /&gt;&lt;p&gt;I will be presenting Test-Driven Development Techniques in the Developer Fundamentals track and I will also be presenting about…wait…ummm…something really cool and worthwhile in the newly announced Developer Foundations track. More info on that one when the MS legal department &lt;a href=&quot;http://twitter.com/justicegray/status/3517969891&quot;&gt;stamps their approval&lt;/a&gt;.&lt;/p&gt;</description><link>http://stefanmoser.blogspot.com/2009/08/i-just-received-my-msdn-flash.html</link><author>noreply@blogger.com (Stefan Moser)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVPiuOe48NreV7PLlIMpaMay3PMD57TCREzNbABIweeCH3k9L5wjET-3rKqbDLoziOeMEhcLU99wk3Xd2J1shW1dARJBGrc4FIh3kObuafSeOBN0SEdHK0Iu_7O-XdaHJ26zKzOiBlXqQ/s72-c/PollResults.JPG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-4655423116884277801</guid><pubDate>Fri, 07 Aug 2009 17:52:00 +0000</pubDate><atom:updated>2009-08-07T10:52:54.944-07:00</atom:updated><title>New Developer Foundations Track at TechDays Vancouver!</title><description>&lt;p&gt;It has been a crazy couple of weeks since my &lt;a href=&quot;http://stefanmoser.blogspot.com/2009/07/software-development-fundamentals-at.html&quot;&gt;last post about the lack of fundamentals at TechDays&lt;/a&gt;.&amp;#160; Shortly after, John Bristowe (Developer Evangelist for Western Canada) contacted me about presenting the TDD session at TechDays in Vancouver.&amp;#160; After some back-and-forth, I decided that what better way to influence the material at TechDays than to present it myself, so I agreed and will be presenting.&lt;/p&gt;  &lt;p&gt;In the meantime, we also announced the &lt;a href=&quot;http://altnetvancouver.ning.com/events/openspaces-and-lightning-talks&quot;&gt;evening sessions&lt;/a&gt; presented by ALT.NET Vancouver.&amp;#160; We’ll be hosting a keynote speaker and a series of lightning talks in the evening of Sept 14th, followed by an evening of open spaces on the evening of Sept 15th.&amp;#160; This will be a great opportunity for you to bring up any topics that you would like to have covered that were missing from the main conference.&lt;/p&gt;  &lt;p&gt;Also, earlier this week &lt;a href=&quot;http://graysmatter.codivation.com/&quot;&gt;Justice Gray&lt;/a&gt; contacted me about what I thought was missing from TechDays and what sessions I would add if given the chance.&amp;#160; This was right around the time that &lt;a href=&quot;http://graysmatter.codivation.com/post/That-brief-interlude-of-silence-and-a-hint-at-a-MASSIVE-ANNOUNCEMENT.aspx&quot;&gt;he was hinting&lt;/a&gt; that there might be something in the works, but I couldn’t have guessed that he had actually managed to get &lt;a href=&quot;http://graysmatter.codivation.com/post/Announcing-a-BRAND-NEW-track-for-Microsoft-TechDays-and-a-brand-new-track-chair-(guess-who).aspx&quot;&gt;a new track&lt;/a&gt; added to TechDays Vancouver!&amp;#160; That’s right, TechDays Vancouver (and Toronto) will now have a Developer Foundations track that will be expanded to all TechDays in the future if it is successful, and who is going to doubt that?&lt;/p&gt;  &lt;p&gt;It’s awesome to see that Microsoft listened to the community and added this track.&amp;#160; A big thank you goes out to the TechDays people, Justice and &lt;a href=&quot;http://msmvps.com/Blogs/PeterRitchie/&quot;&gt;Peter Ritchie&lt;/a&gt; for making this happen!&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/08/new-developer-foundations-track-at.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-7686292718867115859</guid><pubDate>Thu, 23 Jul 2009 16:44:00 +0000</pubDate><atom:updated>2009-07-23T09:44:42.828-07:00</atom:updated><title>Software Development Fundamentals at TechDays 2009</title><description>&lt;p&gt;A conversation on the lack of fundamentals being covered at &lt;a href=&quot;http://www.microsoft.com/canada/techdays/&quot;&gt;TechDays&lt;/a&gt; has been going on in the blog-o-sphere.&amp;#160; It started with &lt;a href=&quot;http://graysmatter.codivation.com/post/An-open-letter-to-John-Bristowe-and-Joey-de-Villa-about-TechDays-SOLID-and-Justice-Gray.aspx&quot;&gt;Justice Gray expressing his concern&lt;/a&gt;, to which &lt;a href=&quot;http://blogs.msdn.com/cdndevs/archive/2009/07/23/techdays-blogs-and-the-fundamentals.aspx&quot;&gt;Joey Devilla replied&lt;/a&gt;, and then &lt;a href=&quot;http://msmvps.com/blogs/peterritchie/archive/2009/07/23/why-fundamentals-are-important-to-microsoft-s-bottom-line.aspx&quot;&gt;Peter Ritchie got in on the act&lt;/a&gt; too. &lt;/p&gt;  &lt;p&gt;Fundamentals are sorely lacking in much of the Microsoft development community, and yes, it would be awesome if Microsoft embraced this and flooded TechDays with sessions about SOLID, TDD, design patterns and lots of other technology-agnostic goodness.&amp;#160; I totally agree with Peter that this would ultimately be good for Microsoft’s bottom-line, but I just don’t see this happening anytime soon.&lt;/p&gt;  &lt;p&gt;We’ve all seen the Microsoft demo where the presenter opens up a designer, drags a few things around, presses F5 and then proudly proclaims that “I did it all without writing a single line of code!”&amp;#160; Come on people, we’re DEVELOPERS!&amp;#160; &lt;strong&gt;Writing code is what we do!&lt;/strong&gt;&amp;#160; If it were &lt;em&gt;really&lt;/em&gt; that easy then why did I bother going to university to get a Computer Science degree?&amp;#160; Why do I read books and blog to keep learning?&amp;#160; Why do I still think that development is really tough?&lt;/p&gt;  &lt;p&gt;When we adhere to the fundamentals of software development we end up with higher quality code with a lower overall cost of ownership.&amp;#160; But here’s the catch, &lt;strong&gt;fundamentals are hard!&lt;/strong&gt;&amp;#160; Microsoft is a platform/tools vendor and they have every right to market their products at events like TechDays, but none of those products will make me a better developer as much as a solid understanding of software development fundamentals will.&amp;#160; If Microsoft continues to market their products without a healthy dose of software development fundamentals, the community needs to pick up the slack.&lt;/p&gt;  &lt;p&gt;Let’s keep calling out Microsoft when they focus too much on the tools.&amp;#160; Let’s keep writing blogs to promote what we believe is important.&amp;#160; And let’s reach out to those attending TechDays with our own message.&amp;#160; Will there be an opportunity for TechDays attendees in Vancouver to learn about SOLID and other fundamentals?&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Dddddddddddddefinitely!!!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;It just might not be during the hours of the TechDays event.&amp;#160; Stay tuned for more…&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/07/software-development-fundamentals-at.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-2968123159596553411</guid><pubDate>Mon, 15 Jun 2009 19:52:00 +0000</pubDate><atom:updated>2009-06-16T16:29:51.409-07:00</atom:updated><title>ALT.NET Canada 2009</title><description>&lt;p&gt;Last weekend after DevTeach in Vancouver we had the ALT.NET Canada open spaces event.&amp;#160; It was a good idea to have it right after DevTeach because that meant several speakers stuck around for an extra two days of good conversation.&lt;/p&gt;  &lt;p&gt;This was my second ALT.NET open spaces event and both have had a heavy dose of Domain-Driven Design sessions.&amp;#160; There was one very interesting session title “Non-Relational Databases” which was an awesome discussion about the practical uses of products like CouchDB, BigTable and db4o.&lt;/p&gt;  &lt;p&gt;The last session of the event was convened by Greg Young in which he proposed making ALT.NET Canada into a formal entity with a mandate to promote ALT.NET principles and practices within the Canadian .NET development community.&amp;#160; A discussion also got going about starting up an ALT.NET user group in Vancouver.&amp;#160; More on those to come later.&lt;/p&gt;  &lt;p&gt;It was an exhausting week with both DevTeach and ALT.NET Canada, but well worth the lack of sleep.&amp;#160; Can’t wait to do it again soon!&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/06/altnet-canada-2009.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8807027887663294571.post-8331614466141278300</guid><pubDate>Mon, 15 Jun 2009 19:50:00 +0000</pubDate><atom:updated>2009-06-15T12:50:30.098-07:00</atom:updated><title>DevTeach Vancouver 2009</title><description>&lt;p&gt;Last week I attended my second DevTeach and ALT.NET Canada conference and it got me fired up enough to finally start blogging.&amp;#160; I first set up my blog account over a year ago and wrote three posts that I never ended up publishing.&amp;#160; So now I am officially entering the blog-o-sphere and am excited to share my journey as a software developer.&lt;/p&gt;  &lt;p&gt;DevTeach was awesome as usual, even though the economy took its toll and significantly reduced the number of attendees.&amp;#160; On the up side, I did find that the sessions I enjoy the most are often the ones with only a dozen people in the room and the session turns into a big discussion rather than just a speaker talking at the front.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://codebetter.com/blogs/gregyoung/&quot;&gt;Greg Young’s&lt;/a&gt; “Unleash Your Domain” was one of those sessions.&amp;#160; Even though it was the fourth time that I have seen this talk, I still enjoy the conversations that come up and hearing how Greg is fine tuning his technique.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://www.ayende.com/&quot;&gt;Ayende’s&lt;/a&gt; “ORM += 2” session (basically advanced NHibernate) gave me tons of new ideas how I can get even more out of NHibernate.&amp;#160; I had rolled my own natural IDs which I can now throw away and I love the idea on future queries.&amp;#160; More on those features to come later.&amp;#160; I have been using NHibernate for nearly 3 years and am still amazed at the power I can get out of it.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://codebetter.com/blogs/david_laribee/&quot;&gt;David Laribee’s&lt;/a&gt; “Behavior-Driven Development Installed” session has me back trying BDD style tests.&amp;#160; I had previously abandoned them because they made the use of test doubles (mocks, stubs, etc) very cumbersome, but with the AAA syntax of RhinoMocks that problem has gone away.&amp;#160; Also more to come on this later.&lt;/p&gt;  &lt;p&gt;The DevTeach sessions are awesome, but the truly best part is that the speakers don’t just hang out in the speakers lounge with each other.&amp;#160; I had several conversions about a whole range of topics over lunch, in the hall, or in the bar afterwards.&amp;#160; This kind of accessibility is what sets DevTeach apart from most larger conferences.&amp;#160; All in all it was a fantastic 3 days and I can’t wait until the next DevTeach.&lt;/p&gt;  </description><link>http://stefanmoser.blogspot.com/2009/06/devteach-vancouver-2009.html</link><author>noreply@blogger.com (Stefan Moser)</author><thr:total>0</thr:total></item></channel></rss>