<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>Ruby</title>
        <link>http://www.dugaldwilson.com/dugald/category/12.aspx</link>
        <description>Ruby</description>
        <language>en-US</language>
        <copyright>Dugald Wilson</copyright>
        <generator>Subtext Version 2.1.0.5</generator>
        <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>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>User Group Meeting Tips from Raleigh.rb</title>
            <link>http://dugaldwilson.com/dugald/archive/2008/04/16/User-Group-Meeting-Tips-from-Raleigh.rb.aspx</link>
            <description>I attended the &lt;a href="http://www.raleighrb.com/"&gt;Raleigh.rb&lt;/a&gt; meeting last night. My interest was twofold, for while I am getting into Ruby, as the president of TriNUG I was interested  in seeing what these guys were doing right in terms of running their meetings, since apparently the group is growing like crazy.&lt;br /&gt;
&lt;br /&gt;
I had a good time, and came away with a few things I liked:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold; text-decoration: underline;"&gt;Pizza Doesn't Define the Group&lt;/span&gt;&lt;br /&gt;
Raleigh.rb meets at 7pm, and food is not provided.  This worked for me, as I didn't have to choose between the meeting and having dinner with my family. I got to put my daughter to bed, and go to the meeting.  Win win win.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold; text-decoration: underline;"&gt;No Fluff, Just Stuff&lt;/span&gt;&lt;br /&gt;
The meeting started promptly on time, quickly went through a quick spiel on Hack Night and the upcoming Ruby Hoedown, and then the speaker started speaking. This meeting was about 99% content. &lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold; text-decoration: underline;"&gt;Respect Your Members' Time&lt;/span&gt;&lt;br /&gt;
Start-to-finish, the meeting lasts an hour.  Folks linger and hang out and talk afterwards, but it was nice to attend the meeting, see some friends, and still make it home at a decent hour.&lt;br /&gt;
&lt;br /&gt;
This said, I think the TriNUG main meeting is a different beast, and I'm not recommending TriNUG abandon food and sponsorship, but if I was &lt;a href="http://www.robzelt.com/blog/2008/04/16/RDU+DNUX+Silverlight+Group+Meeting+V10.aspx"&gt;starting a new user group&lt;/a&gt;, I might take a page from these guys.&lt;img src="http://dugaldwilson.com/dugald/aggbug/31.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2008/04/16/User-Group-Meeting-Tips-from-Raleigh.rb.aspx</guid>
            <pubDate>Wed, 16 Apr 2008 23:44:26 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/31.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2008/04/16/User-Group-Meeting-Tips-from-Raleigh.rb.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/31.aspx</wfw:commentRss>
        </item>
        <item>
            <title>John Lam at the Guild</title>
            <link>http://dugaldwilson.com/dugald/archive/2007/10/22/20.aspx</link>
            <description>&lt;br /&gt;
John Lam, the creator of RubyCLR, and one of the driving forces behind IronRuby is coming to Charlotte, and will be presenting to the &lt;a href="http://www.developersguild.org/"&gt;Enterprise Developers Guild&lt;/a&gt; on Thursday, November 1st.  The meeting should kick off around 6pm, with an intro to Ruby and some demonstrations, followed by John arriving /presenting closer to 7pm.&lt;br /&gt;
&lt;br /&gt;
I strongly urge folks with any interest to attend. John is a very smart guy, with a lot of knowledge about the CLR and Ruby, and his presentations are very engaging.&lt;br /&gt;
&lt;br /&gt;
Some links for folks on the fence:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.iunknown.com/"&gt;John Lam's Blog&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.hanselman.com/blog/SilverlightVideoOfJohnLamOnIronRubyAtPADNUG.aspx"&gt;Silverlight video of John Lam's presentation at PADNUG&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Registration link for those NOT on the fence:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032358278&amp;amp;Culture=en-US"&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032358278&amp;amp;Culture=en-US&lt;/a&gt;&lt;img src="http://dugaldwilson.com/dugald/aggbug/20.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Dugald Wilson</dc:creator>
            <guid>http://dugaldwilson.com/dugald/archive/2007/10/22/20.aspx</guid>
            <pubDate>Mon, 22 Oct 2007 12:44:17 GMT</pubDate>
            <wfw:comment>http://dugaldwilson.com/dugald/comments/20.aspx</wfw:comment>
            <comments>http://dugaldwilson.com/dugald/archive/2007/10/22/20.aspx#feedback</comments>
            <wfw:commentRss>http://dugaldwilson.com/dugald/comments/commentRss/20.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
