Ruby Programming for Beginners
4.1 (686 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
28,599 students enrolled

Ruby Programming for Beginners

Learn Ruby Programming the fast and easy way!
4.1 (686 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
28,599 students enrolled
Created by Huw Collingbourne
Last updated 8/2019
English [Auto]
Current price: $51.99 Original price: $74.99 Discount: 31% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3.5 hours on-demand video
  • 13 articles
  • 9 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Hours of video lectures detailing the ten steps to becoming an awesome Rubyist
  • Free eBook The Little Book of Ruby and exclusive discount for The (Big) Book of Ruby
  • Downloadable source codes and sample test files to complement lectures
  • 5 extra videos detailing Ruby on Rails, Symbols, Recursion, and other challenges
  • Interactive quizzes to let you test your understanding of the topics covered
Course content
Expand all 56 lectures 06:03:13
+ Introduction
10 lectures 35:39

Welcome to the course! This is a short introduction to the Ruby language and a few words about what you can expect from this course.

Preview 07:40

The Little Book Of Ruby (4th edition) is the 'course text'. It covers all the topics in this course in ten chapters. Click the download tab on the right to download a copy for offline reference. Be sure to download the code archive too (next lecture). This contains all the ready-to-run Ruby programs from each chapter.

The Little Book Of Ruby
104 pages

This code archive contains all the programs from The Little Book Of Ruby.

Little Book Of Ruby Code Archive
27.3 kB
This document lists essential online resources for Ruby and summarises a few 'frequently asked questions' about running Ruby on different operating systems. If you have any questions about getting Ruby installed and running, please ask in one of the Discussion forums. I may update this document if users have additional 'getting started' questions or if you have any hints and tips that might helpful to other users.
Getting Started FAQ And Resources
9 pages
Subscribers to this course are entitled to a 30% discount off the price of my other Ruby programming book, The Book Of Ruby, published by No Starch Press. In around 400 pages, The Book Of Ruby goes into more advanced Ruby topics such as blocks and nameless functions, threads and fibers, self-modifyi…
Exclusive Discount on The (Big) Book Of Ruby

First install a Ruby interpreter and a text editor or IDE. In this video I'll explain how to find and install the right interpreter for your operating system and I’ll show a couple of ways in which you can edit and run your Ruby programs.

Preview 04:27

If you are a Mac user, this video will guide you through the steps needed to write and run your first Ruby programs.

First Steps on a Mac

Here’s a quick tip that could save you a lot of time if you are running Ruby on a Mac. It explains how to use Finder to open a Terminal (for running Ruby programs) in any folder. Easy when you know how!

Mac users: quick tip - open a Terminal in any folder

If you haven’t done much (or any) programming before or if you need a quick revision of the basics of programming, start with this video. This explains the fundamental features of computer programming – how to use variables, constants, methods, arguments and more.

Programming Fundamentals
+ Step One
4 lectures 26:59

Ruby can delimit strings with single quotes 'like this' or double quotes "like this". It turns out that double-quoted strings can do a special trick – they can evaluate embedded Ruby code. This lesson explains the fundamentals.

Step One - part one: Strings and embedded evaluation
See it in action: strings

An introduction to objects and methods. How to use the standard methods of Ruby objects and how to create objects with methods of their own.

Step One - part two: Objects and methods

Hands-on sessions are where I encourage you to get at your keyboard and try out bits of Ruby. This hands-on session doesn't introduce new concepts but it does give you some guidance on how to experiment with Ruby as an aid to your study.

Hands-on Session: Ruby basics
+ Step Two
3 lectures 13:37

Now we’ll look at how multiple objects can be created from a class and we’ll see how to create and access ‘instance variables’ to store different data for each object.

Step Two - part one: Creating Classes and Objects
See it in action: classes and objects

How to initialize an object’s data at the time of creation using the initialize() method and how to look inside objects using the inspect() and p() methods.

Step Two - part two: Initializing & Inspecting Objects

Test your knowledge of the first two steps.

Step 1 and 2 Quiz
8 questions
+ Step Three
3 lectures 10:41

In this step you will learn how to create class hierarchies in Ruby so that descendent classes inherit the features of their ancestors.

Step Three - part one: Superclasses and Subclasses
See it in action: class hierarchies

This video summarizes the essentials of class inheritance in which different ‘branches’ of subclasses can descend from a common ancestor.

Step Three - part two: Class Hierarchies
+ Step Four
3 lectures 08:43

We look at simple ways of creating 'attributes' to access instance variables without having to write 'getter' and 'setter' methods.

Step Four - part one: Attribute Readers & Writers
See it in action: attribute accessors

What is the difference between an @instance_variable and a @@class_variable? This video explains...

Step Four - part two: Class Variables
Test what you've learnt in steps 3 and 4.
Step 3 and 4 Quiz
8 questions
+ Step Five
5 lectures 20:52

An introduction to creating arrays in Ruby, including arrays of mixed types. How to index a single array item and how to append arrays.

Step Five - part one: Arrays
See it in action: arrays

How to index multiple sequential elements in an array, how to specify ranges of elements, and how to iterate over array items.

Step Five - part two: Array indexing and iterating

Time to get back to your keyboard and do some hands-on coding. In this video I suggest that you copy and paste code from the documentation of Ruby's class library. That's a great way to learn about the classes and methods available!

Hands-on Session: Arrays
It’s time to do some ‘hands-on’ coding. Here are some ideas to get you started...
Ruby Programming Projects
5 pages
+ Step Six
3 lectures 12:48

Hashes (or 'dictionaries') let you create lists of objects indexed using a key – for example, a string key such as "chocolate cake" may index a value such as the cake’s recipe. This step explains the fundamentals of hashes.

Step Six - part one: Hashes
See it in action: hashes

Ruby can return arrays of all the keys and values found in a hash. You can then use array methods to add, delete, reverse and append one array to another.

Step Six - part two: Keys and Values

Test yourself on steps 5 and 6.

Step 5 and 6 Quiz
8 questions
+ Step Seven
3 lectures 11:01

How to repeat actions and iterate over collections using for and while loops and some special Ruby methods.

Step Seven - part one: Loops and Iterators
See it in action: loops

Ruby uses Blocks to perform iterative actions. But there is more to Blocks than meets the eye. In a sense, a Ruby Block is like a method without a name. This video explains.

Step Seven - part two: Blocks
+ Step Eight
3 lectures 13:08

How to perform tests using 'if', 'elseif' and 'case' statements along with a number of operators to determine whether test conditions are true or false.

Step Eight - part one: Conditional Statements

Ruby has quite a few Boolean operators to test true/false values. They may look simple enough at first sight but be careful. They may not always work quite as you expect!

Step Eight - part two: Boolean operations
See it in action: conditional tests
Check what you've learnt in steps 7 and 8 with this quiz.
Step 7 and 8 Quiz
6 questions
+ Step Nine
3 lectures 12:14

Modules let you wrap up code for easy reuse – they also provide some of the features of multiple inheritance without the complexities.

Step Nine - part one: Modules and Mixins
See it in action: modules

What is the difference between a local and a global variable? And when is a constant not a constant?

Step Nine - part two: Constants and variables

Learn Ruby today!

Ruby is famous for being easy to learn but most users only scratch the surface of what it can do. While a typical Ruby tutorial or book focuses on Ruby's trendier features this course reveals the secret inner workings of one of the world's most popular programming
languages. It helps you learn Ruby in one of the easiest ways possible through 10 simple steps that will have you writing clear maintainable code in no time. Rather than bog you down with a lot of theory this course takes a hands-on approach and focuses on helping you learn Ruby so that you'reproductive on day one.

Whether you're new to programming or just new to Ruby this Ruby tutorial is your guide to rapid real-world software development withthis unique and elegant language.

Who uses Ruby?

Ruby is an incredibly powerful and highly scalable object-oriented language. Leading technology companies & startups around the world use Ruby or the Ruby on Rails framework to power their websites & web applications. They include:
* Amazon
* Twitter
* Electronic Arts
* Yahoo
* New York Times
* 37 Signals

* And many many more...