<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dan Appleyard &#187; Learning</title>
	<atom:link href="http://www.danappleyard.com/tag/learning/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danappleyard.com</link>
	<description>Developer&#039;s Thoughts on Tech, Life, &#38; Stuff</description>
	<lastBuildDate>Thu, 21 Jul 2011 21:43:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The chosen language is Ruby</title>
		<link>http://www.danappleyard.com/2010/06/04/the-chosen-language-is-ruby/</link>
		<comments>http://www.danappleyard.com/2010/06/04/the-chosen-language-is-ruby/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 15:19:00 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=198</guid>
		<description><![CDATA[It has been awhile since I wrote about my examination of what language to learn first after using .Net for years. I narrowed it to PHP, Perl, Python, Ruby, and Java. So far, I had gone over all but Java. The reason I did not do Java is because I felt that the examination code [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ruby-lang.org/en/"><img class="alignnone" title="The Ruby Programming Language" src="http://www.ruby-lang.org/images/logo.gif" alt="The Ruby Programming Language" width="331" height="119" /></a><br />
It has been awhile since I wrote about my examination of what language to learn first after using .Net for years.  I narrowed it to <a href="http://www.danappleyard.com/2010/05/19/a-look-at-php/">PHP</a>, <a href="http://www.danappleyard.com/2010/05/17/a-look-at-perl/">Perl</a>, <a href="http://www.danappleyard.com/2010/05/18/a-look-at-python/">Python</a>, <a href="http://www.danappleyard.com/2010/05/22/a-belated-look-at-ruby/">Ruby</a>, and Java.  So far, I had gone over all but Java.  The reason I did not do Java is because I felt that the examination code I would have written in Java was basically C#.  That would not have really brought anything new to light for me.  That is not really attractive to me for a new language.  I was now left with PHP, Perl, Python, and Ruby.  I found that Perl was very cryptic in its syntax, PHP was just for web, and that Python and Ruby are very similar.  I had Python and Ruby in the top two.  Researching what people thought about the two languages, I found that Ruby had the advantage.  Since I take what the development community thinks seriously, I have chosen to learn Ruby.  I will probably try to learn Rails as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/06/04/the-chosen-language-is-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A belated look at Ruby</title>
		<link>http://www.danappleyard.com/2010/05/22/a-belated-look-at-ruby/</link>
		<comments>http://www.danappleyard.com/2010/05/22/a-belated-look-at-ruby/#comments</comments>
		<pubDate>Sun, 23 May 2010 04:32:45 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=159</guid>
		<description><![CDATA[Last Sunday I went over a list of possible programming languages to learn. It ended with me decided to learn all of them, but unsure as to what to learn first. I decided to go over each of them and figure out what I thought about them. How would I do this? What I have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/">Last Sunday I went over a list of possible programming languages to learn</a>.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided to do is see how complex it is to do the same thing in each language.  What better to test out a language than to create a class?  <a href="http://www.danappleyard.com/2010/05/17/a-look-at-php/">Wednesday, I went over the PHP implementation</a>.  Today is Ruby&#8217;s turn.</p>
<h2>Ruby Class</h2>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Person
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">def</span> initialze<span style="color:#006600; font-weight:bold;">&#40;</span>firstName, lastName, age<span style="color:#006600; font-weight:bold;">&#41;</span>
		<span style="color:#0066ff; font-weight:bold;">@firstName</span> = firstName
		<span style="color:#0066ff; font-weight:bold;">@lastName</span> = lastName
		<span style="color:#0066ff; font-weight:bold;">@age</span> = age
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">def</span> IntroduceYourself
	    response = <span style="color:#996600;">&quot;Hello, my name is &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@firstName</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot; &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@lastName</span>
            response = response <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;, and I am &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@age</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot; year(s) old.&quot;</span>
            <span style="color:#0000FF; font-weight:bold;">return</span> response
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<h2>Ruby Implementation</h2>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">dan = Person.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;Dan&quot;</span>, <span style="color:#996600;">&quot;Appleyard&quot;</span>, <span style="color:#006666;">27</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> dan.<span style="color:#9900CC;">IntroduceYourself</span></pre></div></div>

<h2>My Thoughts</h2>
<p>Rubys seems similar to Python.  Since I liked Python, I like Ruby.  At this point in my limited knowledge of these languages, I don&#8217;t really see the differences between Ruby and Python.  My final examination will be that of Java.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/22/a-belated-look-at-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No look at Ruby today</title>
		<link>http://www.danappleyard.com/2010/05/20/no-look-at-ruby-today/</link>
		<comments>http://www.danappleyard.com/2010/05/20/no-look-at-ruby-today/#comments</comments>
		<pubDate>Fri, 21 May 2010 03:27:26 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=154</guid>
		<description><![CDATA[I have been too busy today to mess around with Ruby. Will try tomorrow.]]></description>
			<content:encoded><![CDATA[<p>I have been too busy today to mess around with Ruby.  Will try tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/20/no-look-at-ruby-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A look at PHP</title>
		<link>http://www.danappleyard.com/2010/05/19/a-look-at-php/</link>
		<comments>http://www.danappleyard.com/2010/05/19/a-look-at-php/#comments</comments>
		<pubDate>Wed, 19 May 2010 22:03:46 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=83</guid>
		<description><![CDATA[Okay, on Sunday I went over a list of possible programming languages to learn. It ended with me decided to learn all of them, but unsure as to what to learn first. I decided to go over each of them and figure out what I thought about them. How would I do this? What I [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, <a href="http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/">on Sunday I went over a list of possible programming languages to learn</a>.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided to do is see how complex it is to do the same thing in each language.  What better to test out a language than to create a class?<br />
<a href="http://www.danappleyard.com/2010/05/17/a-look-at-python/">Yesterday, I went over the Python implementation</a>.  Today is PHP&#8217;s turn.</p>
<h2>PHP Class</h2>
<pre class="brush:php">
firstName = $firstName;
		$this-&gt;lastName = $lastName;
		$this-&gt;age = $age;
	}
	public function IntroduceYourself(){
		return "Hello, my name is $this-&gt;firstName $this-&gt;lastName, and I am $this-&gt;age year(s) old.";
	}
}

?&gt;
</pre>
<h2>PHP Implementation</h2>
<pre class="brush:php">
IntroduceYourself();
?&gt;
</pre>
<h2>My Thoughts</h2>
<p>I&#8217;ve had some minor experience with PHP before in the past.  Nothing really to write home about.  PHP is fine I guess, reminds me too much of C and C++ for some reason.  I&#8217;m really looking for a language that I can do both in and out a web environment.  PHP is just web.  As of now, PHP is slighly over Perl and under Python.  Tomorrow I will go over Ruby.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/19/a-look-at-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A look at Python</title>
		<link>http://www.danappleyard.com/2010/05/18/a-look-at-python/</link>
		<comments>http://www.danappleyard.com/2010/05/18/a-look-at-python/#comments</comments>
		<pubDate>Tue, 18 May 2010 14:12:02 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=53</guid>
		<description><![CDATA[Okay, on Sunday I went over a list of possible programming languages to learn. It ended with me decided to learn all of them, but unsure as to what to learn first. I decided to go over each of them and figure out what I thought about them. How would I do this? What I [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, <a href="http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/">on Sunday I went over a list of possible programming languages to learn</a>.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided to do is see how complex it is to do the same thing in each language.  What better to test out a language than to create a class?<br />
<a href="http://www.danappleyard.com/2010/05/17/a-look-at-perl/">Yesterday, I went over the Perl</a>.  Today is Python&#8217;s turn.</p>
<h2>Python Class</h2>
<pre class="brush:python">
class Person:
	def __init__(self, firstname, lastname, age):
		self.firstname = firstname
		self.lastname = lastname
		self.age = age

	def IntroduceYourself(self):
		return "Hello, my name is " + self.firstname + " " + self.lastname + ", and I am " + str(self.age) + " year(s) old."
</pre>
<h2>Python Implementation</h2>
<pre class="brush:perl">
dan = Person("Dan", "Appleyard", 27)

print dan.IntroduceYourself()
</pre>
<h2>My Thoughts</h2>
<p>Very different than Perl, wouldn&#8217;t you agree?  Seven lines of code to create the same that class that took 17 lines in Perl.  I kind of like it.  Indentation is key with Python.  Tomorrow, I am going to go over the same class implementation in PHP.  Until tomorrow then!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/18/a-look-at-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A look at Perl</title>
		<link>http://www.danappleyard.com/2010/05/17/a-look-at-perl/</link>
		<comments>http://www.danappleyard.com/2010/05/17/a-look-at-perl/#comments</comments>
		<pubDate>Tue, 18 May 2010 03:42:51 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=21</guid>
		<description><![CDATA[Okay,yesterday I went over a list of possible programming languages to learn.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided [...]]]></description>
			<content:encoded><![CDATA[<p>Okay,<a href="http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/">yesterday I went over a list of possible programming languages to learn</a>.  It ended with me decided to learn all of them, but unsure as to what to learn first.  I decided to go over each of them and figure out what I thought about them.  How would I do this?  What I have decided to do is see how complex it is to do the same thing in each language.  What better to test out a language than to create a class?</p>
<h2>My Control Class</h2>
<p>I started out creating a basic VB.NET class &#8211; a Person class that simply introduces itself:</p>
<pre class="brush: vb">Public Class Person
   Private FirstName As String
   Private LastName As String
   Private Age As Integer
   Public Sub New(ByVal firstName As String, ByVal lastName As String, ByVal age As Integer)
      Me.FirstName = firstName
      Me.LastName = lastName
      Me.Age = age
   End Sub
   Public Function IntroduceYourself() as String
      Return "Hello, my name is " &amp; FirstName &amp; " " &amp; LastName &amp; ", and I am " &amp; Age &amp; " year(s) old."
   End Function
End Class</pre>
<h2>My Control Implementation</h2>
<pre class="brush: vb">Dim dan As New Person("Dan", "Appleyard", 27)
Console.WriteLine(dan.IntroduceYourself())</pre>
<p>I will compare this to each of the languages I will investigate.  Now the Perl code!</p>
<h2>Perl Class</h2>
<pre class="brush:perl">package Person;

sub new
{
    my $class = shift;
    my $self = {
        _firstName =&gt; shift,
        _lastName  =&gt; shift,
        _age       =&gt; shift,
    };

    bless $self, $class;
    return $self;
}

sub IntroduceYourself {
	my( $self ) = @_;
	return "Hello, my name is $self-&gt;{_firstName} $self-&gt;{_lastName}, and I am $self-&gt;{_age} year(s) old."
}
1;</pre>
<p>Now I am not going to explain every line in this code, just know that with my limited knowledge of Perl (as of now), this is how you make a class in Perl.</p>
<h2>Perl Implementation</h2>
<pre class="brush:perl">use Person;

$dan = new Person ("Dan", "Appleyard", 27);

print $dan-&gt;IntroduceYourself();</pre>
<h2>My Thoughts</h2>
<p>Defining a class in Perl is quite different than VB.NET, wouldn&#8217;t you agree? What is with this $shift?  What is the heck is this bless?  If I decided to do Perl first, these are things I am going to have to pick up.  Tomorrow, I am going to go over the same class implementation in Python.  Until tomorrow then!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/17/a-look-at-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn a new programming language</title>
		<link>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/</link>
		<comments>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/#comments</comments>
		<pubDate>Sun, 16 May 2010 21:18:23 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.danappleyard.com/?p=10</guid>
		<description><![CDATA[I want to broaden my development skills.  I am too focused on .Net technologies.  There are so many other options out there &#8211; Ruby, PHP, Java, Perl, Python, etc.  That being said, I have recently decided to learning a new programming language.  Currently, I know VB.NET, C#, and JavaScript &#8211; pathetic I know.  Of those options [...]]]></description>
			<content:encoded><![CDATA[<p>I want to broaden my development skills.  I am too focused on .Net technologies.  There are so many other options out there &#8211; Ruby, PHP, Java, Perl, Python, etc.  That being said, I have recently decided to learning a new programming language.  Currently, I know VB.NET, C#, and JavaScript &#8211; pathetic I know.  Of those options out there, which one should I learn?  According to <a title="10 programming languages you should learn right now" href="http://www.eweek.com/c/a/IT-Management/10-Programming-Languages-You-Should-Learn-Right-Now/" target="_blank">eWeek.com</a>, I should learn them all.  The funny thing is, I wrote that orginal list of languages before I even found this article.   While the article has been around coming on four years now, I think it is still a valid list (even though I personally disagree the distinction between AJAX and JavaScript as two separate languages). </p>
<p>Now the original question has changed from &#8220;what language should I learn&#8221; to &#8220;what language should I learn first&#8221;.  Some would say that since I know C# Java would have the easiest learning curve.  I don&#8217;t know quite yet.  What are the pros and cons of each language?  Each day this week I will talk about one language and go over the pros and cons of learning it.  These will be MY pros and cons &#8211; not the standard pros and cons of each language. </p>
<p>Tomorrow &#8211; Perl!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danappleyard.com/2010/05/16/learn-a-new-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

