
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
In this lecture we get our introduction to what programming is, what it represents, and what it takes to program.
We discuss the central role of programming in the modern world and how technology is part of every aspect of our lives.
Programming is not just for computer scientists. Understanding code and how programs work is relevant in many modern professions.
We take a look at the application that we will be building in this final project for this course.
Build a Ruby-based car shopper that auto-scrapes a car listings site, applies filters to narrow results, and outputs a JSON feed while managing gems.
Build a log parser for an Apache style access log to extract emails and cross-reference them with users data, revealing patterns in directories and browser info.
In this video, we go over the installation of RVM and using it to run the Ruby interpreter on our MacOS environment.
The commands are available in the resources section.
We go over the Windows installation options for Ruby
We go over the installation options for Ruby on Linux
A guide to how troubleshoot errors and resources for looking for answers online.
An overview of some of the popular editors that we can use for programming in Ruby.
We go through the installation of the Atom editor
We go over what the terminal is, and some useful commands we can use in this environment.
We start learning how to use the terminal for our programming.
We review how to create directories through the command line and move between different directories.
We look at how to create files on the command line and open them for editing.
Create your first Ruby file named hello.rb in the editor or command line, recognize the .rb extension, and run it with the Ruby interpreter.
Run ruby files from the command line to see output printed by the ruby interpreter, verify hello world runs without errors, and prepare to display your program's results.
Explore how Ruby prints output by comparing puts, print, and p; see how each handles newlines and literal strings, and learn to display hello world in the terminal.
Use code commenting in Ruby to document code and guide future readers, noting that comments do not run and can temporarily disable lines to test outputs.
Explore interactive ruby (irb) by launching irb, running quick expressions like puts and 2+2, and seeing immediate outputs, with tips on when to use files instead.
We set up our environment for the programming that we will be doing.
Participate in a codealong to create a Ruby file, print name and favorite food, explore string formatting with new line characters and puts, and preview variables and terminal input.
Use Ruby to calculate and print your age in these three ways - in days, in hours, and in minutes
Explore variables in Ruby by creating a new project and assigning values such as a = 'hello' and b = true, then run the code to see valid Ruby.
Explore how Ruby variables store and change values, print variables with puts, and observe top-down evaluation as assignments override earlier values.
Explore how assigning one variable to another copies the value, so changing a after assignment leaves b with the original value; using puts reveals the effect.
Master getting input from the terminal in Ruby using gets, assign input to a variable, and echo it with puts while prompting users and exploring input/output basics.
Defines strings as sequences of characters and shows how Ruby uses double and single quotes, termination rules, and dynamic typing that lets a string become a number.
Discover how ruby strings work and how to interpolate ruby code inside a string to insert variables like a and b, enabling templating and dynamic output with puts.
Explore string manipulation in Ruby by combining strings through concatenation, interpolation, and formatting with spaces. Output the result with puts and learn basic variable usage and file naming conventions.
Discover how Ruby concatenates strings with the plus sign, modifies in place with concat, uses operator precedence and optional parentheses, and notes interpolation as a clearer alternative to plus.
Explore string manipulation in Ruby by reversing strings, using non-mutating and mutating methods, and understanding how index positions and bang methods change the original data.
Explore booleans in Ruby, using true and false to drive logic, and learn assignment versus equality with == and != while comparing booleans, strings, and numbers.
Master logic comparisons in Ruby by evaluating true and false with and, or, and the precedence rules; use parentheses to control evaluation order, and understand short-circuit true-first behavior.
Explore numerical comparisons in Ruby, using five and six to test not equal, greater than, greater or equal, and less or equal, and note the hash rocket syntax.
Learn how Ruby's if statements execute code blocks when conditions evaluate to true, using comparisons like A equals B and five is greater than four.
Explore branching logic in Ruby with if and else to run code based on conditions, comparing today to a special day, and using gets and chomp for user input.
Explore branching logic with else if in Ruby, moving beyond a simple if to handle multiple conditions from command-line input, including a catch-all fallback.
Explore branching logic with case statements in Ruby, using when clauses and end to handle multiple conditions from command-line input. See how case compares to switch and the default case.
Learn how to find text inside strings using include, compare with equals, and apply conditionals like if, else, and case to user input such as days.
Explore index-based text search in Ruby by using the index method to locate substrings within a string, handling nil results and showcasing zero-based indexing and conditional logic.
Explore integers and floats in Ruby, compare and assign numbers, perform arithmetic, and distinguish numeric types from strings using decimal notation.
Learn integer operations in Ruby, including addition, subtraction, multiplication, division, and modulo, using variables and examples, and understand integer versus float arithmetic.
Discover how Ruby handles operations with integers and floats, showing why 1 divided by 2 yields 0 for integers but 0.5 with 1.0/2.0, and when to use floats for accuracy.
Learn how Ruby treats string numbers and casts them to integers with to_i for arithmetic. See why integer division returns zero and how converting to floats fixes results.
Master casting strings to floats in Ruby with to_f to achieve accurate decimal division, and learn how mixing floats and integers yields correct results while invalid strings become zero.
Cast strings to integers and floats from user input in Ruby using gets and chomp, then perform numeric operations like adding 500.
Generate random numbers in Ruby using rand with optional ranges, explore decimal output, default behavior with zero, and observe different results across runs for varied data.
Combine strings and numbers in Ruby by taking user input, generating a random number, casting to numeric types, and displaying products, divisions, and sums with string interpolation.
This is the introduction to the Codealong Exercise for this section.
This video shows the step by step coding of the Guess the Number game
In this assignment, you will build an input analyzer that will return different messages based on the validation of input from the user.
Change your terminal prompt by editing the bash profile in your home directory to display only a dollar sign. Open a new terminal session to apply and verify the change.
Learn how Ruby methods encapsulate reusable blocks of code, how to define and call them, and how to pass inputs to reduce repetitive coding.
Define a method that accepts a parameter and prints it via the message variable using interpolation. Call the method with a hello world value to see how the argument passes.
Explore how optional arguments and default values prevent argument errors in methods, with defaults such as blank, and see how puts behaves with or without an argument.
Explore the different styles of if in Ruby, including one-liner forms and the unless variant, and understand method returns and blocks using end, puts, and comparisons.
Explore how Ruby methods return values, including default returns from the last line, using return statements, and conditional returns based on input.
Explore calling one method from another and chaining their returns, using foo and bar to produce 10 and 17, illustrating method chaining foundations.
Explore data structures as new types that combine data and functionality, focusing on arrays and hashes. See how their storage and representation shape what you can do with data.
Introduce arrays as a data structure by creating empty and populated arrays, and explore zero-based indexing, element access by index, and common methods like length, first, and last.
Explore creating arrays in Ruby with literals, array.new, and string splits, including default values and generating arrays from characters.
Explore Ruby arrays by creating, printing, and reversing them, and learn how array concatenation works with plus and the cat operator.
Explore Ruby arrays and learn how pop removes the last element and push adds it back, enabling retrieving and manipulating data without numeric indices.
Learn to retrieve Ruby array elements using zero-based indices, handle nil for out-of-bounds, and access the last item with length minus one.
Explore retrieving data from Ruby arrays with convenience methods like first, last, take, and delete, compare behavior when fetching out-of-bounds versus raising errors, and understand silent failures.
Explore the Ruby hash data structure by creating empty hashes, using hash literals and Hash.new, and storing key-value pairs like food => pizza and car => Ferrari.
Explore how Ruby hashes store data as unique key–value pairs, retrieve values by key, handle missing keys, and combine hashes with arrays to model real-world information.
Discover how symbols optimize Ruby hashes by serving as lightweight, immutable keys, and learn to convert between strings and symbols using to_s and to_sym for fast data retrieval.
Learn how to retrieve data from hashes in Ruby using a key, compare fetch and square brackets, and note that missing keys may raise errors or return nil.
Explore retrieving data from hashes by key and checking key existence. See retrieval by value, first-match behavior, and note that hash key usage replaces deprecated index lookups.
Explore manipulating Ruby hashes by merging separate hashes, overriding keys, and inspecting keys; practice deleting keys and handling nil returns when a key is absent.
Explore loops as a control structure that repeats code, including infinite loops, and learn how a condition or break out stops loops, with operating systems.
Explore conditional while loops with a ten being decremented while a remains greater than five, showing how the loop ends and how subsequent code executes.
Master begin-while loops that prompt for user input and loop until the answer matches a target value, guiding interactive Ruby command-line programs.
Convert a looping Ruby example from a while to an explicit break, using a choice input to exit the loop and avoid infinite looping.
This is the introduction to the Codealong Exercise for this section.
We will be building a contacts directory that can be added to from the command line.
In this assignment, you will be building a collection of usernames and passwords based on user input.
Explore what algorithms are and why they matter, focusing on sorting methods like selection, insertion, merge, quick, and bubble sort; with applications in data analysis and encryption.
Understand how the bubble sort algorithm works and its order of complexity
In this optional video, we are going to implement a sorting algorithm for arrays, which will take an array as input and return it with the numerical elements sorted from smallest to largest.
There is a PDF file and a Ruby file with the source code in the resources for this video
We will use the Bubble Sort algorithm - https://en.wikipedia.org/wiki/Bubble_sort
Explore how to control loops using next to skip iterations, apply modulo for odd numbers, and branch with break and conditions to process numeric collections in Ruby.
Explore how until loops in Ruby run until a condition is met, such as i equals five, and use the += shorthand to increment.
Discover how Ruby uses loops as modifiers to write concise code, incrementing i with i += 1 and using a one-line while form to run code while a condition holds.
Learn to use Ruby for loops to iterate over arrays and collections, perform operations like doubling values, and conditionally skip items with break or next, mastering iteration.
Explore iteration in Ruby by transforming array traversal from for loops to using the each method with blocks, learning how elements are yielded and how blocks drive iteration.
Explore blocks in Ruby by using yield to pass the block's logic into each array element during iteration, and compare curly brace syntax with do-end for multi-line blocks.
Learn how to iterate over ranges in Ruby using inclusive and exclusive syntax, reverse ranges, and the times method to process numbers without creating arrays.
Learn to iterate with ranges using the step method to skip values, stepping two at a time, and print tens or twenties starting from zero.
Explore the enumerable module in Ruby using the ruby dog dot org docs, learn how each, all, any, detect, and entries operate on lists, and understand enumeration versus iteration.
explore enumerators in ruby, including how each with index yields item and position, calling without a block, and converting indices to strings to run array methods.
Learn to iterate over a hash in Ruby with each using k, v to separate keys and values, printing key and value sentences and understanding the difference from array iteration.
Explore transforming data inside iterations by altering arrays and hashes in Ruby. Learn practical techniques for using indices and elements to modify collections and create new results.
Explore Ruby array and hash transformations with map, select, and reject to filter and create new collections, including in-place bang variants.
Explore how to manipulate hashes with map, select, and reject, including returning arrays vs hashes, and building a new hash by iterating through key-value pairs.
Explore recursion in Ruby by defining a method that calls itself, establish a base case to stop the stack growth, and contrast it with looping to prevent stack overflow.
This is the introduction to the Codealong Exercise for this section.
We create filter functionality for a products catalog.
Implement the find_by_name method on the students hash from collections, and call it with existing and non-existing names to observe the output.
Explore how to work with files in Ruby by reading and writing, create sample files like food.txt, and use the File class to create file objects for hands-on practice.
Open a file in Ruby, assign the file object to f, and print it with puts; explore existing versus non-existent files and future read, write, and close operations.
Explore Ruby file modes, including r for read, w for write, and a for append, with append creating the file if it doesn't exist.
Open a file for reading, inspect the file object briefly, then use the read method to retrieve and display the file's contents.
Discover how to read a file line by line in Ruby, iterate each line, and handle newline characters while printing or processing lines with puts, p, and line-based reads.
Close files in Ruby to release memory and improve performance. Use the block approach to auto close the file when the block ends for clean cleanup.
Learn how to write to an existing file in Ruby by using the correct file modes, handle writing vs appending, and ensure proper newlines when appending multiple times.
Learn how to write to a new file and append to it in Ruby, creating Bar.txt, demonstrating append mode versus overwrite, and verifying the file contents.
Learn how to write user input to files in Ruby by prompting, chomping, and interpolating input, then collecting five lines in a single open file to ensure efficiency.
Explore csv files, where each line holds comma separated fields such as name, occupation, and favorite food, as structured data. Use ruby's csv class to write and read these records.
Master working with csv files in ruby using the csb library: load data from files or strings, access fields as arrays, and write or append with correct file modes.
Learn how to guard file reads in Ruby by checking if a file exists before opening, then read and print its contents using conditionals and user input.
Explore directories in ruby by using the dir class to navigate paths, list files, and check for existing paths, including changing directories and iterating over entries.
Learn how to open another Ruby file as Ruby code using require, so its methods and classes become available after loading.
Explore loading local Ruby files with require_relative, call a hello method defined in a utilities file, and understand method vs. variable scope and how __FILE__ reveals the running file.
This is the introduction to the Codealong Exercise for this section.
We create a todo note collector which writes to a file.
Master ruby by writing a csv file from terminal input and saving the data to a file, such as Bob 18, Alice 20, Ted 19.
We begin our journey with Object-Oriented Programming by learning about Classes
We learn about Objects and how they are different from Classes
We take a look at the Ruby techniques for instantiating objects from classes.
In this video we go through the displaying of Objects and how it can be customized
This is an introduction to object comparison, and implementing custom equality methods.
We find out what the term "Duck Typing" means, where it comes from, and what it looks like in Ruby.
We review methods belonging to objects, and learn a surprising thing about all methods in Ruby.
In this video, we explore the very important Object-Oriented concept of inheritance.
We learn about overriding methods on Objects.
We review the use of attributes on objects and different ways of adding attribute functionality in Ruby
We go over Class Methods and how they are different from Instance Methods and have a different use in Object-Oriented Programming.
We take a closer look at something very powerful in Ruby - Modules
In this video, we learn about how we can include Modules in our classes from other files, and how the different ways of loading in module code have different purposes.
We take a look at the difference between inheritance and composition in Object-Oriented Programming, and how the two can be used to great effect in Ruby
This is the introduction to the Codealong Exercise for this section.
Codealong exercise demonstrates building a Ruby shape calculator that computes areas for circle, square, and rectangle using inheritance from a base Shape and quadrilateral concepts, with radius and side inputs.
Practice object oriented programming in Ruby by creating a student object with first and last name attributes and a print full name method.
Explore binary trees as ordered data structures with a root node and left and right branches, enabling fast searches and scalable O(log n) performance in Ruby.
We will take a look at how to implement a binary tree using classes and recursion in Ruby
The source code is available in a PDF file and a Ruby file in the Resources section for this video
Learn model classes in Ruby by building a person model with first and last name, adding behavior like walk and talk, and persisting data with create, read, update, delete.
Explore domain modeling by translating real-world concepts into domain models and model classes, using a health insurance plan to illustrate interactions among payer, provider, and patients. Engage with domain driven design and the domain layer to build software that accurately represents complex business rules and relationships.
Define a Ruby validator method is_valid? on a person domain object that returns true when first_name and last_name are not nil and non-empty, ensuring a valid state before saving.
learn how serialization translates an object into a storable csb format to save and later recreate a person record, including first name, last name, employee id, age, and position.
Learn to implement a to_csv method that converts a Ruby object into a CSV representation by extracting attributes (first name, last name), generating a CSV line, and enabling persistence.
learn the crud concept—create, read, update, delete— and how to store, read, update, and delete a business object like a person in a file, a foundation for crud apps.
Save a person record to one per-employee file by opening the file in write mode and writing the first and last name, using a unique id in the filename.
Generate a unique four-digit id for each person on initialization using rand 1000 to 9999, add id to the saved filename, and reduce the initialize method to a one-line form.
Learn to read person records from a file in ruby by implementing a class method read that loads a CSV record and constructs a new person instance.
Implement the update method for the Ruby object file store, validating file existence, saving internal state, and supporting create, read, and update CRUD operations via class and instance methods.
Implement the destroy operation in a Ruby file-based CRUD system by deleting a file when it exists, returning true or false, and validating the create, read, update, and destroy lifecycle.
Refactor Ruby models to validate attributes, conditionally save only when valid, and map objects to files with CRUD, tests, and callback-type functionality—demonstrating object mapping.
This is the introduction to the Codealong Exercise for this section.
Build a Ruby directory entry class with name, position, and active fields, save entries to a file in append mode, and list entries by reading and formatting the stored data.
Extend the student object from the previous assignment by adding a Save method to write to a file, using the stubbed student.rb and provided run instructions and CSP example.
Explore how modeling and demand modeling translate real-world domains into digital representations, and how algorithms turn problems into a code solution for daily life.
Explore how to model a car shopping problem by evaluating make, model, year, ratings, and price, and build a program that checks the website to find best match, saving time.
Preview a solution to automate car shopping by extracting data from a car listings site and saving relevant results to a JSON file.
Set up a Ruby project in the terminal, create car_shop.rb with a car_shopper function, call it, and run a development loop to test output for the next video.
Learn to use Ruby gems to fetch data from a mock car site with HTTP requests, install and require the gem, and build a local collection of cars.
Fetch a web page with a get request using a Ruby gem, and inspect the response body. Prepare to parse car data with another gem in the next steps.
Learn to parse an html response into ruby objects with the no go geary gem, install it, and extract car listings using a csx query selector.
Explore how to locate car listings on a webpage using css selectors, targeting elements with class car, card, price, and year, and extract name, star rating, and data rating attributes.
Explore pretty printing in Ruby by using the built-in pretty print to examine a car listings object, verify collection length, and extract structured attributes from nested objects.
In Ruby, extract data from a car listings object by iterating with each through eight cars, using CSX to select make and year, retrieve text, and assemble a new collection.
Continue extracting car data with a loop, building a hash of name, year, price, and rating from the data-rating attribute, and prepare to store results as JSON.
Convert scraped car data to json and save it to a file with Ruby, overwriting on each run for easy transfer and later viewing.
Install and use Adam beautify to format JSON for clearer viewing; compare non beautified vs beautified output, run it to cast values to correct types, and save changes.
Create a convert_price method to remove the dollar sign and comma with gsub, then convert to integer for prices in the JSON and enable filters by price, rating, and year.
Filter car listings by price under 30,000, year newer than 2014, and rating above 3 using in-place select on an array of hashes, then write results to a json file.
Learn to manage Ruby dependencies with Bundler, create a Gemfile, run bundle install, and lock exact versions in Gemfile.lock for reproducible setups.
Explore how ruby gems work, from browsing ruby gems dot org and gem specs to versioning, licenses, dependencies, and the role of lib files in a gem’s structure.
Build a flexible Ruby log parser to perform data engineering tasks such as pattern matching, data sanitization, and transformation across multiple input files and access logs, producing new data structures.
Explore data pipeline engineering by organizing a csv and an access log with timestamps in a project data folder to analyze web server traffic.
Learn to build a Ruby log parser by creating a log_parser file, opening a log for reading with a dynamic file name, and printing the contents.
Learn to parse an access log for analytics by reading lines, filtering sign-up events, matching emails to users, and extracting user agent details for analysis.
Map sign up log lines to extract the user agent string and email, building a user data structure and using a dictionary to identify browsers like Firefox, Chrome, and Opera.
Determine browsers by parsing user agent strings with Ruby: build a pass_log and a determine_browser, identify Firefox, Chrome, Safari, or other, and assemble email with browser data.
Extract emails from server logs in Ruby by parsing a user agent string, applying regular expressions and match data captures, and assembling a user data structure with browser and email.
Implement a cross_reference method to load and combine user data from the CSB file, require CSC, and sanitize entries with placeholders for missing names, preparing data for email matching.
Clean and normalize cross-referenced user data by updating the users array in place with map!, filling missing fields with unknowns, and preparing data for log comparison.
Cross-reference log lines with user data to build a hash containing first name, last name, and email. Extract browser from log lines to enrich user data in a data pipeline.
This lecture demonstrates building a flexible data pipeline for access logs by decoupling file discovery from processing, using pattern matching to load each file and output formatted results.
Become a programmer with Ruby and learn one of the most fundamental skills in any industry - today and the future.
This is the most comprehensive course for learning how to program using the Ruby programming language. Why did we choose Ruby to teach programming? Not only is Ruby one of the easiest programming languages to get started with, but it is also extremely powerful and provides tools for learning and using all the fundamentals of programming that can be used in any language - with its own flair for programmer happiness. Whether you are a complete beginner or already know the basics but want to know and apply advanced concepts in programming like OOP, automation using web scraping, data engineering and algorithms built from scratch - this is the course for you!
Ruby is also the programming language behind Ruby on Rails which is one of the most popular and in-demand web development frameworks, with the highest paying jobs in the world today.
This course will teach Ruby, and programming in general, in a practical manner - you will be presented with concepts in screencast videos which you can code along with; followed by quizzes and coding exercises to test your understanding; along with programming assignments which will bring it all together to seal your knowledge. We go over the practical details of programming, issues that programmers face daily and build up your understanding in an efficient way. And with unlimited access - you can learn at your own pace!
By the end of this course, you will be able to write complete programs that can take input from users, build interactive menus, interact with formatted data files, automate life tasks like car shopping online using web scraping and engineering complex data from web server logs to your own specifications, among many other skills!
We will cover a wide variety of topics, including:
Installing Ruby - Mac, Windows and Linux
Command Line basics
Ruby basics
Basic data structures - Strings, Ints, Floats and more
Compound data structures - Arrays, Hashes and more
Algorithms and implementation - Sorting, Binary Search Trees and more!
Print Formatting
Methods
Built-in methods
Debugging and Error Handling
Object Oriented Programming concepts
- Classes, Inheritance, Polymorphism, Modules
File I/O in-depth
Web scraping
Automation of daily life tasks (car shopping online as an example)
Data Engineering - project with web server logs
Ruby specific methods
and much more!
You will get lifetime access to all the videos, text lectures, code repos, assignments and more!
This course comes with a 30 day money back guarantee! If you are not satisfied in any way, you'll get your money back.
So what are you waiting for? Get going with the Complete Ruby Programmer and introduce fun into learning an advanced, on-demand skill!