GithubHelp home page GithubHelp logo

laa-ruby-learning-path's Introduction

Learning Path for Ruby Programming

What follows is a list of resources collated into a ‘learning path’ for Developers to upskill in Ruby programming.

Resources are laid out in steps which follow on from each other. However, it is not meant as a directive to follow exactly in the order laid out here. Similarly, there is no need to go through every resource mentioned here, rather, this is intended as a guide to give you a bit of context to help you choose which resources to look at as you develop more skills.

The aim here is to give you a path you might take to structure your development as a Ruby programmer. If you’re not feeling some of the resources here then please feel free to replace / supplement them with things from elsewhere.

Step 0: Prerequisites:

  • UNIX/LINUX Command line – no need to master this, but it is pretty much a given in Ruby programming that you are familiar with this:
    • Pluralsight course on the Unix command line here
    • Good and short book on this.
    • Git for version control - most of you should be familiar with this but for the uninitiated here is a Pluralsight course – and here is a short book to get you started.
    • For extra points have a look at this course on Test Driven Development (TDD)– you won’t be doing this straight away but it make sense to understand this mind-set from the beginning.

Step 1: Installing Ruby:

  • WARNING: OSX already has a version of Ruby installed – but beware - it is not advised that you rely on this version, as OSX uses it internally to organise things, so relying on it can be problematic.
    • Instead follow the steps here to install the Ruby version manager rbenv.
    • Install Ruby versions onto you Mac by following this link.
    • Other version managers include RVM and chruby.
    • Course on setting up a linux development server for Ruby/Ruby on Rails development here.

Step 2: Basic Ruby Programming:

  • Very quick tutorial to familiarise yourself with the basics of the language.
  • Basic control flow, variables, data-structures on Pluralsight.
  • More on Object orientated Ruby on Pluralsight.
  • Book on the basics of Ruby (has lots of good exercises in it) called Learn Ruby the Hard Way.
  • Great site to practice coding Ruby via code ‘katas’, its called codewars.com.
  • Alternative to codewars is exercism.io which has a similar theme to codewars but it does not use an online IDE.
  • Ruby koans are a way to learn the ruby language via test-driven development; each step involves making a test case pass to help you understand a ruby language feature.
  • IRB ('Interactive Ruby') - this is a tool to interactively execute Ruby code in the command line. Type irb in the terminal after you have installed Ruby to activate this. It's very useful for testing small snippets of code in isolation.
  • slightly more advanced book which teaches you how to write robust Object Oriented Ruby code. This is a highly recommened read as are all books by Sandy Metz on Ruby. You also might see this book refered to as POORD by the Ruby community. This is also a great book to read to improve your code in general.
  • more lighthearted look at Ruby in this book for Ruby beginners.
  • You might want to subscribe to the Ruby Weekly mailing list as a way to keep up-to-date with what's happening in the Ruby world. You'll get an email once a week with a few links to interesting articles on Ruby, Rails and related technologies.

Step 3: Ruby Development Tools:

  • Integrated Development Environments (IDEs) and Text editors – Pick one, I like Visual Studio Code, others include:

    • Ruby Mine IDE – this is a fully featured Ruby / Rails IDE with autocomplete etc. note this is not an open source product and requires a licence to use. But it does have a trial period.
    • Atom – an open source text editor built by github – has packages you can install that make Ruby programming easier
    • Sublime Text 3 - this is another text editor that is widely used and has numerous plugins for Ruby development.
  • Package management in Ruby is done with Ruby Gems.

    • Info on what gems are and what you can do with them.
    • Pluralsight course on creating your own Ruby gems.
    • Awesome Ruby is a collated directory of tools / gems for pretty much any use case you can think of. This is really cool and you should check it out. A similar alternative site to look for Ruby packages and gems is Ruby Toolbox. This site is very nicely laid out and easy to use.
    • rubygems.com is the main repository that bundler uses to install gem dependencies in projects. Most of the source code for these hosted on github.
    • It would be good practice to create a simple Ruby Gem yourself to get a better understanding of how they work.
      • This link will guide you through the creation of a Gem.
  • Bundler is used to manage dependencies, in conjunction with RubyGems (think Maven if you’re coming from a Java background, it uses Gemfiles which are the equivalent of a Maven pom.xml file).

    • Gems are what Ruby packages are called (think .jars), they need to be installed and then ‘required’ into your project, in a similar fashion to Java imports.
    • bundler uses Gemfiles which allow you to declare your projects dependencies in an easy syntax. You can then install declared dependencies using bundle install on the command line in your project root.
    • Bundler also creates a Gemfile.lock snapshot file which declares the exact versions of dependencies that you know work for your application. This should be checked into source control along with your Gemfile.
    • here is a more in-depth discussion of what bundler is actually doing.
    • You can also use Bundler to simplify the creation of RubyGems, follow this link to find out more.
    • A note on using Bundler: gems installed by Bundler will affect gems you install using gem install. Bundler effectively creates a sandboxed environment. Using Bundler to manage Gems means that you shouldn't run into Gem version conflicts across projects as the Gems are localized to a given project.
  • Documentation - Ruby is an extremely well documented language. Find the code language docs here:

    • Ruby core library.
    • Ruby standard library i.e. language features that are installed with your Ruby installation automatically but you still have to require into your programs.
    • Use the RubyGems website to find documentation on individual gems you’re using in your application.
  • Debugging:

    • used Pry which is a command line tool to perform debugging of Ruby apps. It can also be used as an alternative to the 'IRB' in-line Ruby runtime that comes as standard in Ruby installations (see step 2 bullet-point 7).
    • There are also integrations in text editors like Visual Studio Code and Ruby Mine which perform similar functions.
    • an alternative to Pry is byebug.
  • Build automation / task runners

    • Rake, short for Ruby + make (Make being a general build tool for Unix / Unix-like Operating Sysytems).
    • Rake is a build automation tool that is used to perform tasks on code (e.g. things like minifying Javascript or running automated tests). It is used heavily in the Rails frame work for things like database migrations. It might be best to look into this in the context of Rails (see step 3).
  • Testing Frameworks:

    • Great course on testing Ruby / Rails apps on Pluralsight here. This course is really good, I highly recommend this.
    • Minitest – default Ruby test framework which comes as part of it’s standard library (since Ruby 1.9).
    • RSpec – the de-facto Ruby testing framework for TDD.
    • factory_bot (Note: until fairly recently this was called factory_girl, it is referred to by this name in some of the resources). Can be used to mock objects to create test data in Ruby apps. More info here.
    • Cucumber is a BDD (Behaviour Driven Development) acceptance testing framework you can in conjunction with Capybara (Think Selenium if you’re from Java) to run automated browser tests. Note: it can be used with selenium if needed see here. You set up feature files using the (Gherkin Language) which is used to describe 'journeys' through you application, which you then test your app against these. Introduction to this kind of testing here. Some tips on writing better feature files with Gherkin here.
    • a new, and very comprehensive, book on testing in Rails 5

Step 4: Web frameworks / web programming:

  • Sinatra this is a very lightweight web framework that is a good place to start for Ruby web programming.

    • Basic tutorial here
    • More comprehensive on Sinatra book here.
    • youtube tutorial on building a simple full stack web app in Sinatra.
    • Really good book on Sinatra, though you have to pay for it is very good, and I would recommend checking it out.
  • Ruby on Rails (Rails for short) this is more of a ‘all bells and whistles’ web framework that allows you to develop web apps rapidly. It also has modules for things like batch jobs, emails and Restful APIs.

    • Railscasts on youtube called Railscasts Reloaded though some of the videos here are a few years old it is a great resource, which has short videos that explain very many of the features of Rails in a really accessible way. It is well worth a look, there is also an archive of the videos here on youtube.
    • Guide to Installing Rails here.
    • Very good and free Rails tutorial book.
    • Pluralsight course on Rails 4 (note this is on a slightly earlier version of Rails but the fundamentals are the same.)
    • Really good Udemy course (Note have to pay about a £10 to access this course, google for a voucher as the quoted prices are far higher than what you actually need to pay).
    • A comprehensive book on Rails development in Rails 5
    • Interesting article on making Rails code DRYer, and more decoupled with Plain Old Ruby Objects.
  • Templating engines which compile to HTML (basically JSP / JSF if you’re thinking in Java) can be used with Rails or Sinatra if you install the correct gems. Here are two commonly used examples:

    • Slim
    • ERB (or embedded Ruby) – this is the default template engine in Rails/Ruby in general.
  • Rack – this is the base package that almost all Ruby web frameworks are built around, it creates a common interface to allow Ruby frameworks to interact with webservers more easily. You might not need to know the ins and outs of this but if you’re interested here is a Pluralsight course that will teach you more about it and how it integrates with frameworks like Sinatra and Rails.

  • Micro-services / apis:

    • Grape is a good choice to write microservices in Ruby. It's a lightweight framework to write Ruby APIs, it's not as bare-bones as Sinatra but it adds some useful features (especially params) without being as a heavyweight a framework as Rails.

Step 5: supplementary tech:

Step 6: More advanced books:

laa-ruby-learning-path's People

Contributors

willmcb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.