<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Ruby or Rails - Medium]]></title>
        <description><![CDATA[Anything about ruby or rails. And learning tips. - Medium]]></description>
        <link>https://medium.com/how-i-learned-ruby-rails?source=rss----49bd48b52585---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Qp5vCPzGTGSzGLtr.png</url>
            <title>Ruby or Rails - Medium</title>
            <link>https://medium.com/how-i-learned-ruby-rails?source=rss----49bd48b52585---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 01:40:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/how-i-learned-ruby-rails" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Where Ruby ends and Rails begins]]></title>
            <link>https://medium.com/how-i-learned-ruby-rails/where-ruby-ends-and-rails-begins-31e9bad84930?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/31e9bad84930</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Richardson Dackam]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 20:20:45 GMT</pubDate>
            <atom:updated>2020-03-23T21:21:17.019Z</atom:updated>
            <content:encoded><![CDATA[<p>That might sound like an odd title for experienced Ruby on Rails Developers. But If you’re new to Ruby on Rails you may relate to it and find the differentiation helpful.</p><p>Last night I received a question from a reader:</p><blockquote>“I just started a new job and they’re all RoR and I have zero Ruby experience (long time Perl, JS….some Python and Java). I can’t figure out where Ruby ends and Rails begins.” — Steven</blockquote><p>When I received this question from Steven, my first intuition was to tell him my usual answer “Rails is written in Ruby, and Ruby is a coding language” (And I did ). But then I realized that I wasn’t actually answering his question. You see, for Rubyist, this question is a no brainer. But when you think of it from the perspective of someone that was just introduced to ruby, I can see how that can be confusing. Imagine being thrown on a Ruby on Rails project for the first time and you get used to seeing methods such as <strong>titleize</strong> or <strong>constantize. </strong>Then, you go on IRB (Ruby interactive shell ) and try to write a program by using these methods and you have absolutely no idea why you’re consistently getting <strong>NoMethodErrors.</strong></p><p>In this article, I’m going to try to answer Steven’s question. To do so I’ll need to start with Rack. You might think “Why do I need to know about rack?” at this very moment. Well bear with me, it will all make sense in the end.</p><h3>What is Rack? ( Not Rake )</h3><blockquote>Rack != Rake</blockquote><p>Maybe you didn’t know this, but Rails is a Rack app written in Ruby. But what is Rack? Rack provides a simple interface between a web server and a web framework. You can actually write a simple web application by just using rack.</p><p>It’s so barebone that we can write a web app in a 15 seconds. Ready? 1…2…</p><pre>$ gem install rack<br>$ gem install thin<br>$ echo &quot;run -&gt;(env) { [200, {&#39;Content-Type&#39; =&gt; &#39;text/html&#39;}, [&#39;Hello World!&#39;]] }&quot; &gt; simple_app.ru<br>$ rackup simple_app.ru</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ayah-BLh_j-H42b2IOfclg.png" /></figure><p>That’s it. We have a web app.</p><p>Rack essentially allows you to create a very barebone server application.</p><h3>What is Sinatra?</h3><p>Sinatra is a rack app as well. I wouldn’t go as far as calling Sinatra a framework’; it’s just a DSL on top of Rack that makes it easy to create web applications.</p><p>Now you might wonder, why do I need Sinatra when I can easily create an app in 10 seconds with Rack. Well creating a simple “Hello World” application is easy with Rack, but creating a much more complicated web application would be a lot of work with it. You would essentially have to write much more custom code that you wouldn’t have to with Sinatra or Rails. Rack is so barebone that Sinatra is like adding milk in your coffee.</p><h3>What is Rails?</h3><p>If you liked my analogy above, Rails is the Sugar, and the Cinamon, … and the bread with butter in your coffee. Yes, in short, It’s like Sinatra on steroids (Or with sugar 😂).</p><p>Just like Sinatra, it makes it easier to create web applications. It also comes with a bunch of features that help you with tons of other stuff.</p><h3><strong>Why do you need to know about Rack and Sinatra?</strong></h3><p>You don’t need to know about either, but it will certainly help you better understand what Rails is doing as a framework. Understanding how Sinatra works will clarify everything about Rails in your head (including the model, view, controller logic).</p><blockquote>To be fair, you actually do need to know about Rack.</blockquote><p>I recommend that you get familiar with rack and Sinatra because If you try to build a site using Rack, and then Sinatra you’ll understand what value Sinatra is adding to Rack and then what value Rails is adding to rack in comparison to Sinatra.</p><h3><strong>So…. Where Ruby ends?</strong></h3><p>Since rails is a framework, it comes with a lot of methods that weren’t in the original programming of Ruby. To illustrate this I’m going to show you a few code examples in IRB (Ruby interactive shell — without loading Rails) and in the Rails Console ( where rails is loaded). The only difference is that the rails console is an interactive shell that loads all the config of my Rails application so we get all the Rails method with it.</p><p>You can access IRB by typing:</p><pre>$ irb</pre><p>If you already have a rails application you can access the console by typing the following line in the root of your Rails application:</p><pre>$ rails console</pre><p>Feel free to type the codes that follow. That will allow you to learn by doing and follow along the way.</p><p>Alright, Let’s take the rails method <a href="https://apidock.com/rails/String/humanize"><strong>h</strong></a><strong>umanize </strong>which turns a string into a title by changing the first letter of the first word to uppercase.</p><pre>(RAILS CONSOLE)<br>&gt; 2.7.0 :002 &gt; a = &quot;rails example&quot;<br>&gt; 2.7.0 :011 &gt; a.humanize<br>=&gt; &quot;Rails example&quot;</pre><p>As you can see this is a very useful method, but this method doesn’t exist in Ruby. It’s a Rails method.</p><p>Let’s try to call this method when Rails is not loaded in our IRB console:</p><pre>(IRB)<br>2.7.0 :001 &gt; a = &quot;ruby example&quot;<br>2.7.0 :002 &gt; a.humanize<br>Traceback (most recent call last):<br>        4: from /Users/richardson/.rvm/rubies/ruby-2.7.0/bin/irb:23:in `&lt;main&gt;&#39;<br>        3: from /Users/richardson/.rvm/rubies/ruby-2.7.0/bin/irb:23:in `load&#39;<br>        2: from /Users/richardson/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `&lt;top (required)&gt;&#39;<br>        1: from (irb):2<br>NoMethodError (undefined method `humanize&#39; for &quot;ruby example&quot;:String)</pre><p>Notice that we’re now getting an error?</p><pre>NoMethodError (undefined method `humanize&#39; for &quot;rails method&quot;:String)</pre><p>So what happened? I’m glad you asked! 👏 It’s quite straightforward actually .<strong>humanize</strong> wasn’t defined in Ruby! But if you load Rails, with all its classes then you’ll have that method.</p><h3>How you can investigate methods</h3><p>I want to give you the tool to do this type of investigation on your own in the future. So let do some additional investigation so that you can better understand what’s happening here:</p><pre>2.7.0 :014 &gt; a.methods.grep(/humanize/)<br> =&gt; [:humanize]<br>&gt; 2.7.0 :011 &gt; a.class<br> =&gt; String</pre><p>In the code above: <strong>.methods</strong> returns an array of all the methods for an object. and .<strong>grep</strong> allows us to pass a keyword to return only what we want</p><blockquote>By the way <strong>/humanize/</strong> is actually called a REGEX, but no need to complicate things right now...</blockquote><p>Since <strong>a</strong> is an instance of String, when we call .<strong>humanize</strong>, we’re calling an instance method. With the code above I’m checking that an instance method .<strong>humanize</strong> exist on our instance <strong>a. </strong>And it does!</p><p>If I wanted to check that a method exists on the class itself I would have done.</p><pre>&gt; 2.7.0 :011 &gt; a.class<br> =&gt; String<br>2.7.0 :049 &gt; a.class.methods.grep(/humanize/)<br> =&gt; []</pre><p>Here I’m checking if a method .<strong>humanize</strong> exists in the String class. It’s important to separate instance methods and class methods here. Te method .<strong>humanize</strong> is an instance method so it can only be called on the instance of a class. The <strong>.humanize</strong> method in Rails was written to be called on instances of the class String. ( We will see where it is defined in the rails code shortly )</p><p>So how come we’re able to call this method in the Rails Console and not in IRB? That’s because Ruby doesn’t define <strong>.humanize</strong>, Rails does. So to get it in IRB we would need to load the Rails environment.</p><p>humanize is not the only method that is defined in Rails and not Ruby. Rails is an incredible framework that comes with many handy methods such as:</p><blockquote>pluralize<br>titleize<br>underscore<br>lowercase<br>uppercase<br>2.days.from_now ( Yes seriously! )</blockquote><p>and so on… Rails defines these instance methods in classes such as String, Integer and Float by overwriting the definition of these objects.</p><blockquote>Everything in Ruby is an Object.</blockquote><h3>Let’s write a custom “Rails” Method</h3><p>Want to try it? We’re going to overwrite the String class so we can create our own custom methods — the same way Rails does it. Let’s go back to our rails console so we can do it in the context of Rails first.</p><pre>( Rails Console )<br>2.7.0 :022 &gt; class String<br>2.7.0 :023 &gt;   def custom_method?<br>2.7.0 :024 &gt;     puts &quot;I&#39;m a custom method&quot;<br>2.7.0 :025 &gt;   end<br>2.7.0 :026 &gt; end<br> =&gt; :custom_method?<br>2.7.0 :028 &gt; a = &quot;Taekwendo&quot;<br>2.7.0 :028 &gt; a.custom_method?<br>I&#39;m a custom method<br>=&gt; nil</pre><p>Now that we’ve taught the class String some taekwondo, Let’s try to run our new method in the IRB console… Spoiler alert: It won’t work.</p><pre>( IRB )<br>2.7.0 :028 &gt; a = &quot;Taekwendo&quot;<br>2.7.0 :028 &gt; a.custom_method?<br>Traceback (most recent call last):<br>        4: from /Users/richardson/.rvm/rubies/ruby-2.7.0/bin/irb:23:in `&lt;main&gt;&#39;<br>        3: from /Users/richardson/.rvm/rubies/ruby-2.7.0/bin/irb:23:in `load&#39;<br>        2: from /Users/richardson/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/irb-1.2.1/exe/irb:11:in `&lt;top (required)&gt;&#39;<br>        1: from (irb):4<br>NoMethodError (undefined method `custom_method?&#39; for &quot;&quot;:String)</pre><p>Yes, the String class in ruby has absolutely no idea what <strong>custom_method</strong> is because we never defined it. We never overwrote the String class to teach it that method.</p><h3>Rails under the microscope</h3><p>You now understand why Ruby doesn’t necessarily have the methods defined in Rails. Or as you call it “Where Ruby ends” . I think that it will be a lot easier to understand the separation between ruby and rails method now.</p><p>Remember how I mentioned that Rails was written in Ruby? We can actually go to the Rails Github Repository and see where the <strong>.humanized</strong> method was defined in Rails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*5hslRog-5P9nbobRW2V-pQ.gif" /><figcaption><a href="https://github.com/rails/rails">https://github.com/rails/rails</a></figcaption></figure><p>mmh… Where is this bad boy? Oh! Here it is…😆</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c869f9bd7db8c9e93065ce8e4d5fb828/href">https://medium.com/media/c869f9bd7db8c9e93065ce8e4d5fb828/href</a></iframe><p>We are in the <strong>inflections.rb</strong> file. As expected Rails defines the instance method <strong>humanize</strong> by overwriting the String class. Bam! This is usually where I would say Mic drop but we’re not done yet.</p><h3>Conclusion</h3><p>If you’re still wondering how you can tell if one method is defined in Rails and Ruby. You can sometimes deduct it based on your environment. For example, if you’re just writing an application with Ruby, and you’re not loading the rails gem, then you’re definitely not going to have Rails methods in that environment. Now, if you’re within a rails application, that’s different. You will probably have the rails methods of your rails version.</p><p>You might run into scenarios where Rails is not installed but those methods are somehow defined. That could happen if someone decided to overwrite these classes within the Ruby code. At least now you’ll know what to look for.</p><p><strong>Ruby Documentation<br></strong><a href="https://www.ruby-lang.org/en/documentation/">https://www.ruby-lang.org/en/documentation/</a></p><p><strong>Rails API Documentation</strong><br><a href="https://api.rubyonrails.org/">https://api.rubyonrails.org/</a></p><p>If you were hoping for a shortcut — I’m sorry to say this but — the best way to check is by looking at the documentation. Check your current rails version and check the documentation for that rails version and check what methods are defined there. This is still the best way to investigat “Where Ruby ends and Rails begins”. And Steven, I hope this article answered your question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Qf1VEREMqOWbCpMyHQ5v5w.png" /></figure><h3>👏 Please don’t forget to clap If you enjoyed this article and found it helpful.</h3><h4>Stuff I also wrote</h4><p>I try to write often. I usually get inspired by questions from readers so don’t hesitate to reach out here or on my <a href="https://www.youtube.com/richardsondx">youtube</a>.</p><ol><li><a href="https://medium.com/how-i-learned-ruby-rails/e01cd32eee49">How to land your first Ruby on Rails job</a>. 👨‍💻</li><li><a href="https://medium.com/how-i-learned-ruby-rails/d69b89b22218">Why Googling is the most important skill a developer *must* have</a>. 🕵️‍♂️</li><li><a href="https://medium.com/how-i-learned-ruby-rails/how-i-trained-to-learn-rails-e08c94e2a51e">How I Trained to Learn Rails</a> 🥋</li><li><a href="https://medium.com/@richardsondx/everything-you-should-know-about-the-obscure-world-of-jruby-jruby-with-ruby-on-rails-c3c90d8fdeec">Everything you should know about the obscure world of JRUBY — JRuby with Rails under a Microscope</a> 🙀</li><li><a href="https://medium.com/how-i-learned-ruby-rails/how-to-get-robbed-by-insecure-practices-8a1118fe3d7f">How to get robbed by insecure practices</a></li></ol><p><em>— <br>Richardson Dackam is a Freelance </em><a href="http://www.richdx.com/"><em>Senior Ruby on Rails Developer</em></a><em> and </em><a href="http://youtube.com/richardsondx"><em>Youtuber</em></a><em> located in Toronto, Ontario, Canada. | </em><a href="https://github.com/richardsondx">https://github.com/richardsondx</a></p><p>I don’t like to put helpful resources behind a paywall… If you want to see more articles like this one without a paywall and would like to support my work, you can do so by becoming a Patreon:<a href="https://www.patreon.com/richardsondx"> Click here to support my work.</a></p><p>If you’d like to get more advice on how you can learn to code, become a software engineer and become a successful independent freelancer, Subscribe to my Youtube channel <a href="https://www.youtube.com/c/richardsondx?sub_confirmation=1">[ Click Here To Subscribe ] </a>and don’t forget to click on the bell to get notified whenever I post new videos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31e9bad84930" width="1" height="1" alt=""><hr><p><a href="https://medium.com/how-i-learned-ruby-rails/where-ruby-ends-and-rails-begins-31e9bad84930">Where Ruby ends and Rails begins</a> was originally published in <a href="https://medium.com/how-i-learned-ruby-rails">Ruby or Rails</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How not to get screwed by your client when you’re contracting]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/how-i-learned-ruby-rails/how-not-to-get-screwed-by-your-client-when-youre-contracting-21c95eef0c4a?source=rss----49bd48b52585---4"><img src="https://cdn-images-1.medium.com/max/1978/1*b3yU8bu2aTwGZuEiNuPL_w.png" width="1978"></a></p><p class="medium-feed-snippet">I got screwed by ContactMonkey.com and its founder. This is an article about how you can avoid this from happening to you.</p><p class="medium-feed-link"><a href="https://medium.com/how-i-learned-ruby-rails/how-not-to-get-screwed-by-your-client-when-youre-contracting-21c95eef0c4a?source=rss----49bd48b52585---4">Continue reading on Ruby or Rails »</a></p></div>]]></description>
            <link>https://medium.com/how-i-learned-ruby-rails/how-not-to-get-screwed-by-your-client-when-youre-contracting-21c95eef0c4a?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/21c95eef0c4a</guid>
            <category><![CDATA[contactmonkey]]></category>
            <category><![CDATA[design]]></category>
            <category><![CDATA[freelancing]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Richardson Dackam]]></dc:creator>
            <pubDate>Mon, 03 Oct 2016 18:41:23 GMT</pubDate>
            <atom:updated>2017-02-16T20:38:41.491Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to become a Full-Stack Automation Engineer]]></title>
            <link>https://richdownie.medium.com/how-to-become-a-full-stack-automation-engineer-765ee8a91b04?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/765ee8a91b04</guid>
            <dc:creator><![CDATA[Rich Downie]]></dc:creator>
            <pubDate>Sat, 03 May 2014 18:48:11 GMT</pubDate>
            <atom:updated>2015-06-04T16:02:05.699Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/825/desat/multiply/grey/60/overlay/grey/1*_ZOgH9nHu7A_vGtdrFm0JQ.png" /></figure><h4>by @richdownie</h4><blockquote><strong>** </strong><a href="http://fullstackautomationwithruby.com/installs"><strong>Automate a Browser with Selenium in 15 mins</strong></a><strong> **</strong></blockquote><blockquote><strong>Sign Up for Full Stack Sessions =&gt; </strong><a href="http://fullstackautomationwithruby.com/"><strong>Full Stack Automation with Ruby</strong></a></blockquote><h3>Prerequisites:</h3><ol><li><a href="http://git-scm.com/"><strong>GIT</strong></a><strong> / </strong><a href="https://github.com/"><strong>github</strong></a><strong> —</strong>You HAVE to know how to share code on <a href="https://github.com/">github</a>. <a href="http://git-scm.com/">GIT</a> is first on the list because writing Full-Stack Automation Code for yourself is not going to make you very much money. Check out these “How-To <a href="http://git-scm.com/videos">Screencasts</a>” &amp; <a href="https://try.github.io/levels/1/challenges/1">Try Git</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*qSaMEI_93VfRlMcK9E3cJg.png" /></figure><p>2. <strong>Programming Language</strong> — <a href="http://docs.seleniumhq.org/docs/03_webdriver.jsp">WebDriver</a> works with [ <a href="http://www.java.com/en/">Java</a>, <a href="http://msdn.microsoft.com/en-us/library/aa288436%28v=vs.71%29.aspx">C#</a>, <a href="https://www.python.org/">Python</a>, <a href="https://www.ruby-lang.org/en/">Ruby</a>, <a href="http://www.perl.org/">Perl</a>, <a href="http://www.php.net/">PHP</a>]. Pick one of these languages and learn how to work WebDriver with it. If you are a noob to programming and interested in the <a href="https://www.ruby-lang.org/en/">Ruby</a> language, I strongly suggest the <a href="http://pragprog.com/book/ltp2/learn-to-program"><strong><em>Ruby Programming Book</em></strong></a> &amp; <a href="https://www.codeschool.com/courses/try-ruby">Try Ruby</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*S7aWwfIOINQyY69JsmR7_A.png" /></figure><p>3. <strong>Web Development Framework</strong> — <strong>Learn</strong> <strong>all the layers [ </strong><a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller"><strong>Model, View, Controller</strong></a><strong> ].</strong> A good<strong><em> </em></strong><a href="https://twitter.com/jwhitmire">friend</a> of mine showed me this <a href="https://www.youtube.com/watch?v=Gzj723LkRJY">video</a> on January 19th, 2006 in a conference room and I decided right then and there that I was going to teach myself <a href="http://rubyonrails.org/"><strong><em>rubyonrails</em></strong></a>. Learning <a href="http://rubyonrails.org/"><strong><em>Rails</em></strong></a> was convenient for me because of all the <a href="http://railscasts.com/">screencasts</a> I found on the internet that I would watch <em>over and over</em> at night and on weekends. I’m not saying you have to learn <a href="http://rubyonrails.org/"><strong><em>Rails</em></strong></a>. There are a <a href="http://lmgtfy.com/?q=Open+Source+Web+Application+Frameworks">ton of open-source frameworks out there</a>. You just need to know the common (<a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">MVC</a>) layers that make up these frameworks. It is kind of hard to be a Full-Stack Automation Engineer without knowing what’s in the Full-Stack. <em>Here is a quick (3min) </em><a href="http://blackboxd.com/posts/6"><strong><em>DEMO</em></strong></a><em> on some of the basics of MVC automated testing.</em></p><p>4. <a href="http://en.wikipedia.org/wiki/SQL"><strong>SQL</strong></a> — A Full-Stack Automation Engineer <strong><em>has</em></strong> to know how to speak database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-M5e0IoHko_TLF52DbajQ.png" /></figure><p>Period.</p><h3>Get GREAT at:</h3><p><a href="http://docs.seleniumhq.org/projects/webdriver/"><strong>WebDriver</strong></a><strong> — </strong>This is THE tool that drives the browser(s). I prefer the <strong><em>Ruby</em></strong> bindings version, <a href="http://rubygems.org/gems/selenium-webdriver"><strong>selenium-webdriver</strong></a><strong>.</strong></p><blockquote><strong><em>** </em></strong><a href="http://fullstackautomationwithruby.com/installs"><strong><em>Automate a Browser with Selenium in 15 mins</em></strong></a><strong><em> **</em></strong></blockquote><p><a href="http://www.ee.surrey.ac.uk/Teaching/Unix/"><strong>Unix</strong></a><strong> </strong>— <a href="http://mally.stanford.edu/~sr/computing/basic-unix.html">ls, cd(change directory</a>), <a href="http://en.wikipedia.org/wiki/Grep">grep</a> and <a href="https://help.ubuntu.com/community/CronHowto">crontab</a> are biggies. (Windows users may want to try <a href="http://www.cygwin.com/">Cyqwin</a>)</p><p><a href="http://en.wikipedia.org/wiki/Text_editor"><strong>TextEditor</strong></a> — Pick one and get comfortable editing code with it. I use <a href="http://macromates.com/">TextMate</a> but you can use <a href="http://www.vim.org/about.php">Vim</a>, <a href="https://atom.io/">Atom</a>, or <a href="http://www.jetbrains.com/ruby/">RubyMine</a> to name a few.</p><p><a href="http://www.w3schools.com/html/DEFAULT.asp"><strong>HTML</strong></a><strong> &amp; </strong><a href="http://cms.about.com/od/cms-basics/a/Get-The-Inspect-Element-Tool-For-Your-Browser.htm"><strong>DOM Inspector</strong></a><strong> — </strong>Install the DOM Inspector or whatever it’s called in your favorite browser, right-click, select Inspect Element and learn all that <a href="http://en.wikipedia.org/wiki/HTML">html</a> at the bottom of the browser.</p><p><a href="https://saucelabs.com/home"><strong>SauceLabs</strong></a><strong> — </strong>Once you know how to automate a single browser with <a href="http://docs.seleniumhq.org/docs/03_webdriver.jsp">WebDriver</a> you can easily scale your tests with <a href="https://saucelabs.com/home">SauceLabs</a> by running your test suite against all these <a href="https://saucelabs.com/platforms">Device/OS/Browser Platforms</a>.</p><p><a href="http://martinfowler.com/bliki/PageObject.html"><strong>PAGE OBJECTS, PAGE OBJECTS, PAGE OBJECTS</strong></a></p><h3>Get GOOD at:</h3><p><strong>Google </strong>— I sometimes kid and tell people I have a degree in ‘Google+<a href="http://stackoverflow.com/">Stackoverflow</a>’. Seriously, whenever you come across an Exception Error or ‘<em>code</em>-block’— <a href="http://lmgtfy.com/?q=Error+Message+%3D%3E+%27Unable+to+find+element+with+xpath"><strong><em>GOOGLE IT</em></strong></a><strong><em>. </em></strong>Someone most likely will have asked the same question in a forum somewhere on the internet. Just scroll down and look at the answers. If you can’t find an answer to your problem, POST a question to the forum yourself. You need to have thick-skin to become a Full-Stack Automation Engineer and ask a lot of not-so-smart questions on the internet.</p><p><a href="https://rvm.io/"><strong>RVM</strong></a><strong> </strong>(Ruby Programmers) — A command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.<em>(This really falls between Get GREAT at: and Get GOOD at: for any rubyist) </em><a href="http://rbenv.org/">rbenv</a> is another <a href="http://rosspenman.com/ruby-osx/">option</a>.</p><p><a href="http://www.w3schools.com/css/DEFAULT.asp"><strong>CSS</strong></a><strong>, </strong><a href="http://www.w3schools.com/js/DEFAULT.asp"><strong>Javascript</strong></a><strong> — </strong>Gain a general understanding of how these languages work in the View layer. You don’t have to be an expert but the better you are at them the better you are at writing full-stack automated tests.</p><p><strong>Project Management Tools </strong>— Software requirement tracking is difficult but these products tend to be pretty good at it. [ <a href="http://www.pivotaltracker.com/">PivotalTracker</a>, <a href="https://www.atlassian.com/software/jira">Jira</a>, <a href="http://www.tinypm.com/">tinyPM</a> ]. You will usually find out what needs to be automated from Project Managers, Developers and QAs with these online resources.</p><p><a href="http://rake.rubyforge.org/"><strong>Rake</strong></a><strong> </strong>(Ruby Programmers) — use rake for multithreading browser builds and then donate to the <a href="https://jim.neo.com/">Jim Weirich Fund</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*TMUaHNysagy2lMlB-mLR8A.jpeg" /></figure><p><strong><em>It gets very interesting when you learn how to automate </em></strong><a href="https://help.ubuntu.com/community/CronHowto"><strong><em>crontab</em></strong></a><strong><em> (+) </em></strong><a href="http://rake.rubyforge.org/"><strong><em>Rake</em></strong></a><strong><em> (+) </em></strong><a href="https://rubygems.org/gems/net-ssh"><strong><em>net-ssh</em></strong></a><strong><em> (+) </em></strong><a href="http://www.ruby-doc.org/core-2.1.1/IO.html"><strong><em>Ruby IO</em></strong></a><strong><em> (+) </em></strong><a href="http://rubygems.org/gems/gmail"><strong><em>Email</em></strong></a><strong><em> &amp; </em></strong><a href="http://rubygems.org/gems/hipchat"><strong><em>Chat Room</em></strong></a><strong><em> notifications (x)’s </em></strong><a href="https://saucelabs.com/home"><strong><em>Saucelabs</em></strong></a><strong><em>…</em></strong></p><p>(<strong><em>Enter Robots</em></strong>)</p><p><a href="http://en.wikipedia.org/wiki/Secure_Shell"><strong>SSH</strong></a><strong> </strong>— You’re going to need to be able to grep cloud server logs and query data from the databases up there.</p><p><a href="http://en.wikipedia.org/wiki/Load_testing#Software_load_testing"><strong>Load Testing</strong></a><strong> </strong>— I’m a big fan of <a href="https://github.com/flood-io/ruby-jmeter">ruby-jmeter with flood.io</a>. ~ <a href="http://blackboxd.com/posts/7"><strong>WATCH MY DEMO</strong></a><strong> !!</strong>!</p><p><a href="https://rubygems.org/gems/httparty"><strong>HTTParty</strong></a><strong> — M</strong>akes http fun again! <a href="http://www.w3schools.com/tags/ref_httpmethods.asp">GET</a> your <a href="http://www.json.org/">JS-ON</a>!</p><p><a href="https://www.heroku.com/"><strong>Heroku</strong></a><strong> </strong>— Signup and learn how to deploy your Web Framework. <a href="https://devcenter.heroku.com/articles/getting-started-with-rails4">Here’s how it’s done with Rails</a>.</p><h3>Get Out There!</h3><p><strong>Attend Conferences</strong>: It is very important to network with real live people and not just user_names in chat rooms. If your company won’t send you to a conference you think you should be at — invest in yourself — Take the PTO and go anyway. I do this a lot.</p><ul><li>Here are a few of my favorites <a href="https://developers.google.com/google-test-automation-conference/">GTAC</a>, <a href="https://twitter.com/seleniumconf">seleniumconf</a> and <a href="https://twitter.com/rubyconf">rubyconf</a>.</li></ul><p><strong>Give Talks</strong>: I am by no means a public speaker. However, I’ve forced myself to do it and kinda look forward to it these days. I recenlty shared talks at <a href="http://www.meetup.com/NYCSelenium/events/147108752/"><strong>NYC Selenium Users Meetup</strong></a>, <a href="http://barcamproc.org/"><strong>barcamproc</strong></a> and <a href="http://barcampbuffalo.org/"><strong>barcampbuffalo</strong></a>. This practice will boost your confidence tremendously and force you to learn all the little details.</p><blockquote>“Know your Craft.” — Quincy Jones</blockquote><p><strong>Blog/Tweet</strong>: Make a screencast of some of your automation bits and share it with the internet. Don’t forget to include #automated #testing #buzzwords and #hashtags. Believe me, your peers from around the world will find you. Go buy <a href="http://garyvaynerchuk.com/jjjrh/">Jab Jab Jab Right Hook</a> by <a href="https://twitter.com/garyvee">@garyvee</a> and <em>really</em> understand how social media works!</p><p><strong>Join the local tech </strong><a href="http://www.meetup.com/"><strong>meetups</strong></a>: Find people near you who are like you and excited about tech. They don’t have to be Full-Stack Automation Engineers, but there is a good chance one of them is looking for one.</p><p><a href="http://www.irchelp.org/"><strong>IRC</strong></a><strong> — </strong>join the virtual discussions. I’m currently using the <a href="http://colloquy.info/">collolquy</a> client to connect with the selenium and cucumber channels. I don’t say too much there but the open-source people that built the tools I use are in there talking to each other. Pay attention!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*WSSG8gMLBvq6YLgyFkUwxg.png" /></figure><h3><strong>Book Suggestions:</strong></h3><p><a href="http://fullstackautomationwithruby.com/"><strong><em>Full Stack Automation with Ruby</em></strong></a><strong><em> by (me) </em></strong><a href="https://twitter.com/richdownie"><strong><em>@richdownie</em></strong></a></p><p><a href="http://davehaeffner.com/selenium-guidebook/"><em>Selenium Guidbook</em></a><em> by </em><a href="https://twitter.com/TourDeDave"><em>@TourDeDave</em></a></p><p><a href="https://leanpub.com/cucumber_and_cheese"><em>Cucumber and Cheese</em></a> by <a href="https://twitter.com/chzy">@chzy</a></p><p><a href="https://leanpub.com/selenium_recipes"><em>Selenium Recipes</em></a> by <a href="https://leanpub.com/u/zhiminzhan">Zhimin Zhan</a></p><p><a href="http://pragprog.com/book/cfcar2/the-passionate-programmer"><em>Passionate Programmer</em></a><em> by </em><a href="https://twitter.com/chadfowler"><em>@chadfowler</em></a></p><p><a href="http://pragprog.com/book/ruby4/programming-ruby-1-9-2-0"><em>Programming Ruby</em></a><em> by </em><a href="https://twitter.com/pragdave"><em>@pragdave</em></a><em> with </em><a href="https://twitter.com/chadfowler"><em>@chadfowler</em></a><em> &amp; </em><a href="https://twitter.com/PragmaticAndy"><em>@PragmaticAndy</em></a></p><p><a href="http://pragprog.com/book/rails4/agile-web-development-with-rails-4"><em>Agile Web Development with Rails</em></a><em> by </em><a href="https://twitter.com/dhh"><em>@dhh</em></a><em> &amp; </em><a href="https://twitter.com/pragdave"><em>@pragdave</em></a></p><p><a href="http://www.amazon.com/Jab-Right-Hook-Story-Noisy/dp/006227306X/ref=sr_1_2?s=books&amp;ie=UTF8&amp;qid=1361285675&amp;sr=1-2&amp;keywords=jab+jab+jab"><em>Jab Jab Jab Right Hook</em></a><em> by </em><a href="https://twitter.com/garyvee"><em>@garyvee</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=765ee8a91b04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Logic Behind Logical Operators]]></title>
            <link>https://medium.com/@dis_is_patrick/the-logic-behind-logical-operators-13d8b3e29d23?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/13d8b3e29d23</guid>
            <dc:creator><![CDATA[Pat Whitrock]]></dc:creator>
            <pubDate>Wed, 12 Feb 2014 18:18:05 GMT</pubDate>
            <atom:updated>2014-06-06T21:14:32.314Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sGFzyz_1YfXGZaHp3uSW-A.jpeg" /></figure><h4>Using “&amp;&amp;”, “||”, “and”, and “or”</h4><p>One of the most compelling aspects of the Ruby language is the sweetness of its syntactic sugar. This made the almost ubiquitous use of the <em>&amp;&amp;</em> and <em>||</em> operators over their semantically pleasing counterparts <em>and</em> and <em>or</em> all the more surprising to me. It turns out the two sets of operators are actually different in a meaningful way.</p><h4>So what’s the difference?</h4><p><strong>Precedence</strong>. Huh? Precedence is the same as <strong>Order of Operations</strong>. Remember <strong>PEMDAS</strong> from grade school? It’s that acronym for <strong>P</strong>arentheses, <strong>E</strong>xponents, <strong>M</strong>ultiplication, <strong>D</strong>ivision, <strong>A</strong>ddition, <strong>S</strong>ubtraction. The operators at the beginning of <strong>PEMDAS</strong> (parentheses) are considered first, then the next (exponents), and so on. Operator precedence in Ruby and other programming languages works the same way — there are just more operators. Got it? Got it. Moving on…</p><p><em>&amp;&amp;</em> and <em>||</em> have a higher precedence than <em>and</em> and <em>or</em>. This means Ruby will consider them first. Seems kind of harmless as long as we’re not mixing the two sets of operators (e.g. using <em>&amp;&amp;</em> and <em>or</em>) in the same expression, but the real problem doesn’t lie at either of these levels of precedence. The troublesome area is the space between.</p><p>Assignment operators fall below <em>&amp;&amp;</em> and <em>||</em>, but above <em>and</em> and <em>or</em>. This starts to cause all sorts of problems when we use the latter because expressions stop behaving the way we assume they should.</p><pre>value = false || true         <em> # (value) = (false || true)</em><br>  =&gt; true<br>value<br>  =&gt; true<br><br>value = false or true         <em> # (value = false) or (true)</em><br>  =&gt; true<br>value<br>  =&gt; false</pre><p>Let’s say we want to compare two values and assign their return value to a variable. The first set of operations occurs how we expect. The expression <em>false || true</em> returns <em>true</em>. Then <em>true</em> is assigned to <em>value</em>. The second set of operations looks like it should do the same, but it doesn’t. The <em>=</em> assignment operator has the highest precedence, so <em>false</em> is assigned to <em>value</em>. Then <em>value</em> is compared to <em>true</em> via the <em>or</em> operator. This returns true, but <em>value</em> returns <em>false</em>, which wasn’t our intention.</p><pre>value = true &amp;&amp; false          <em># (value) = (true &amp;&amp; false)</em><br>  =&gt; false<br>value<br>  =&gt; false<br><br>value = true and false         <em># (value = true) and (false)</em><br>  =&gt; false<br>value<br>  =&gt; true</pre><p>We encounter the same problem with the code above.</p><p>There’s another key difference between these two sets of operators. <em>&amp;&amp;</em> is actually one level of precedence higher than <em>||</em>, whereas <em>and</em> and <em>or</em> share their level of precedence. I assume this is the case because of the assumption that we are more likely to compare chains of <em>&amp;&amp;</em> expressions with the <em>||</em> operator than vice versa because the former has more practical implementations. <em>and</em> and <em>or</em> have identical precedence, so their expressions are executed in the order in which they occur, which is rarely our intention.</p><h4>Cool, I get how it works. Now I can use <em>and</em> and <em>or</em>, right?</h4><p>Wrong. Why would you do that to yourself? Because it’s prettier? Unless you’re writing specific types of expressions, you’ll have to resort to using unnecessary parentheses. Gross.</p><p>Because you just read this awesome blog post and now you know how they work? Well, did everyone you know read this blog post? I didn’t think so. Even if you know your code does one thing, your collaborators will probably assume it does something else.</p><h4>TL;DR</h4><ol><li><em>&amp;&amp;</em> and <em>||</em> have a higher precedence than <em>and</em> and <em>or</em>.</li><li>Assignment operators, like <em>=</em>, have a lower precedence than <em>&amp;&amp; </em>and <em>|| (</em>good), but higher than <em>and </em>and <em>or (</em>bad).</li><li><em>&amp;&amp; </em>has higher precedence than <em>|| (</em>good). <em>and </em>and <em>or </em>have the same (bad).</li><li>Using <em>&amp;&amp; </em>and <em>|| </em>is the convention for a reason. Don’t be that guy.</li><li>If you get confused, just use parentheses. Parentheses are your friends. Make it work now. Refactor later.</li></ol><p>This post is originally from my <a href="http://pat-whitrock.github.io/">technical blog</a>. You can find the original post <a href="http://pat-whitrock.github.io/blog/2014/02/13/the-logic-behind-logical-operators/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13d8b3e29d23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB Relations]]></title>
            <link>https://medium.com/@dis_is_patrick/mongodb-relations-26201385b919?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/26201385b919</guid>
            <dc:creator><![CDATA[Pat Whitrock]]></dc:creator>
            <pubDate>Wed, 07 May 2014 20:58:11 GMT</pubDate>
            <atom:updated>2014-06-06T21:08:19.638Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ml2CaYENKRj4ThrLKDYoIA.png" /></figure><h4>Embedding and referencing docucments</h4><p>Mongo’s relations are the NoSQL equivalent of associations found in relational databases. While serving a similar purpose and appearing similar in implementation, they do behave differently.</p><h3>NoSQL relations vs RDBMS associations</h3><p>Relations associate data from one model with data from another model. On a high level, this is precisely what RDBMS associations are for. However, the way in which data is associated in NoSQL is quite different.</p><p>In traditional relational databases, associations are used to relate data from one table to another. MongoDB and similar NoSQL databases are document-oriented (there are no tables), so relationships are drawn between document-objects instead.</p><p><strong>ActiveRecord</strong></p><pre>class Post &lt; ActiveRecord::Base<br>  belongs_to :author<br>  has_many :comments<br>end</pre><p><strong>Mongoid (referencing)</strong></p><pre>class Post<br>  include Mongoid::Document<br>  belongs_to :author<br>  has_many :comments<br>end</pre><p><strong>Mongoid (embedding)</strong></p><pre>class Post<br>  include Mongoid::Document<br>  embedded_in :author<br>  embeds_many :comments<br>end</pre><p>All of the classes above implement basic one-to-many relationships in which an author has many posts and a post has many comments. One could say that <em>embedded_in </em>and <em>embeds_many </em>are the equivalent of <em>belongs_to</em> and <em>has_many</em>, but this would be an oversimplification.</p><h4><strong>ActiveRecord</strong></h4><p>Relational databases handle associations through the use of foreign keys referencing a unique row in another table. For example, a <em>post</em> would have an <em>author_id </em>referencing the ID of the record in the a<em>uthors</em> table to which it belongs. If an <em>author</em> has multiple <em>posts</em>, multiple <em>post</em> records would have the same <em>author_id</em>. <em>Authors</em> do not have <em>post_ids</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*N--OFHhEC155ulYfHhPQGQ.png" /><figcaption>Relational database schema</figcaption></figure><h4><strong>Mongoid References</strong></h4><p>One way NoSQL databases handle one to many relationships is through references. Referencing is more similar to associations in relational databases than embedding (the pattern we will discuss next). References also utilize foreign keys, however they point from one document to another, rather than a record in one table to a record in another table.</p><pre><em>// An author document.</em><br>{<br>  &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e9&quot;),<br>  &quot;name&quot; : &quot;Pat Whitrock&quot;<br>}<br><br><em>// A post document.</em><br>{<br>  &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e0&quot;),<br>  &quot;author_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e9&quot;),<br>  &quot;name&quot; : &quot;Mongo Stuff&quot;<br>}<br><br><em>// A comment document.<br></em>{<br>  &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e8&quot;),<br>  &quot;post_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e0&quot;),<br>  &quot;content&quot; : &quot;Lots of stuff about Mongo.&quot;<br>}</pre><h4><strong>Mongoid Embeds</strong></h4><p>Another way NoSQL databases handle this sort of one to many relationship is through embedding documents. One document is embedded within another, resulting in what is basically a giant hash. For example, the <em>author</em> document would embed many <em>post</em> documents and each <em>post </em>document would embed many <em>comment</em> documents. Each <em>author</em> document is a hash containing an array of <em>post</em> documents, each containing an array of <em>comment</em> documents.</p><pre><em>// An author document.</em><br>{<br>  &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e9&quot;),<br>  &quot;name&quot; : &quot;Pat Whitrock&quot;,<br>  &quot;posts&quot; : [<br>    // <em>An embedded post document.</em><br>    {<br>      &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e0&quot;),<br>      &quot;name&quot; : &quot;Mongo Stuff&quot;,<br>      &quot;comments&quot; : [<br>        // <em>An embedded comment document.</em><br>        {<br>          &quot;_id&quot; : ObjectId(&quot;4d3ed089fb60ab534684b7e8&quot;),<br>          &quot;content&quot; : &quot;Lots of stuff about Mongo.&quot;<br>        }<br>      ]<br>    }<br>  ]<br>}</pre><h4>Embedding vs Referencing</h4><p>Why is it necessary for Mongo to have multiple ways of defining the same one to many relationship when ORMs like ActiveRecord require only one? Both embedding and referencing are valid options, but each caters more to specific use cases. There are a few things to consider before deciding.</p><p>Will your data be referred to from multiple locations? If you need to access your data from multiple locations, you’re probably better off using references. If your data is only useful in relation to its parent document, embedding is the way to go.</p><p>Also important to consider are data consistency and document size. MongoDB documents can are limited to a maximum size of 4MB, however it’s unlikely that this is a problem you would encounter early on.</p><p>This post is originally from my <a href="http://pat-whitrock.github.io/">technical blog</a>. You can find the original post <a href="http://pat-whitrock.github.io/blog/2014/05/07/mongodb-relations/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26201385b919" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Security Basics]]></title>
            <link>https://medium.com/@davidhunt/web-security-basics-3b0f942f8601?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/3b0f942f8601</guid>
            <dc:creator><![CDATA[David Hunt]]></dc:creator>
            <pubDate>Thu, 08 May 2014 16:23:44 GMT</pubDate>
            <atom:updated>2014-05-19T11:23:00.544Z</atom:updated>
            <content:encoded><![CDATA[<h4>My reflections on a talk by Andy Lindeman of GitHub.</h4><blockquote>“Web security is some science and some art.”<br>- Andy Lindeman, GitHub</blockquote><p>Today we were lucky enough to have Andy join us for a guest talk on making our rails applications more secure. If you’d like to skip my reflections and just read his presentation, see below. Or if you need something more interactive, you can <a href="https://soundcloud.com/david-hunt-27/github-web-security-talk">listen to the audio version</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fspeakerdeck.com%2Fplayer%2Fc6410310b8f40131e4494251e58a135f&amp;url=https%3A%2F%2Fspeakerdeck.com%2Falindeman%2Fweb-security-basics-in-rails&amp;image=https%3A%2F%2Fspeakerd.s3.amazonaws.com%2Fpresentations%2Fc6410310b8f40131e4494251e58a135f%2Fslide_0.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=speakerdeck" width="710" height="463" frameborder="0" scrolling="no"><a href="https://medium.com/media/813e34202617fe3dc3d5b8a8c655b1b3/href">https://medium.com/media/813e34202617fe3dc3d5b8a8c655b1b3/href</a></iframe><h4>Users</h4><p>It’s probably safe to say that 99% of our web applications require some form of user authentication or user input. That makes cross site scripting a real vulnerability. Through rails 2, a user would have been able to input javascript which once rendered would run on the page. In rails 3 though, the necessary &lt; and &gt; tags are rendered as <em>&amp;lt;</em> and <em>&amp;gt;</em> respectively. Of course, this requires that we <strong>avoid</strong> using helpers like <em>raw</em>, and in fact, we should <strong>never</strong> render user input directly as HTML.</p><h4>SQL Injection</h4><p>On the subject of <a href="http://en.wikipedia.org/wiki/SQL_injection">sql injection</a>, here are a couple of things to avoid and what to do instead.</p><h4>Avoid</h4><pre>class Post &lt; ActiveRecord::Base<br>  def self.search(term)<br>    where(&quot;title LIKE \&quot;%#{term}%\&quot;&quot;)<br>   end<br>end</pre><h4>Better</h4><pre>class Post &lt; ActiveRecord::Base<br>  def self.search(term)<br>    where(&quot;title LIKE :title&quot;, title: &quot;%#{term}%&quot;)<br>  end<br>end</pre><p>The better comes from avoiding the passing of user input directly as SQL. We do this as an attempt to prevent the user from submitting additional sql queries to execute after the initial query.</p><h4>Avoid</h4><pre>class PasswordResetsController &lt; ApplicationController<br>  def reset<br>    if user = User.find_by_token(params[:token])<br>      user.password = params[:password]<br>      user.save<br>    else<br>      render status: 404<br>    end<br>  end<br>end</pre><h4>Better</h4><pre>class PasswordResetsController &lt; ApplicationController<br>  def reset<br>    if params[:token].present? &amp;&amp; user = User.find_by_token(params[:token].to_s)<br>      user.password = params[:password]<br>      user.save<br>    else<br>      render status: 404<br>    end<br>  end<br>end</pre><p>To prevent against unwanted returns in our <em>user.find,</em> we’re ensuring that the user has a :<em>token</em> and that :<em>token</em> is only being passed as a <strong>string</strong>. Otherwise, :<em>tokens</em> like <strong>0</strong> or <strong>nil</strong> could return sensitive data.</p><h4>Loose Ends</h4><p>Finally, let’s acknowledge important upgrades in rails security. We’re now utilizing built in <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery">CSRF attack</a> mitigation with <em>protect_from_forgery with: :exception</em> which adds the <em>authenticity_token </em>(a randomly generated string) to all of our form requests. To protect against <a href="http://en.wikipedia.org/wiki/Mass_assignment_vulnerability">mass assignment</a>, rails now offers the feature of <em>white listing</em>. We’re able to specify <strong>exactly</strong> which parameters to allow, like shown below.</p><pre># bottom of our controller</pre><pre>  private</pre><pre>  def user_params<br>    params.require(:user).permit(:email, :password, :name, :age)<br>  end</pre><h4>Bonus</h4><p>Check out the bible of <a href="http://www.amazon.com/The-Web-Application-Hackers-Handbook/dp/1118026470">web application security</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b0f942f8601" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dissecting Rails monolith. Basics.]]></title>
            <link>https://medium.com/@andriytyurnikov/dissecting-rails-monolith-basics-cc0734934b21?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc0734934b21</guid>
            <dc:creator><![CDATA[Andriy Tyurnikov]]></dc:creator>
            <pubDate>Tue, 27 May 2014 13:50:41 GMT</pubDate>
            <atom:updated>2014-09-14T16:30:27.783Z</atom:updated>
            <content:encoded><![CDATA[<h4>How and why one may refactor rails app into pack of rails engines</h4><blockquote><strong>TL;DR:</strong> Why? Reveal dependencies. Make technical debt manageable. Save your cognitive budget by having smaller context. How? Extract stylesheets, then migrations and models as core engine, put controller namespaces into separate engines, and move common controller stuff to the core. Then extract gems/engines as you go.</blockquote><h4>Intro</h4><p>While Lines Of Code(LOC) is quite controversial measure, most controversy is about using it for productivity measurement, it is not that bad for other things, so I’ll go with it.</p><p>I’ve seen few legacy apps out there — and every app becomes legacy app sooner or later. Sure every app is different in many aspects: used tools and versions of those, presence and depth of tests, app/lib balance — some apps are like icebergs: simple web UI and tons of backend machinery to interact with multiple 3rd party services.</p><blockquote>But almost always, somewhere in between 10000-15000 LOC things start getting messy.</blockquote><h4><strong>Technical debt</strong></h4><p>If you are lucky/good then technical debt, that you have at this point (10-15 KLOC), is manageable, if not — you have to stop active development, invest resources into refactoring or default on technical debt (stop or kill the project).</p><p>Technical debt itself is big topic, so let’s go to conclusions right away:</p><blockquote>Technical debt is always there — no matter how good you are</blockquote><blockquote>Size of technical debt is not actually known — this is why it is hard to manage</blockquote><blockquote>Splitting your app into somewhat isolated parts allows you to see <strong>big</strong> problems before they become <strong>very big</strong> problems — simple risk management</blockquote><h4>Dependencies and modularity</h4><p>Software modularity is another important topic, and this topic is <em>really </em>opinionated, I guess few books are written about it, but we don’t need to dive that deep.</p><p>Regardless of your opinion on how good modularity is, and how one should achieve it, one thing is certain:</p><blockquote>Explicit, visible dependency is much better than implicit, hidden one. Revealing dependencies is a first step for managing them in any way.</blockquote><h4>Namespaces won’t save you</h4><p>Controller namespaces are good start. We all had <strong>‘/admin’</strong> namespace in our apps, right? In fact somewhere in between 1000-2000 LOC I was pretty confident that controller namespaces is all I need to keep parts of my app isolated. But after reaching 2000 LOC I’ve noticed that controller namespace don’t affect business logic layer, so I’ve decided give engines a try.</p><h3>Choice criteria</h3><p>I guess you have your opinion about how good is separation/modularity of your app. You see, once your app is split, merging it back into single piece is no-brainer, right? Well, let me challenge you:</p><blockquote>If you may split your 5000+ LOC app into engines within <strong>1</strong> day and be happy about it, then I guess you are OK already, you got your modularity somehow (and you should write a post or two about it, really)</blockquote><p>I failed to meet this criteria, and this post is for those who failed it too</p><h4><strong>Failure scenario — database is big</strong></h4><p>I had 3 controller namespaces already, and expected fast app split, well, surprise — database is bigger dependency than one might think. Ben Smith <a href="http://pivotallabs.com/leave-your-migrations-in-your-rails-engines/">covered</a> that for us in his bright post about how to extract migrations into engines, when you have multiple engines in development</p><h4><strong>Failure scenario — split may go wrong</strong></h4><p>I’ve seen “app” that was split into 8(!) “services” with enormous code duplication in front-end and backend. One should split and merge wisely to avoid such case. Technical debt is in many ways a collection of wrong decisions, and once technical debt reached critical mass, it becomes obvious that it will never be repaid.</p><h4>Success scenario</h4><p>Our goal is to split original app into pieces, as a result of that split, initial app, will be almost nothing, but a container for our engines:</p><p>This is our final Gemfile:</p><pre>source ‘<a href="https://rubygems.org'/">https://rubygems.org&#39;</a></pre><pre># For now just use local gems with engines in ./gems directory<br>gem ‘project_style’, path: ‘gems/project_style’<br>gem ‘project_core’, path: ‘gems/project_core’<br>gem ‘project_store’, path: ‘gems/project_store’<br>gem ‘project_theme_store’, path: ‘gems/project_theme_store’</pre><p>And this is our config/routes.rb file:</p><pre>Rails.application.routes.draw do</pre><pre>  mount ProjectStyle::Engine =&gt; “/style”</pre><pre>  constraints(ThemeStoreSubdomainConstraint) do<br>    mount ProjectThemeStore::Engine =&gt; “/”<br>  end</pre><pre>  constraints(StoreSubdomainConstraint) do<br>    mount ProjectStore::Engine =&gt; “/”<br>  end<br> <br>end</pre><ol><li>extract <strong>project_style</strong> engine for all your CSS/SASS/LESS, and style images</li><li>extract <strong>project_core</strong> engine with all migrations and model classes and model tests — read this guys, about how to do it <a href="http://pivotallabs.com/leave-your-migrations-in-your-rails-engines/">http://pivotallabs.com/leave-your-migrations-in-your-rails-engines/</a></li><li>be sure that all shared 3rd party gems are listed at gemspec dependencies of <strong>project_core (</strong>carrierwave, caminari, devise, inherited_resources, etc<strong>)</strong></li><li>extract common controller concerns to the <strong>project_core</strong></li><li>extract all controller namespaces as separate engines</li><li>extracts gems from your lib, and include them in <strong>project_core/some_engine</strong></li></ol><blockquote>This is it — you’ve just set solid foundation for app de-coupling.</blockquote><h4>To be continued</h4><p>As you see, I don’t talk about:</p><ol><li>using Message Queues or REST for communication between apps</li><li>dealing with shared tests &amp; factories</li><li>managing release cycle or repository structure</li><li>dependency graph of engines, common mistakes</li></ol><p>All those topics are interesting and big, and should be covered one by one. Stay tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc0734934b21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Successful Software Development Using The Hot Dog Stand Method]]></title>
            <link>https://medium.com/@sebastianmaier_/successful-software-development-using-the-hot-dog-stand-method-ec3547ae7ce7?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/ec3547ae7ce7</guid>
            <dc:creator><![CDATA[Sebastian Maier]]></dc:creator>
            <pubDate>Tue, 27 May 2014 11:05:15 GMT</pubDate>
            <atom:updated>2024-06-28T08:05:50.929Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tbp07lm759ubjacSQ5WG3Q.png" /></figure><h4>Develop software like you would manage a hot dog stand — it will save you time, money and stress!</h4><p>I am probably not the one who invented this type of software development, I am just trying to make this more accessible for non-developers. I’m surprised by how few people seem to know about this method. I think that especially clients of developers should know more about it, because it saves them time and money.</p><h4><strong>What are you even talking about?</strong></h4><p>Imagine yourself as someone wanting to open a hot dog stand. First you would need to have a certain amount of buns, sausages and something to heat them up — onions, relish, ketchup and everything else can be left aside at this point. As long as you sell a bun with a sausage it’s a hot dog right? Probably not one that people will line up for yet and maybe quite dry — but it can be called a hot dog.</p><p>That’s exactly how I start out when I develop software. At first I focus on the main feature(s) — in case of our hot dog stand, that would be the sausages and the buns. Everything else isn’t important at this point, even if you might worry that you wouldn’t be able to “sell” it like this.</p><p>We heavily relied on this method while developing a Content-Management-System software. In our case, the core value we wanted to achieve was for designers to be able to build creative websites for multiple customers without any technical restrictions on the design itself and an easy-to-use backend. These were a lot of requirements to accomplish at once, so we tried to break that down to the minimum requirements. Which were:</p><ul><li>being able to create one new site ,</li><li>adding multiple templates built with plain html, css and js with no need for a script language</li><li>and finally to create pages based on these templates.</li></ul><p>At that time there was no need for folders, authorization, SEO features or whatever we added later. After a very short period of time we could launch our first websites with this new piece of software and learn how to improve it.</p><blockquote>During the whole process of development I only focus on one central feature or a small set of features.</blockquote><h4><strong>The perks of this method</strong></h4><ul><li>Users can try out the software earlier. This means you get feedback faster, which helps to make sure you develop for actual user needs.</li><li>You won’t lose time developing features that people might have no use for, that’s also good for your wallet.</li><li>A limited range of features also limits the risk to miscalculate your estimated costs and most of the time it makes your product easier to understand and to use.</li><li>If you are able to focus on one or just a few features and make sure they run smoothly, this will result in a better product.</li></ul><p>More features will follow later, but based rather on clearly stated needs of the users, than just based on assumptions. In the same way that we would of course later serve certain sauces and garnishes with our hot dog.</p><h4><strong>A tip for developing additional features</strong></h4><p>I will later develop only those features that a critical group of users demand. No one would start serving sweet mustard just because one customer asks for it, right? Trying to please everyone only leads to software being packed with too many features. In the end that’s always bad for your usability and the one who has to pay the price would be the user. You don’t want that.</p><p>I further enhanced this method over the years and this is know one of my concepts to create new product ideas as an MVP — minimal viable product.</p><p>If you want to read more about this method and my other more business related methods, you can find them here:</p><ul><li>(German) <a href="https://www.perplexity.ai/page/HotDogMethode-fr-Produktentwickl-qRkx04vjSR.lkibDHussaw">Die Hot-Dog-Stand-Methode für MVPs</a></li><li>(German) <a href="https://www.sebastianmaier.co/blog/die-spark-methode/">Die SPARK-Methode</a></li></ul><p>I would love to hear about your experiences — thanks for sharing!</p><p><em>Do you want to check out our “hotdog stand” yourself?</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec3547ae7ce7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git for Non-Programmers]]></title>
            <link>https://medium.com/@dis_is_patrick/git-for-non-programmers-49c85d3f647d?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/49c85d3f647d</guid>
            <dc:creator><![CDATA[Pat Whitrock]]></dc:creator>
            <pubDate>Fri, 28 Feb 2014 06:04:15 GMT</pubDate>
            <atom:updated>2014-06-06T21:13:37.308Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hp153k1BTY2RejFya8a_Vg.jpeg" /></figure><h4>Version control your life</h4><p>Git is an amazing tool for collaboration and version control, but its merits are largely unknown to the general public. Over the past few years, amazing collaborative tools (e.g. Google Drive) have become popular for word processing, spreadsheets and other common needs for the average person. However, these tools don’t offer sophisticated version control — they are limited to moving linearly backwards and forwards a certain number of steps.</p><p>This limits our ability to create different versions of the same document to test different approaches to a problem or work on the same content at the same time without stepping on each other’s feet or creating entirely new files. Any non-developer who has worked in a normal office setting has probably encountered a project that quickly devolved into folders containing timestamped versions of the same file. If you’re like me, you probably thought putting that on a shared drive in the cloud put you one step ahead of the game. Sadly, that’s probably true, but that’s no excuse not to step up your game some more with Git. That’s right — Git can handle more than just code.</p><p>This may seem like a crazy idea — Git wasn’t created to handle spreadsheets or word processing. Well, you know what sounds even crazier? Having a ton of folders with timestamped files on everyone’s hard drive! Using <em>git add, commit, branch, merge and push </em>is simple to learn and comes with a number of added benefits.</p><h4>Version Control for Spreadsheets</h4><p>Let’s try out some version control in MS Excel. We’ll start out by creating a simple spreadsheet as an XLSX (Excel’s modern default filetype), an XLS (preceded XLSX) and a CSV (comma-separated values). For each set of changes, we’ll create a new branch, add and commit our changes, then switch back to our master branch and merge the two.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*dbNPHgeMBz6ByWCnXA75Jg.png" /><figcaption>Original .xls, .xlsx &amp; .csv files</figcaption></figure><p>First, let’s try making some simple edits to our spreadsheets. To start off, we’ll make some small edits and delete a row.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*ISkg5HyYMI1U1f2rJBU4Nw.png" /><figcaption>Text-edited .xls, .xlsx &amp; .csv files</figcaption></figure><p>No problems here. Next, let’s try something a bit more advanced. We’ll be adding some simple formulas (not in our CSV, it doesn’t support formulas).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*G-XhUMnrDCmE84l6RfMDmw.png" /><figcaption>Formula-edited .xls &amp;.xlsx files</figcaption></figure><p>Still good! One more quick test — let’s see what happens when we edit some styles, like text color and background color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*9u1PbzWq9u-nHe8TP3JqCg.png" /><figcaption>Style-edited .xls &amp;.xlsx files</figcaption></figure><p>That works, too! Awesome — Git can understand our spreadsheets well enough for us to branch off, make changes and then merge them back in.</p><h4>Version Control for Word Processing</h4><p>Next up, word processing. We’re going to follow that same workflow from our spreadsheets — we’ll create a new branch, add and commit our changes, then switch back to our master branch and merge the two.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*wi454P_UTyJk9M_VGbm72A.png" /><figcaption>Original .docx</figcaption></figure><p>We’re starting out with a DOCX file — MS Word’s standard filetype. It has a few quotes in there — nothing crazy. Let’s see what happens when we remove the middle one and add a new one at the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*VtNtSVi2tScJ1Nmc-v39UA.png" /><figcaption>Text-edited .docx</figcaption></figure><p>All good. If you think about it, the contents of a word document are basically the same as the contents of an HTML document — they’re both just plain text in different languages. Or at least they are until you do something else to your word doc, like change up all the spacing, text styles, colors and whatnot. Then what happens?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*iGxrobm17YmuBxso5m1Gjw.png" /><figcaption>Style-edited .docx</figcaption></figure><p>Well, that’s no good. Surprisingly, we were able to merge without having to resolve any conflicts, but it looks like Git made some wrong assumptions. Still, we were able to edit our content no problem. So long as we work on our content before our presentation, we should be fine.</p><h4>Collaborative Benefits</h4><p>We’ve really only covered Git’s version control benefits, but its collaborative features can be useful, too. If you incorprate Github into the mix, you and your collaborators have access to even more great features. For example, you could all fork and clone the same repository, work on the same file or collection of files, then push and send a pull request for your team’s leader (e.g. an editor) to review. The leader can even choose to include pieces of individual pull requests and exclude others. And he doesn’t have to download twenty versions of the same file or folder, all with the same name, and clutter his desktop.</p><h4>Things to Keep in Mind</h4><p>Git has its limitations. If you make a lot of drastic changes to a large file, Git might freak out and have no idea what to do, so it’ll declare basically everything a merge conflict. While this is really annoying, it’s still better than it making a bunch of assumptions and breaking your file.</p><p>It’s good practice to separate your work on content and style. Git is built to handle changes to code, which is text. So long as your work is limited to your content, you should be fine. Also, the simpler your filetype, the easier it will be for git to manage.</p><p>Github’s pull request interface is amazing. Unfortunately, you can’t preview pull requests for certain types of documents like DOCX, XLSX and other filetypes that most people use everyday. But, that interface might exist somewhere else — go find it! Or work your way around it by converting your file to something Github can understand.</p><h4>TL;DR</h4><p>Should I just timestamp a bunch of files, throw them in folders and email everyone I work with?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F31g0YE61PLQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D31g0YE61PLQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F31g0YE61PLQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/67da252056e7776d03e2e0d4122c0983/href">https://medium.com/media/67da252056e7776d03e2e0d4122c0983/href</a></iframe><p>This post is originally from my <a href="http://pat-whitrock.github.io/">technical blog</a>. You can find the original post <a href="http://pat-whitrock.github.io/blog/2014/02/27/git-for-non-programmers/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49c85d3f647d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I finally Learnt Ruby on Rails]]></title>
            <link>https://medium.com/@Andresquest/how-i-finally-learnt-ruby-on-rails-d2c455e7b53?source=rss----49bd48b52585---4</link>
            <guid isPermaLink="false">https://medium.com/p/d2c455e7b53</guid>
            <dc:creator><![CDATA[Andre Scott]]></dc:creator>
            <pubDate>Thu, 19 Jun 2014 02:22:24 GMT</pubDate>
            <atom:updated>2014-08-13T10:16:18.418Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/desat/multiply/grey/60/overlay/grey/1*JCmQv8gQ6JTaUIkknEBASQ.jpeg" /></figure><h4>A simple path to Ruby on Rails Mastery</h4><p>Late last year, I pushed my 30ᵗʰ web application to the web. Its official (I thought), I have finally learnt Ruby on Rails… I am now a real web developer.</p><p>But getting there wasn&#39;t easy. In fact I could say that learning rails has been the hardest, most-frustrating thing I&#39;ve ever done in my life.</p><p>Not because rails itself is hard, but because before I learnt rails, I didn&#39;t really know how to code. I didn&#39;t even really know what rails was.</p><p>All I could gather from the articles I read online was that Ruby on Rails was the easiest thing I could learn if I wanted to build web applications, so I bought a few books and decided to dive in.</p><p>I had no clue what I was getting into, in fact if I realised what was ahead, I probably wont have pressed forward (at least not without more help).</p><p>I didn’t know what to learn or how to learn it and I pretty-much just bullshitted my way through the entire learning process. With trial and error being the only teacher I could turn to at the time (before I found a mentor), I spent most of my time heading towards dead-ends. Learning things that would never turn out to be useful for me.</p><p>My goal with this article is to help you avoid much of this frustration and time-wasting. I have gone through almost every tutorial out there, and I know what works and what doesn&#39;t… Or at least what worked for me.</p><p>Hopefully, my experience can help make your learning a little easier. Good Luck ☺.</p><p><strong>First of all, (lets start with) the things that won’t work.</strong></p><ol><li><a href="http://www.codeschool.com/"><strong>CodeSchool</strong></a> — Codeschool has many great courses for beginners and intermediate devs, <strong>but their rails course isvery weak</strong>. It is absolutely terrible if you start learning rails here and if you already know rails, you wont find it very useful.</li><li><strong>OneMonthRails </strong>— This guide could have been really good. But because they don’t really explain what’s going on (they just build without really explaining what they are doing and expect you to code-along), you wont be able to understand what is happening.</li><li><a href="http://www.railstutorial.org/book"><strong>Michael Hartl’s Tutorial</strong></a> — This is by far the best rails tutorial on the web. But as a beginner with no previous web development experience, YOU WILL DROWN. Stay away until you get more experience, then you will LOVE this guide.</li></ol><h3>What works</h3><p>Before you move forward, I would like to kindly advise you to <a href="http://www.codequad.com/">GET A MENTOR</a>. Teaching yourself rails is not an easy task. It will push you to the brink of tears over and over again. And without someone there to help you when things get tough, there is a very good chance that you will give up.</p><p>Anyway, here is the easiest and fastest way to learn ruby on rails by yourself… Step by step:</p><h4><strong>Step 1 — The basics of Ruby on Rails (for beginners)</strong></h4><p><strong>HTML and CSS</strong></p><p>This article assumes that you already know basic Html and Css. If you don’t, just head over to lynda and take these two courses</p><ol><li><a href="http://www.lynda.com/HTML-tutorials/HTML-Essential-Training-2012/99326-2.html"><strong>Html Essentials</strong></a></li><li><a href="http://www.lynda.com/Web-Interactive-CSS-tutorials/CSS-Fundamentals/80436-2.html"><strong>CSS Fundamentals</strong></a></li></ol><p><strong>Ruby</strong></p><p>You will never be able to build anything meaningful with the Ruby on Rails framework if you dont know ruby. So it is important to learn the basics of ruby before you start learning rails</p><ol><li><a href="http://pragprog.com/book/ltp2/learn-to-program"><strong>Learn to Program with Ruby</strong></a> — is the very best introduction to programming and the Ruby language that I have ever been able to find. Start here.</li><li><a href="http://pragmaticstudio.com/ruby"><strong>The Pragmatic Studio Ruby course</strong></a> — is another excellent introduction to programming with the ruby language. Its quite pricey, but worth it.</li></ol><p><strong>Ruby on Rails</strong></p><p>The Ruby on Rails framework allows you to build web applications very easily. Learn it properly, and you will be able to build anything you can imagine.</p><ol><li><a href="http://pragmaticstudio.com/rails"><strong>The Pragmatic Studio Rails Course</strong></a><strong> </strong>— is currently the best introduction to rails I have ever been able to find. Its really awesome and definitely worth the price</li><li><a href="http://www.lynda.com/Ruby-Rails-tutorials/Ruby-Rails-4-Essential-Training/139989-2.html"><strong>The Lynda Rails Course</strong></a> — is another complete and effective introduction to Ruby on Rails. You might get confused with the database configuration though, as they use MYSQL which can be a little confusing. If you do, just send me an email (andre[at]codequad.com) and I’ll be glad to help you out.</li><li><a href="http://www.tryrails.com/"><strong>Try Rails</strong></a> — Its a free online Ruby on Rails workshop for beginners. It’s new and well worth trying</li></ol><h4><strong>Step 2 — Intermediate Ruby on Rails</strong></h4><p><strong>Ruby</strong></p><p>Take your ruby knowledge to the next level, and learn how to build more complex (non-trivial) web applications.</p><ul><li>Beginning Ruby — get a deeper understanding of ruby, so you can start building useful (non-trivial) applications.</li></ul><p><strong>Ruby on Rails</strong></p><p>Dive deeper into ruby on rails and learn how to add advanced features to your web applications(file uploads, user managements, friending and following, login and logout, E.T.C.)</p><ol><li><a href="http://www.railstutorial.org/book"><strong>Rails Tutorial</strong></a> — the most complete ROR tutorial online (and its free).</li><li><a href="http://pragprog.com/book/rails4/agile-web-development-with-rails-4"><strong>Agile web development with rails</strong></a></li></ol><h4><strong>Step 3 — Advanced Ruby on Rails (Entering godMode)</strong></h4><p><strong>Enter godMode.</strong> Get a deep understanding of both Ruby and Ruby on Rails, and acquire the skills of a cutting-edge web developer.</p><ol><li><a href="http://www.poodr.com/"><strong>Practical Object-Oriented Design in Ruby</strong></a><strong> </strong>— Learn the basics of Object-Oriented Programming with Ruby and begin to understand how to solve complex problems, build large applications and write smart maintainable code.</li><li><a href="http://www.amazon.com/gp/product/0321584104/ref=as_li_ss_tl?ie=UTF8&amp;tag=eloqruby-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399349&amp;creativeASIN=0321584104"><strong>Eloquent Ruby</strong></a> — If all the previous books taught you the Ruby language, this one will make you a native speaker. You will learn “The Ruby way” of thinking and problem solving and develop a more complete understanding of ruby.</li><li><a href="http://pragprog.com/book/ppmetr/metaprogramming-ruby"><strong>Metaprogramming Ruby </strong></a>— The work programmers do can sometimes seem like magic when you look from the outside (How did DHH create rails?… Magic). This book will give you the power to create such magic.</li><li><a href="http://pragprog.com/book/jvrails2/crafting-rails-4-applications"><strong>Crafting Rails 4 Applications</strong></a><strong> </strong>— this will help you understand the inner workings of the Ruby on Rails framework and give you the skills and understanding you need to tackle complex projects and build large-scalable web applications.</li></ol><p>As you try and teach yourself ruby on rails, you will get in trouble many times. Your code will break, simple concepts will confuse you and you will be tempted to give up many times. Don’t. NEVER GIVE UP; because that is the only way to learn rails on your own.</p><p>If you get confused, put the book down, take a break and pick it up again. We all went through this hellish phase and came out stronger at the other end.</p><h3><strong>Get a Mentor</strong></h3><p>Having a mentor will go along way to alleviate most of this pain. Why spend 4 hours trying to understand what your ruby book means by “Single Table Inheritance” when <a href="http://www.codequad.com/">your mentor</a> can explain it in 5 minutes.</p><p>Did you run into an error that you don’t understand? Why spend 2 hours looking for a solution online when your mentor can show you how to fix it?</p><p>These little time-savers are exactly why students with mentors stay motivated and are able to learn much faster than those who teach themselves.</p><h3>One More Thing</h3><p>If you are trying to learn ruby on rails right now and nothing has worked for you so-far, we’re running a free online <strong>Ruby on Rails</strong> workshop that just might help you. Checkout <a href="http://www.tryrails.com/">www.tryrails.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2c455e7b53" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>