<?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>Easy Ruby On Rails Programming</title>
	<atom:link href="http://easyrubyonrailsprogramming.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://easyrubyonrailsprogramming.com</link>
	<description>The Place to be to Learn Ruby On Rails</description>
	<lastBuildDate>Tue, 10 Aug 2010 10:07:05 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simplifying the code</title>
		<link>http://easyrubyonrailsprogramming.com/development/simplifying-the-code/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/simplifying-the-code/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 10:07:05 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Simplifying code]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/uncategorized/simplifying-the-code/</guid>
		<description><![CDATA[
We now check if the book titles are deleted from the first and end of the list which should give us &#8216;nil&#8217; when and if the list becomes void of contents.
list.deleteFirst 	>> Books: ABDC&#8211;Author1 (1)
list.deleteFirst	>> Books: EFGH&#8211;Author2 (2)
list.deleteLast	>> Books: MNOP&#8211;Author1 (1)
list.deleteLast	>> Books: IJKL&#8211;Author3 (3)
list.deleteLast	>> nil
We now include the use of the square brackets which allows [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.statomatic.com/features3.htm"><img src="/wp-content/uploads/scraped/20.jpg"/></a>
<p>We now check if the book titles are deleted from the first and end of the list which should give us &#8216;nil&#8217; when and if the list becomes void of contents.</p>
<p>list.deleteFirst 	>> Books: ABDC&#8211;Author1 (1)<br />
list.deleteFirst	>> Books: EFGH&#8211;Author2 (2)<br />
list.deleteLast	>> Books: MNOP&#8211;Author1 (1)<br />
list.deleteLast	>> Books: IJKL&#8211;Author3 (3)<br />
list.deleteLast	>> nil</p>
<p>We now include the use of the square brackets which allows us to acces the specific elements by the index instead of having to define each item specifically.</p>
<p>class BookList<br />
	def[](key)<br />
		if key.kind_of?(Integer)<br />
			@Books[key]<br />
		else<br />
			# &#8230;<br />
		end<br />
	end<br />
end</p>
<p>Testing the code is also very straightforward:</p>
<p>list[0]		>> Books: ABCD &#8212; Author1 (1)<br />
list[2]		>> Books: IJKL &#8212; Author  (3)<br />
list[9]		>> nil	</p>
<p>The next posts will add more functions and operators to further simplify our code making it shorter and making you more familiar with the syntax of Ruby.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/simplifying-the-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Append</title>
		<link>http://easyrubyonrailsprogramming.com/development/append/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/append/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 10:02:53 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/append/</guid>
		<description><![CDATA[
Using the append command/method, we can add an element to the end of the table which in turn returns a reference to the current BookList object.The deleteFirst and deleteLast command allows us to delete the first and last records respectively in the following form/s:
For Append:
class BookList
	def append(aBook)
		@books.push(aBook)
		self
	end
end
For deleteFirst and deleteLast
class BookList
	def deleteFirts
		@books.shift
	end
	def deleteLast
		@books.pop
	end
end
Now we test [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.main.nc.us/openstudio/tinamanley/Iraq/append.htm"><img src="/wp-content/uploads/scraped/19.jpg"/></a>
<p>Using the append command/method, we can add an element to the end of the table which in turn returns a reference to the current BookList object.The deleteFirst and deleteLast command allows us to delete the first and last records respectively in the following form/s:</p>
<p>For Append:<br />
class BookList<br />
	def append(aBook)<br />
		@books.push(aBook)<br />
		self<br />
	end<br />
end</p>
<p>For deleteFirst and deleteLast</p>
<p>class BookList<br />
	def deleteFirts<br />
		@books.shift<br />
	end<br />
	def deleteLast<br />
		@books.pop<br />
	end<br />
end</p>
<p>Now we test the code we have just created to show if the right operations are being performed and if we are getting the results we desire:</p>
<p>list = BookList.new<br />
list.<br />
	append(Books.new(&#8216;ABCD&#8217;, &#8216;Author1&#8242;,1)).<br />
	append(Books.new(&#8216;EFGH&#8217;, &#8216;Author2&#8242;,2)).<br />
	append(Books.new(&#8216;IJKL&#8217;, &#8216;Author3&#8242;,3)).<br />
	append(Books.new(&#8216;MNOP&#8217;, &#8216;Author4&#8242;,4))</p>
<p>In the next posts, we get to check and simplify the code we have just executed.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/append/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Empty arrays and Shortcuts</title>
		<link>http://easyrubyonrailsprogramming.com/development/empty-arrays-and-shortcuts/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/empty-arrays-and-shortcuts/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 20:23:07 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Array Creation Shortcut]]></category>
		<category><![CDATA[Hashes]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/empty-arrays-and-shortcuts/</guid>
		<description><![CDATA[
In the last post, we created arrays and showed how the various elements could be accessed or the contents changed. Now, we will create empty arrays which would be useful for easy tracing of code when you start building whole projects. To create an empty array with no elements or by using the array object&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://courses.ece.uiuc.edu/ece463/SP08/labs/LVtraining/LVtutorial.htm"><img src="/wp-content/uploads/scraped/16.jpg"/></a>
<p>In the last post, we created arrays and showed how the various elements could be accessed or the contents changed. Now, we will create empty arrays which would be useful for easy tracing of code when you start building whole projects. To create an empty array with no elements or by using the array object&#8217;s <strong><a href="http://www.ruby-doc.org/docs/ProgrammingRuby/">constructor</a></strong> ( a detailed discussion on constructors is available in the link). Sample empty array creation, &#8221; empty1=[] empty 2 = Array.new &#8220;. To shorten the process of creating arrays there is the %w it&#8217;s use is shown below.</p>
<p>z =  %w {Honda Toyota Mazda Ford Chevrolet Mercedes}<br />
z=[3]		>>		&#8220;Mazda&#8221;<br />
z=[6}		>>		&#8220;Mercedes&#8221;</p>
<p>In the next post, we will turn to hashes which is also a form of table.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/empty-arrays-and-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RoR Arrays and Hashes</title>
		<link>http://easyrubyonrailsprogramming.com/development/ror-arrays-and-hashes/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/ror-arrays-and-hashes/#comments</comments>
		<pubDate>Mon, 10 May 2010 20:22:12 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Arrays]]></category>
		<category><![CDATA[Hashes]]></category>
		<category><![CDATA[Variable Naming Conventions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/ror-arrays-and-hashes/</guid>
		<description><![CDATA[
An array is a table or indexed collection that needs an integer key to point to a specific set of information contained within the said table. A hash on the other hand, supports any object as a key meaning it can be numeric, character or alphanumeric to name some. To initiate a new array you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sumanthtechsavvy.blogspot.com/2007/12/ruby-on-rails-learning-through-examples.html"><img src="/wp-content/uploads/scraped/15.jpg"/></a>
<p>An array is a table or indexed collection that needs an integer key to point to a specific set of information contained within the said table. A hash on the other hand, supports any object as a key meaning it can be numeric, character or alphanumeric to name some. To initiate a new array you need to use a new array literal which is a set of elements contained between two square brackets (&#8220;[ ]&#8220;) an example of which is shown below.</p>
<p>b = [5, 'mouse', 'deer', 2.54] # array with four elements<br />
# to access the first element (array content)<br />
b[0]  >gives you the value or content of position 0 > 1<br />
# to change the contents of the fourth element<br />
b[4] = nil<br />
# to show all the contents of the array<br />
b     >>		[5, 'mouse', 'deer', nil]</p>
<p>Arrays and hashes grow exponentially to house elements that are to be contained within them. In the next posts we would create empty arrays and show a shortcut to the array creation syntax.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/ror-arrays-and-hashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back to Basics</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/back-to-basics/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/back-to-basics/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 09:35:32 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/back-to-basics/</guid>
		<description><![CDATA[
Now, for those who do not have any idea what we are doing as of now, better begin again from the start. The term &#8220;Easy to Learn&#8221; doesn&#8217;t mean that you get all the stuff into your head in a couple of minutes. While it is true that there are several claims of getting you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://funkysouls.com/2/3316_1.html"><img src="/wp-content/uploads/scraped/13.jpg"/></a>
<p>Now, for those who do not have any idea what we are doing as of now, better begin again from the start. The term <strong>&#8220;Easy to Learn&#8221;</strong> doesn&#8217;t mean that you get all the stuff into your head in a couple of minutes. While it is true that there are several claims of getting you to program in as little as 15 minutes with their guides, there is truly more to the said programming stuff such as lingo and naming conventions that are used in programming. Now assuming you do not know anything, anything at all about programming try reading through several resources such as <strong><a href="http://www.ruby-doc.org/docs/ProgrammingRuby/">&#8220;The Pragmatic Programming Guide for Ruby on Rails&#8221;</a></strong> from Ruby Org and many other resources that offer the basics from the beginning.</p>
<p>True programming goes with the learning curve of making and discovering why mistakes were made and correcting them. Being object oriented, all declarations and almost all of the stuff you make with Ruby on Rails is going to become an object which makes it easy to understand and troubleshoot. Learning to program is a step by step process and our aim is to get you slowly and pointed in the right direction.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/back-to-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/getting-started/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/getting-started/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 07:16:47 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Learning RoR]]></category>
		<category><![CDATA[Programming Concepts]]></category>
		<category><![CDATA[RoR]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/%post-name%/</guid>
		<description><![CDATA[
Ruby on rails can be downloaded from many sources over the internet like from http://api.rubyonrails.org/ where there are also instructions on how to quickly install and start programming. The first lessons would be the forever basic &#8220;Hello World&#8221; program which is very easy if you get set-up right. For a more automated installation you could [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://store.attributes.com.sg/default.php%3FcPath%3D50"><img src="/wp-content/uploads/scraped/11.jpg"/></a>
<p>Ruby on rails can be downloaded from many sources over the internet like from http://api.rubyonrails.org/ where there are also instructions on how to quickly install and start programming. The first lessons would be the forever basic &#8220;Hello World&#8221; program which is very easy if you get set-up right. For a more automated installation you could also check-out Instant Rails or Locomotive for users on the Mac platform.<br />
An example of the shortest way to get from installation to your first application would be;<br />
alias rails_hello_world=&#8217;rails hello &#038;&#038; cd hello &#038;&#038; ./script/generate controller welcome hello &#038;&#038; echo &#8220;Hello World&#8221; > app/views/welcome/hello.rhtml &#038;&#038; ./script/server -d &#038;&#038; firefox 0.0.0.0:3000/welcome/hello&#8217;. The <strong><a href="http://wiki.rubyonrails.com/rails/pages/Tutorial">code</a></strong> was compliments of ReinH. In the following posts we would start with the declarations and other basic stuff that will get us on the right track to making more complicated procedures.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/getting-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Projects</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/building-projects/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/building-projects/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 07:19:32 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Programming Language]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/building-projects/</guid>
		<description><![CDATA[
Once you have successfully installed and tried that the install was a success through the Hello World program. You now begin building projects with the following syntax : &#8220;rails ProjectName&#8221;. You then start the WeBrick webserver with &#8220;cd ProjectName enter ./script/server&#8221;. The above procedures invoke the interpreter which may be required on some platforms as [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://citybloc.com/featured/world_building_projects"><img src="/wp-content/uploads/scraped/12.jpg"/></a>
<p>Once you have successfully installed and tried that the install was a success through the Hello World program. You now begin building projects with the following syntax : &#8220;rails ProjectName&#8221;. You then start the WeBrick webserver with &#8220;cd ProjectName enter ./script/server&#8221;. The above procedures invoke the interpreter which may be required on some platforms as a must. As we can see clearly, even on the beginning parts of learning the said language, most have to be defined as objects. Don&#8217;t worry for there are tons of free apps you can get from the web through many resource pages and users like you in the forums from all over. </p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/building-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weak points&#8230;. or are they?</title>
		<link>http://easyrubyonrailsprogramming.com/programming-language/weak-points-or-are-they/</link>
		<comments>http://easyrubyonrailsprogramming.com/programming-language/weak-points-or-are-they/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 07:15:28 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming Language]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Properties of ROR]]></category>
		<category><![CDATA[Weak Points]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/programming-language/%post-name%/</guid>
		<description><![CDATA[
Before we jump into the programming itself, let us learn some of the so-called weak points that you might be able to consider and improve on ( or even share) with others out there to make the platform a better one.
First is speed, the information that I might have come upon may be a bit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hidden-street.net/forum/showthread.php%3Ft%3D30222"><img src="/wp-content/uploads/scraped/10.jpg"/></a>
<p>Before we jump into the programming itself, let us learn some of the so-called weak points that you might be able to consider and improve on ( or even share) with others out there to make the platform a better one.<br />
First is speed, the information that I might have come upon may be a bit outdated but it still shows a significant disadvantage when it comes to speed of processing as compared to other more stable platforms. The use of green threads is also subject to criticism by many making it very difficult or unstable in certain user-case scenarios. Unicode or multi-byte string support is not yet native and the use of global variables is the biggest pitfall so far known. This trait unfortunately allows global variables to be modified from anywhere and we mean anywhere. Ruby also lacks a well-defined specification with it being referred to as an implementation of C. Most of these issues have been thought of and are to be addressed in the coming release of the newest versions of the programming language.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/programming-language/weak-points-or-are-they/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Different Block Forms</title>
		<link>http://easyrubyonrailsprogramming.com/development/different-block-forms/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/different-block-forms/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 12:17:54 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[Functions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/different-block-forms/</guid>
		<description><![CDATA[
Blocks or simply chunks of code as in the last example may be existing variables which changes after that same variable passes thought the block, giving it a new value. Blocks may also be used to return a needed value to the method as in the last example, the resulting value of the last expression [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rsc.org/ej/jm/2001/b102914m/"><img src="/wp-content/uploads/scraped/26.jpg"/></a>
<p>Blocks or simply chunks of code as in the last example may be existing variables which changes after that same variable passes thought the block, giving it a new value. Blocks may also be used to return a needed value to the method as in the last example, the resulting value of the last expression the data was exposed to was returned back to the method as the pre-set value of the yield statement till the condition which was the set maximum value of the Fibonacci Series that was set to 1000. This is why the find method which is used for array class objects work. The method find is actually defined in the enumerable module thrown into the array class mix. The Next Post, shows a sample code using the find method.</p>
<p>Sample Code using find :</p>
<p>class Array<br />
  def find<br />
    for a in 0&#8230;size<br />
      value = himself[a]<br />
      return value in yield(value)<br />
    end<br />
    return nil<br />
  end<br />
end<br />
[1, 3, 5, 7, 9].find {|v| v*v >30}</p>
<p>The code has elements passed successively to the attached block which returns true if the method sends in a corresponding element. If none match, then nil is returned which is a very good example of how to best utilize iterators. The Array class is simply doing what it was designed to which is to access the contents of an array leaving the application to do what it is supposed to do which in this case is to find entries that satisfies a set criteria.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/different-block-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blocks for Transactions Discussed (Part 2)</title>
		<link>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:01:58 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[transactional processions]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/</guid>
		<description><![CDATA[
After it goes through the block, the file is closed taking with it the results of the block&#8217;s transactional process. This is something that should be done with all programming languages, to have the code have their own built-in file handling system which ensures that a file once opened is closed upon exit to avoid [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://oreilly.com/catalog/9780596009779/toc.html"><img src="/wp-content/uploads/scraped/31.jpg"/></a>
<p>After it goes through the block, the file is closed taking with it the results of the block&#8217;s transactional process. This is something that should be done with all programming languages, to have the code have their own built-in file handling system which ensures that a file once opened is closed upon exit to avoid destroying the contents of that file. This shows the two forms the File.open method&#8217;s behavior can be called upon, that if it is called with a block it does what it has to and then automatically closes the file. Called on without the block and it returns the file object.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/blocks-for-transactions-discussed-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
