<?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>Ruby On Rails Programming 101</title>
	<atom:link href="http://rubyonrailsprogramming101.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubyonrailsprogramming101.com</link>
	<description>Making Learning Ruby on Rails the Easy a Breeze</description>
	<lastBuildDate>Tue, 10 Aug 2010 01:36:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using the &#8216;yield&#8217; statement</title>
		<link>http://rubyonrailsprogramming101.com/basics/using-the-yield-statement/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/using-the-yield-statement/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 01:36:42 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[simplifying code]]></category>
		<category><![CDATA[yield]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/using-the-yield-statement/</guid>
		<description><![CDATA[
It might be almost similar but relatively different in a big way for blocks may appear only in the source adjacent to a method call which means it should be written on the same line as the method&#8217;s last parameter and it is not implemented once it is encountered but, Ruby rather remembers the context [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.protsyk.com/cms/%3Fp%3D147"><img src="/wp-content/uploads/scraped/19.jpg"/></a>
<p>It might be almost similar but relatively different in a big way for blocks may appear only in the source adjacent to a method call which means it should be written on the same line as the method&#8217;s last parameter and it is not implemented once it is encountered but, Ruby rather remembers the context by which the block of code appears then enters the method. Within the method itself, the block of code may be called as if it were a block in itself by using the &#8216;yield&#8217; statement. After the block of code has been executed, control returns immediately right after the call to the yield statement. Sample use of &#8216;yield&#8217;:</p>
<p>def threeTimes<br />
     yield<br />
     yield<br />
     yield<br />
end<br />
threeTimes {puts &#8220;Hi There&#8221;}</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/using-the-yield-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simplifying the previous program with modifiers</title>
		<link>http://rubyonrailsprogramming101.com/basics/simplifying-the-previous-program-with-modifiers/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/simplifying-the-previous-program-with-modifiers/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 01:35:27 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[if statements]]></category>
		<category><![CDATA[modifiers]]></category>
		<category><![CDATA[siplifying code]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/simplifying-the-previous-program-with-modifiers/</guid>
		<description><![CDATA[
As said in the past post, there is an easier way of doing the stuff we did in the last program which would be very helpful when coding thousands of line of code when you do end up building your own programs is ruby.
class BookList
     def [](key)
	if key.kind_of?(integer)
	    [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ismanet.org/resources/mm_coalition/11-9-07/index.htm"><img src="/wp-content/uploads/scraped/18.jpg"/></a>
<p>As said in the past post, there is an easier way of doing the stuff we did in the last program which would be very helpful when coding thousands of line of code when you do end up building your own programs is ruby.</p>
<p>class BookList<br />
     def [](key)<br />
	if key.kind_of?(integer)<br />
	     result =  @Books[key]<br />
	else<br />
	     result = @Books.find { |aBooks| key == sBooks.name}<br />
     	end<br />
	return result<br />
     end<br />
end</p>
<p>Simplifying the code further by using the ‘if’ statement as a modifier it becomes a shorter easier to attain the same results as with the first program:</p>
<p>class Booklist<br />
     def [](key)<br />
	return @Books[key] if key.kind_of?(Integer)<br />
	return @Books.find { |aBooks| aBooks.name == key }<br />
     end<br />
end</p>
<p>The use of the &#8216;find&#8217; command in Ruby is simply a call to a function that is executed and it can be compared to a block call in many other languages such as Perl, C++ or Java. </p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/simplifying-the-previous-program-with-modifiers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RoR and Text Editors Part-1</title>
		<link>http://rubyonrailsprogramming101.com/basics/ror-and-text-editors-part-1/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/ror-and-text-editors-part-1/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 10:14:37 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/ror-and-text-editors-part-1/</guid>
		<description><![CDATA[
Though there is no preferred editor in the coding and editing of programs which is usually left to the programmer to decide. There are a couple of purpose built editors that can be used with RoR. 
Emacs, has a quite simple configuration that accompanies its use and allows simultaneously displays changes as they are made [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://biodegradablegeek.com/2007/12/using-vim-as-a-complete-ruby-on-rails-ide/"><img src="/wp-content/uploads/scraped/15.jpg"/></a>
<p>Though there is no preferred editor in the coding and editing of programs which is usually left to the programmer to decide. There are a couple of purpose built editors that can be used with RoR. </p>
<p>Emacs, has a quite simple configuration that accompanies its use and allows simultaneously displays changes as they are made hence it�s classification as a Display Editor. It also has a nifty help function the user can evoke by the simple press of the Ctrl-H keys. The Point feature allows the definition of the position of a character as they are entered onto the keyboard. The Echo Area Feature is a segment on the lower bottom of the screen editor that shows the amount of characters on the screen for various purposes should they be needed. The Mode Line is the last line on the screen which is signified by the starting and ending with dashes on the screen. Like all editors, Emacs has a menu bar where all the options available to the user can be found making use simpler instead of having to memorize special key combinations.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/ror-and-text-editors-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started and how to open Programs : Part 2</title>
		<link>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-2/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-2/#comments</comments>
		<pubDate>Mon, 10 May 2010 10:14:01 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RoR Basics]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-2/</guid>
		<description><![CDATA[
Save the text file with the following filename &#8220;first1.rb&#8221; and we now go into the syntax checking function and the facility provided to show the syntax check verbosely. The following code shows how code is checked for syntax correctness and returns the result of the said checking by typing the following code :
$ ruby :cw [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sandboxie.com/index.php%3FGettingStarted"><img src="/wp-content/uploads/scraped/14.jpg"/></a>
<p>Save the text file with the following filename &#8220;first1.rb&#8221; and we now go into the syntax checking function and the facility provided to show the syntax check verbosely. The following code shows how code is checked for syntax correctness and returns the result of the said checking by typing the following code :</p>
<p>$ ruby :cw first1.rb</p>
<p>The &#8220;-c&#8221; flag initiates Ruby&#8217;s syntax checker while the &#8220;w&#8221; flag shows the result of the syntax checker. If there is no issue with the code being checked you get a &#8220;Syntax OK&#8221; result which means you can execute the code for there are no syntax issues. Type $ruby first1.rb on the command line and you get the result &#8221; The concatenated line is : This is my first Ruby Program &#8221; </p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started and how to open Programs : Part 1</title>
		<link>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-1/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-1/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 10:12:51 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RoR Basics]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-1/</guid>
		<description><![CDATA[
RubyonRails is similar to most programming languages where in one can use the command line in windows or a terminal in Unix based systems. All programs should be written and saves in plain text format for the compiler and interpreter to process it easily. The first program would give you a feel for the overall [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unicon.net/node/1036"><img src="/wp-content/uploads/scraped/13.jpg"/></a>
<p>RubyonRails is similar to most programming languages where in one can use the command line in windows or a terminal in Unix based systems. All programs should be written and saves in plain text format for the compiler and interpreter to process it easily. The first program would give you a feel for the overall syntax of how the program is created and what the compiler does. Type the following code into the text file to see how it is done:</p>
<p>#this is a sample program<br />
a = &#8220;This is&#8221;<br />
b = &#8220;my first Ruby Program&#8221;<br />
print &#8220;The concatenated line is :&#8221;<br />
print a << b</p>
<p>The next post would show the continuation of the exercise.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/getting-started-and-how-to-open-programs-%e2%80%93-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next step : Creating the database for the filename application</title>
		<link>http://rubyonrailsprogramming101.com/set-up/next-step-%e2%80%93-creating-the-database-for-the-filename-application/</link>
		<comments>http://rubyonrailsprogramming101.com/set-up/next-step-%e2%80%93-creating-the-database-for-the-filename-application/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 05:09:14 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Set-Up]]></category>
		<category><![CDATA[Command Line]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[Odbc]]></category>
		<category><![CDATA[RoR]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/set-up/next-step-%e2%80%93-creating-the-database-for-the-filename-application/</guid>
		<description><![CDATA[
The next phase or step would be to create a database for the application to use. Make sure the MySql engine is running and in the command window type &#8220;mysql -u root -p&#8221; and press enter and another enter for the password when prompted for there has not been any defined password yet. You are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.imagementor.net/resources/viewer.asp%3FResourceID%3D125"><img src="/wp-content/uploads/scraped/11.jpg"/></a>
<p>The next phase or step would be to create a database for the application to use. Make sure the MySql engine is running and in the command window type <em>&#8220;mysql -u root -p&#8221;</em> and press enter and another enter for the password when prompted for there has not been any defined password yet. You are now logged into the engine as the root user and proceed to create the database by entering the following command <em>&#8220;create database filename_development&#8221;</em>. Also type in <em>&#8220;grant all on filename_development.* to &#8216;ODBC&#8217;@'localhost&#8217;</em> this tells windows to grant access to a user named ODBC so you avoid an error when you try to access the said database from the command prompt. We next tackle the creation of tables that would allow the database to store the information we send it.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/set-up/next-step-%e2%80%93-creating-the-database-for-the-filename-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database manipulation</title>
		<link>http://rubyonrailsprogramming101.com/set-up/database-manipulation/</link>
		<comments>http://rubyonrailsprogramming101.com/set-up/database-manipulation/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 05:10:05 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Basics]]></category>
		<category><![CDATA[Medium]]></category>
		<category><![CDATA[Set-Up]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[RoR]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/set-up/database-manipulation/</guid>
		<description><![CDATA[
The database has been initialized, so now we get down to business of defining the fields in that database and include a field that we would call a foreign key which allows the establishment of the one to many relationship between the tables. This part of the process requires quite a bit of background of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mikeparr.info/csharp1st/csdb/cs25dbchapter.htm"><img src="/wp-content/uploads/scraped/12.jpg"/></a>
<p>The database has been initialized, so now we get down to business of defining the fields in that database and include a field that we would call a foreign key which allows the establishment of the one to many relationship between the tables. This part of the process requires quite a bit of background of database creation, manipulation and handling. It also requires knowledge regarding the workings of data types. So assuming you do not have much knowledge in such areas do some more reading to give you a better understanding of what how and why they are there. The ROR developers might say that it is very easy to do and use ROR but without the background on logic formulation, data types and manipulation as well as database handling the rest of the posts which would tackle ever hardening topics and operations would be very difficult to make sense of.</p>
<p>Don&#8217;t get me wrong, we just want to make life easier for you and not have you not understanding anything at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/set-up/database-manipulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RoR Application Directories in-depth</title>
		<link>http://rubyonrailsprogramming101.com/set-up/ror-application-directories-in-depth/</link>
		<comments>http://rubyonrailsprogramming101.com/set-up/ror-application-directories-in-depth/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 05:07:14 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Set-Up]]></category>
		<category><![CDATA[folders]]></category>
		<category><![CDATA[RoR Application Directories]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/set-up/ror-application-directories-in-depth/</guid>
		<description><![CDATA[
There are quite a number of directories locate in the apps folder we have just created so to de-mystify them here are some explanations which hopefully would help you out. The directory &#8220;app/controllers&#8221; is where Rails searches for the controller classes which controls the web request from the user. The next one is the, &#8220;app/views&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://nettuts.com/misc/learn-ruby-on-rails-from-scratch-week-1/"><img src="/wp-content/uploads/scraped/10.jpg"/></a>
<p>There are quite a number of directories locate in the apps folder we have just created so to de-mystify them here are some explanations which hopefully would help you out. The directory <em>&#8220;app/controllers&#8221;</em> is where Rails searches for the controller classes which controls the web request from the user. The next one is the, <em>&#8220;app/views&#8221;</em> folder which houses the templates to which the data from the app is converted to HTML and then returned to the user&#8217;s browser. The next folder houses the <em>&#8220;apps/models&#8221;</em> subdirectory which contains the data classes that wraps the data stored within the application&#8217;s database (this is the messiest part of the framework in other frameworks). Then last of the vital sub-directories is the <em>&#8220;app/helpers&#8221;</em> which hold the helper classes of data that assists the view, model and controller classes keeping them small, organized and focused on the task it is supposed to do in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/set-up/ror-application-directories-in-depth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hashes (Part 2)</title>
		<link>http://rubyonrailsprogramming101.com/basics/hashes-part-2/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/hashes-part-2/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 10:49:05 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[Hashes]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/hashes-part-2/</guid>
		<description><![CDATA[
Top find out what each key in the hash is associated with :
salad['green salad'] =&#62; &#8220;lettuce and sweet basil&#8221;
As with arrays, there are a lot of useful methods in creating them. 
salad.empty? (to check if the hash is empty)
salad.size   (to check for the number of elements in the hash)
salad.keys   (to get [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://phpsec.org/articles/2005/password-hashing.html"><img src="/wp-content/uploads/scraped/32.jpg"/></a>
<p>Top find out what each key in the hash is associated with :</p>
<p>salad['green salad'] =&gt; &#8220;lettuce and sweet basil&#8221;</p>
<p>As with arrays, there are a lot of useful methods in creating them. </p>
<p>salad.empty? (to check if the hash is empty)<br />
salad.size   (to check for the number of elements in the hash)<br />
salad.keys   (to get all the keys in the hash to create an array)<br />
salad.values (to get the keys in the form of an array but not necessarily in the order they&#8217;ve been entered in the hash)</p>
<p>All the above operations are built-in methods that are used for such purposes.</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/hashes-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hashes (Part 1)</title>
		<link>http://rubyonrailsprogramming101.com/basics/hashes-part-1/</link>
		<comments>http://rubyonrailsprogramming101.com/basics/hashes-part-1/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:48:21 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[Hashes]]></category>

		<guid isPermaLink="false">http://rubyonrailsprogramming101.com/basics/hashes-part-1/</guid>
		<description><![CDATA[
Hashes are simply arrays that link one object to another object (think of it as an association of sorts), say like Spagthetti_sauce which is part of the complete menu, referring to the hash Spaghetti_sauce gives you the ingredients. Same as with arrays, they are created with the &#8220;.new&#8221; method resulting in an empty hash.
salad = [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/ms995846.aspx"><img src="/wp-content/uploads/scraped/31.jpg"/></a>
<p>Hashes are simply arrays that link one object to another object (think of it as an association of sorts), say like Spagthetti_sauce which is part of the complete menu, referring to the hash Spaghetti_sauce gives you the ingredients. Same as with arrays, they are created with the &#8220;.new&#8221; method resulting in an empty hash.</p>
<p>salad = Hash.new</p>
<p>Using curly braces, you get to assign the hash its elements like the example shown below:</p>
<p>salad = {<br />
	green salad =&gt; &#8216;lettuce and sweet basil&#8217;<br />
	coleslaw =&gt; &#8217;shredded lettuce, garlic and onions, carrots&#8217;<br />
	garden fresh =&gt; &#8216;cherry tomatoes, lettuce, iceberg, iceberg lettuce, mayonnaise, olive oil, lemons<br />
 	}</p>
]]></content:encoded>
			<wfw:commentRss>http://rubyonrailsprogramming101.com/basics/hashes-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
