<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.Net</title>
        <link>http://dugaldwilson.com/dugald/category/4.aspx</link>
        <description>.Net</description>
        <language>en-US</language>
        <copyright>Dugald Wilson</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <item>
            <title>Missing MVC Templates in Project</title>
            <link>http://dugaldwilson.com/dugald/archive/2010/02/18/58.aspx</link>
            <description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;I’m working with SharpArchitecture as the basis for a new project at work, and found a small surprise when trying to add a view:&lt;/p&gt;  &lt;p&gt; &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="NoMVCTemplates" border="0" alt="NoMVCTemplates" src="http://www.dugaldwilson.com/images/MissingMVCTemplatesinProject_E68A/NoMVCTemplates_3.png" width="607" height="366" /&gt; &lt;/p&gt;  &lt;p&gt;No MVC items anywhere in that list. Sure, it’s not a huge hassle to create a webform page and change the details so it inherits from ViewPage, but I’d like to have the ease those templates provide.&lt;/p&gt;  &lt;p&gt;The reason those templates don’t appear is that  the SharpArchitecture template is generated such that it doesn’t depend on ASP.Net MVC being installed on the development machine. This helps for compatibility with multiple versions. The downside is no easy-peasy templates out of the box in Visual Studio.&lt;/p&gt;  &lt;p&gt;To add those templates to your SharpArchitecture project (or any project not built directly from the MVC project template) should only take a few steps:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In Visual Studio, create a new MVC project using the Project Templates. &lt;/li&gt;    &lt;li&gt;Open the project’s *.csproj file with a text editor. &lt;/li&gt;    &lt;li&gt;In the opening section you will find a list of ProjectTypeGUIDs. Copy the first GUID listed. Note: the GUID shown below is for MVC2 RC, your GUID may differ:      &lt;p&gt; &lt;/p&gt;      &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="CopyGUID" border="0" alt="CopyGUID" src="http://www.dugaldwilson.com/images/MissingMVCTemplatesinProject_E68A/CopyGUID.png" width="697" height="161" /&gt; &lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;Paste that GUID into the *.csproj file for your project that is missing the templates. For a SharpArchitecture project, this will be the *.Web.csproj file. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Once done, you should be able to see MVC item templates in your SharpArchitecture web project.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="MVCTemplates" border="0" alt="MVCTemplates" src="http://www.dugaldwilson.com/images/MissingMVCTemplatesinProject_E68A/MVCTemplates.png" width="607" height="367" /&gt;&lt;/p&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/58.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2010/02/18/58.aspx</guid>
            <pubDate>Thu, 18 Feb 2010 13:28:50 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/58.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2010/02/18/58.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/58.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Welcome to SubText 2.1</title>
            <link>http://dugaldwilson.com/dugald/archive/2009/01/06/53.aspx</link>
            <description>&lt;br /&gt;
Happy to say I managed to back up the data, test drive 2.1 locally, and push it up to the site here to finally run on Subtext 2.1.&lt;br /&gt;
&lt;br /&gt;
True credit goes to &lt;a href="http://haacked.com/"&gt;Phil Haack&lt;/a&gt; and the guys on the &lt;a href="http://www.subtextproject.com/"&gt;SubText &lt;/a&gt;team for making an OS blog engine that "just works".&lt;img src="http://dugaldwilson.com/dugald/aggbug/53.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2009/01/06/53.aspx</guid>
            <pubDate>Wed, 07 Jan 2009 03:53:16 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/53.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2009/01/06/53.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/53.aspx</wfw:commentRss>
        </item>
        <item>
            <title>The New Year: Reflections and Goals</title>
            <link>http://dugaldwilson.com/dugald/archive/2009/01/02/The-New-Year-Reflections-and-Goals.aspx</link>
            <description>&lt;p&gt;2008 was a pretty good year: I left a job where the path forward was to abandon my .Net skills in favor of learning Java, and returned to Progress Energy to develop and support .Net applications. I was elected President of TriNUG, and given the opportunity to stop whining and start making TriNUG better. I started using Twitter, and really grew my community of peers by dozens. &lt;/p&gt;  &lt;p&gt;I feel like if I don't put something down for where I want to be at the end of 2009, I will spend much of the year drifting about. So here are my goals for 2009: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Work:&lt;/strong&gt; I would like to make more of an impact on what our group does technically at Progress. I'd like to see if I can help push adoption of Entity Framework and jQuery, possibly through helping facilitate discussions or brown bags during the year. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;TriNUG:&lt;/strong&gt; I'd like for us to get the rest of the year ironed out for speakers, first, so I have less to worry about. Then, I'd like for us to do a CodeCamp even better than our last. I also need to improve the meeting experience for new users, and find ways to reach folks we aren't currently. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Blue Hill:&lt;/strong&gt; I need to get serious about my side consulting/dev work. At the very least I need some demonstrations of what I can do for folks unfamiliar with me. To that end: &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;WhoDoesWhatIDo.com&lt;/strong&gt;: A site for developers to build peer groups and career networking around skills and tools. Currently vaporware. I'd like to have this in beta by third quarter and released by end of year. Plan is to build it using ASP.Net MVC and NHibernate &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Learning:&lt;/strong&gt; I'd like to end the year with a solid understanding of Ruby and Rails. I also want to be better versed in ASP.Net MVC, jQuery, and NHibernate. I also need to learn to type, so help me God. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Conferences:&lt;/strong&gt; This is more of a 2010 goal now, but I'm going to CodeMash if it kills me.&lt;/li&gt; &lt;/ul&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/52.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2009/01/02/The-New-Year-Reflections-and-Goals.aspx</guid>
            <pubDate>Sat, 03 Jan 2009 00:52:13 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/52.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2009/01/02/The-New-Year-Reflections-and-Goals.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/52.aspx</wfw:commentRss>
        </item>
        <item>
            <title>RDU Code Camp Thanks</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/11/17/RDU-Code-Camp-Thanks.aspx</link>
            <description>&lt;p&gt;RDU Code Camp was yesterday (Nov 15). It was just an awesome time. From what folks say, it went very well. I'd like to thank all of the folks who made this possible:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Chris Love - Chris was the original driver for doing another Code Camp this year. He took the lead on getting the speakers and sessions together, and stepped up to handle the emceeing on the event.&lt;/li&gt;
    &lt;li&gt;Rob Zelt - Rob secured all the swag for the event, resulting in some very happy folks when they left yesterday afternoon.&lt;/li&gt;
    &lt;li&gt;Chuck Scheier  &amp;amp; Srinu Tulluri - Chuck and Srinu handled the food, which surpassed all expectations. &lt;/li&gt;
    &lt;li&gt;Greg Pugh - Greg handled the promotion for Code Camp, and the excellent turnout we had is a result of his work.&lt;/li&gt;
    &lt;li&gt;Glen Alfredson - Glen handled all the financial dealings of working with our sponsors and vendors.&lt;/li&gt;
    &lt;li&gt;Jeremy Brown - Jeremy, and his wife Julie, took on the responsibility of creating the t-shirts for Code Camp. Julie came up with many designs, and Jeremy stayed on us to actually DECIDE and get it done. They turned out great, and I couldn't be more appreciative of their efforts.&lt;/li&gt;
    &lt;li&gt;Anita Luthra- Anita came in and volunteered, and helped make our registration process run smoother than I've ever seen it.&lt;/li&gt;
    &lt;li&gt;Josh Carlisle - Josh helped deliver swag, sodas, and maps. He was an invaluable fixer.&lt;/li&gt;
    &lt;li&gt;John Anderson - John volunteered for us and single-handedly turned room 201 from a classroom for 40 to a conference room for 120.&lt;/li&gt;
    &lt;li&gt;James Avery - James volunteered to run Open Spaces, which was a huge hit, and will hopefully be a part of our future Code Camps. He then helped craft the idea of our sponsorship being limited, which raised visibility for sponsors, and reduced the number of sponsors we had to handle. He then helped land us Red Gate software as a sponsor.&lt;/li&gt;
    &lt;li&gt;Brian Hitney - Brian is our Microsoft DE, so I think there is some part of his job description that has him help us out on these things. Brian helped sponsor us and provide swag, but more importantly was an invaluable resource for how to run the Code Camp, and I couldn't have done my part without his counsel.&lt;/li&gt;
    &lt;li&gt;Derik Whittaker - Derik was instrumental in securing Allscripts as a sponsor, without which we would have had a much more limited Code Camp.&lt;/li&gt;
    &lt;li&gt;Todd Phelps &amp;amp; ECPI - ECPI has been a wonderful host for our Code Camps, giving us complete access to their building. Todd came in on his own time Sat to open and close the building for us.&lt;/li&gt;
    &lt;li&gt;All our speakers - We wouldn't have had an event without our amazing speakers.  Thank you all for traveling out of your way, and helping us have one of our best Code Camps ever!&lt;/li&gt;
    &lt;li&gt;Our sponsors - big thanks to Allscripts, Inkscribe Designs, Microsoft, Red Gate, SoftPro, and Tek Systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If anyone has been overlooked, it is no reflection on your contribution, but rather the oversight of my still-weary brain.&lt;/p&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/47.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/11/17/RDU-Code-Camp-Thanks.aspx</guid>
            <pubDate>Mon, 17 Nov 2008 08:16:10 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/47.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/11/17/RDU-Code-Camp-Thanks.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/47.aspx</wfw:commentRss>
        </item>
        <item>
            <title>RDU Code Camp</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/11/10/RDU-Code-Camp.aspx</link>
            <description>&lt;a href="javascript:void(0);/*1226336627826*/"&gt;RDU Code Camp&lt;/a&gt; is this Saturday, Nov 15, from 8:15am to 5pm. Door open at 7:30am.&lt;br /&gt;
&lt;br /&gt;
It promises to be a great day &lt;a href="javascript:void(0);/*1226336601132*/"&gt;full of developer-oriented content&lt;/a&gt;. In addition, there will be an Open Spaces, and an XBox 360 for playing Rock Band! Lunch will be provided, and there are prizes at the end - hope to see you there!&lt;img src="http://dugaldwilson.com/dugald/aggbug/45.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/11/10/RDU-Code-Camp.aspx</guid>
            <pubDate>Mon, 10 Nov 2008 17:04:42 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/45.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/11/10/RDU-Code-Camp.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/45.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Microsoft and jQuery</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/09/29/Microsoft-and-jQuery.aspx</link>
            <description>&lt;br /&gt;
There have been numerous postings announcing that Microsoft is going to start shipping &lt;a href="javascript:void(0);/*1222705854042*/"&gt;jQuery &lt;/a&gt;alongside Visual Studio. If you haven't read about this already, see &lt;a href="javascript:void(0);/*1222705826427*/"&gt;Scott Guthrie's post&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This is wonderful news for the developer community for many reasons.&lt;br /&gt;
&lt;br /&gt;
First, the acceptance of jQuery by Microsoft should be contagious. A lot of large enterprise organizations get their software from Microsoft, and their software tools from Microsoft. The rule in those circles seems to be "No one ever got fired for using Microsoft", and so, Microsoft tools tend to dominate the short list of what can be used in an enterprise environment. With Microsoft shipping and supporting jQuery, these developers should be able to get the buy-in from management that they need to start using jQuery.&lt;br /&gt;
&lt;br /&gt;
Second, Microsoft has, in a big way, included the developer community in their path forward, and embraced existing Open source software.  Microsoft has a long history of having a competing product in every market space, from web browsers and search, to video game machines and mp3 players. This seemed to have extended to the developer division, too, as MSTest and Entity Framework came in as competing offerrings. With jQuery, they are jumping in and providing support to their customers who use it, and planning to contribute tests, bug fixes, and patches back to the jQuery project. This is an exciting step forward, and leaves me optimistic about the future of Microsoft's relationship with Open Source and the developer community.&lt;img src="http://dugaldwilson.com/dugald/aggbug/44.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/09/29/Microsoft-and-jQuery.aspx</guid>
            <pubDate>Mon, 29 Sep 2008 16:32:18 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/44.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/09/29/Microsoft-and-jQuery.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/44.aspx</wfw:commentRss>
        </item>
        <item>
            <title>RDU CodeCamp is Looking for Speakers</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/09/18/RDU-CodeCamp-is-Looking-for-Speakers.aspx</link>
            <description>&lt;br /&gt;
RDU CodeCamp is coming! &lt;br /&gt;
&lt;br /&gt;
Nov 15, 2008 at ECPI in Raleigh we will be having the RDU CodeCamp.  Registration will be coming soon.&lt;br /&gt;
&lt;br /&gt;
Currently, we are actively seeking speakers! If you are interested in speaking at RDU CodeCamp please drop us a line at &lt;a href="javascript:void(0);/*1221752358778*/"&gt;http://www.codecamp.org/Speakers.aspx&lt;/a&gt; - We would love to hear from you.&lt;img src="http://dugaldwilson.com/dugald/aggbug/43.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/09/18/RDU-CodeCamp-is-Looking-for-Speakers.aspx</guid>
            <pubDate>Thu, 18 Sep 2008 15:44:34 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/43.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/09/18/RDU-CodeCamp-is-Looking-for-Speakers.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/43.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Commenting Anti-Patterns</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/08/13/Commenting-Anti-Patterns.aspx</link>
            <description>&lt;p&gt;I've had the opportunity to do some code archaeology lately, and have found a few lessons that bear repeating when it comes to comments.  There are a few patterns in use which need to be addressed:&lt;/p&gt;
&lt;p style="font-weight: bold;"&gt; Big Wall of Text&lt;/p&gt;
&lt;p&gt;This long, rambling preamble can be found in many legacy applications. Though it does have some use in often providing a name to the faceless coder that is causing you such grief, other than that it has little reason to exist:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;/************************************************************************&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;NAME: test&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;PURPOSE:&lt;/span&gt; &lt;span class="rem"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;REVISIONS:&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;Ver Date Author Description&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;--------- ---------- --------------- ------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;1.0 7/8/2008 1. Created this package.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;*************************************************************************/&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p style="font-weight: bold;"&gt;This is a Comment&lt;/p&gt;
&lt;p&gt;Really just a statement of the completely obvious in code.  If these comments help the next developer of your code, you probably don't want them touching it anyway:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (!Page.IsPostBack)&lt;br /&gt;{&lt;br /&gt;  &lt;span class="rem"&gt;// first time&lt;/span&gt;&lt;br /&gt;  InitialSetUp();&lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p style="font-weight: bold;"&gt;Change Management:&lt;/p&gt;
&lt;p&gt;Often put in as a CYA for developers who think the next person to view this code may question their decisions, so change documentation appears directly in the code:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//************************************************************************&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//Input parameter changed to false for CommonFilter1.CheckBoxChecked,&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//please see request-666899.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//************************************************************************&lt;/span&gt;&lt;br /&gt;CommonFilter1.CheckBoxChecked(&lt;span class="kwrd"&gt;false&lt;/span&gt;);&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p style="font-weight: bold;"&gt;Timestamp of Changes:&lt;/p&gt;
&lt;p&gt;I really don't care when you did this, and if I did, source control could tell me:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//*********************************************************************************&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Changes made by OtherDeveloper on May-15,2002 at 6 pm.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;//***********************************************************************************&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;p&gt;Please feel free to share other examples of Commenting Anti-Patterns you have encountered!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/41.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/08/13/Commenting-Anti-Patterns.aspx</guid>
            <pubDate>Thu, 14 Aug 2008 03:47:14 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/41.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/08/13/Commenting-Anti-Patterns.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/41.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Learning to Love Ruby</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/08/12/Learning-to-Love-Ruby.aspx</link>
            <description>&lt;p&gt;I've started really stepping up my interest / learning in Ruby, and had one of those "this is great!" moments I wanted to share. &lt;/p&gt;
&lt;p&gt;At work, we've been pulling some names, etc out of the DB that aren't kept in the correct case, but need to be presented in an eye-pleasing manner to the user.  How do we do this? &lt;/p&gt;
&lt;p&gt;Since we're talking about strings, a first check of the string class yields ToUpper(), ToLower(), but no CapitalizetheFirstCharacterAndLowercaseTheRestPlzKThx(), so we will have to keep looking. &lt;/p&gt;
&lt;p&gt;Capitalization of names is affected by the culture, so this may be found in System.Globalization.  Sure enough, TextInfo::ToTitleCase() is what we are looking for. &lt;/p&gt;
&lt;p&gt;So, there is a little extra work to get the conversion to correct capitalization. I need an instance of TextInfo to pass my text to.  Not too bad, but here we go: &lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; passCapitalization = &lt;span class="str"&gt;"testing"&lt;/span&gt;;&lt;br /&gt;System.Globalization.TextInfo  textInfo = System.Globalization.CultureInfo.CurrentCulture.TextInfo;&lt;br /&gt;Console.WriteLine(&lt;span class="str"&gt;"{0} converted to title case: {1}"&lt;/span&gt;, passCapitalization, textInfo.ToTitleCase(passCapitalization));&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
And the output:
&lt;p&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNet.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingDotNet" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNet.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So, how hard is this to do in Ruby? &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRb.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingRb" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRb.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Yes, it's easy, but what about for a real business application, where you'd want to capitalize all the words in a sentence? &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRbMult.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingRbMult" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRbMult.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Ruby's capitalize string method won't do it, but TextInfo::ToTitleCase will. &lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; doubleCapitalization = &lt;span class="str"&gt;"double testing"&lt;/span&gt;;&lt;br /&gt;Console.WriteLine(&lt;span class="str"&gt;"{0} converted to title case: {1}"&lt;/span&gt;, doubleCapitalization, textInfo.ToTitleCase(doubleCapitalization));&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNetMultWords.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingDotNetMultWords" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNetMultWords.png" /&gt;&lt;/a&gt; &lt;/pre&gt;
&lt;p&gt;Luckily, Ruby is just our language, and Rails is actually our framework. Rails extends the string class with a titlecase method that does just what we need. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRailsMult.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingRailsMult" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingRailsMult.png" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The feeling I got when discovering this was that in using the language and framework, doing what I wanted to do was easy and straightforward. It just worked.&lt;/p&gt;
&lt;p&gt;As a semi-unrelated aside, I feel ToTitleCase is broken in the .Net Framework.  If the output is supposed to be in title case, why does the format of the input matter?  Why does it do nothing when the input is all caps? &lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; failCapitalization = &lt;span class="str"&gt;"FAILING"&lt;/span&gt;;&lt;br /&gt;Console.WriteLine(&lt;span class="str"&gt;"{0} converted to title case: {1}"&lt;/span&gt;, failCapitalization, textInfo.ToTitleCase(failCapitalization));&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNetFailing.png"&gt;&lt;img border="0" style="border-width: 0px;" alt="TestingDotNetFailing" src="http://www.dugaldwilson.com/images/LearningtoLoveRuby_11CF7/TestingDotNetFailing.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/40.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/08/12/Learning-to-Love-Ruby.aspx</guid>
            <pubDate>Wed, 13 Aug 2008 01:15:25 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/40.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/08/12/Learning-to-Love-Ruby.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/40.aspx</wfw:commentRss>
        </item>
        <item>
            <title>TriNUG August 2008 - Jeffrey Palermo - TDD, DI, and SoC with ASP.NET MVC</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/08/06/TriNUG-August-2008---Jeffrey-Palermo---TDD-DI-and.aspx</link>
            <description>&lt;br /&gt;
On Wednesday, Aug 13, Jeffrey Palermo will be talking about separation of concerns, dependency injection, and test driven development with ASP.Net MVC. This should be an excellent discussion on some of the benefits in using the new MVC framework for ASP.Net.&lt;br /&gt;
&lt;br /&gt;
There are some important points to underline about this meeting:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;It will be awesome.&lt;/li&gt;
    &lt;li&gt;Registration is required to manage headcount, especially for our dinner arrangements. &lt;span style="font-weight: bold;"&gt;To attend, you must register on the site.&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;This meeting is &lt;span style="font-weight: bold;"&gt;not at RTI&lt;/span&gt;. The August 13 meeting will be held at &lt;a href="http://maps.live.com/OneClickDirections.aspx?rtp=%7epos.pzbzwz8f5rwc_4101+Doie+Cope+Rd%2c+Raleigh%2c+NC_Ecpi+Technical+College_(919)+785-3303_a_&amp;amp;mkt=en-us&amp;amp;FORM=LLMP"&gt;ECPI&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
This should be a great meeting. Hope to see you there!&lt;img src="http://dugaldwilson.com/dugald/aggbug/39.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/08/06/TriNUG-August-2008---Jeffrey-Palermo---TDD-DI-and.aspx</guid>
            <pubDate>Wed, 06 Aug 2008 13:33:50 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/39.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/08/06/TriNUG-August-2008---Jeffrey-Palermo---TDD-DI-and.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/39.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>