Learn to Code with Ruby

Video description

“Learn to Code with Ruby" is a meticulously crafted educational experience, designed to take you from beginner to proficient in the world of programming. Your learning adventure begins with the basics of installation and configuration on various operating systems, followed by an exploration of Ruby's object-oriented principles.

As you progress, you'll delve into the core of programming with hands-on sessions on variables, data types, and control structures. Our approach is to build your skills progressively, ensuring that each concept is understood profoundly before moving to the next. The course is designed to simulate a real-world coding environment, with practical exercises that encourage problem-solving and critical thinking.

Beyond the syntax and semantics, we emphasize why programming is a critical skill in today's technology-driven landscape. Ruby not only opens doors to software development but also lays a strong foundation for web development with Ruby on Rails. As you move through the course, you'll experience the satisfaction of creating functional code that evolves with complexity. By the end of your journey, you'll be well-equipped with the knowledge and skills to tackle real-world programming challenges with confidence and creativity. Please refer to the GH repository for all course files and codes.

What you will learn

  • Install and configure Ruby on Mac OS and Windows
  • Understand basic programming concepts like variables, arithmetic, and output
  • Manipulate strings, numbers, and Booleans in Ruby
  • Work with Ruby collections such as ranges, arrays, and hashes
  • Implement blocks, procs, and lambdas
  • Master object-oriented programming with classes, modules, and inheritance

Audience

This course is ideal for novice programmers seeking an introduction to an easy, user-friendly programming language, as well as for intermediate coders eager to delve deeper into Ruby. It's also perfectly suited for web developers looking to understand the underlying principles of Ruby on Rails.

About the Author

Boris Paskhaver: Boris Paskhaver is a New York City-based software engineer, author, and Udemy instructor with a unique journey into tech. Graduating from NYU in 2013 with a degree in Business Economics and Marketing, he initially worked in various roles, including business analyst and data analyst, at several companies. His coding journey began accidentally while building projects with Python and JavaScript, leading him to passionately pursue programming. Without formal computer science education, Boris completed App Academy's full-stack web development bootcamp, diving headfirst into web development. As an instructor, Boris focuses on creating comprehensive, easy-to-understand courses, addressing the challenges he faced learning to code. He's driven by the intersection of technology and education, aiming to make programming accessible to all. Boris brings this passion to his teaching, helping others unlock the potential of coding.

Table of contents

  1. Chapter 1 : Introduction and Installation
    1. Welcome to Ruby
    2. Object-Oriented Programming
    3. macOS - Access and Work with the Terminal
    4. macOS - Install XCode Command Line Tools
    5. macOS - Install Homebrew
    6. macOS - Install rbenv
    7. macOS - Install Ruby
    8. macOS - Install VSCode Text Editor
    9. Windows - Access and Work with PowerShell
    10. Windows - Figure Out if System is 32-bit or 64-bit
    11. Windows - Install Ruby
    12. Windows - Install VSCode Text Editor
    13. Install VSCode Extensions
    14. Write First Ruby File and Run with Code Runner
    15. Write First Ruby File and Run with Terminal or PowerShell
    16. Interactive Ruby (IRB)
    17. Section Review [SLIDES]
  2. Chapter 2 : Getting Started
    1. The puts Method
    2. Escape Characters
    3. The print Method
    4. The p Method
    5. Comments
    6. Multiline Comments
    7. Integers and Floating Point Numbers
    8. Basic Arithmetic in Ruby
    9. String Concatenation
    10. Intro to Exceptions: TypeError
    11. Section Review [SLIDES]
  3. Chapter 3 : Variables
    1. Variables [SLIDES]
    2. Declaring Variables
    3. Exceptions: NameError
    4. Parallel Variable Assignment
    5. Swapping Variable Values
    6. Assignment Shortcuts
    7. Constants
    8. Section Review [SLIDES]
  4. Chapter 4 : Object Methods
    1. Intro to Object Methods
    2. Integer Methods
    3. Exceptions: NoMethodError
    4. Method Chaining
    5. The inspect Method
    6. The nil Object
    7. String Interpolation
    8. The gets Method
    9. The class Method
    10. Methods to Convert Objects
    11. Section Review [SLIDES]
  5. Chapter 5 : Booleans and Predicate Methods
    1. Intro to Booleans
    2. The Equality Operator
    3. The Inequality Operator
    4. Mathematical Comparisons
    5. Predicate Methods
    6. Methods with Arguments (include?)
    7. Methods with Multiple Arguments
    8. Arithmetic Methods
    9. Float Methods
    10. Section Review [SLIDES]
  6. Chapter 6 : Methods
    1. Intro to Methods
    2. Parameters and Arguments
    3. Multiple Method Parameters
    4. Manipulating Arguments
    5. Local Variables
    6. Return Values I
    7. Return Values II: Implicit Return Values
    8. Optional Parameters and Default Arguments
    9. Section Review [SLIDES]
  7. Chapter 7 : Blocks
    1. Introduction to Blocks with the times Method
    2. Block Variables
    3. The upto and downto Methods
    4. The step Method
    5. Section Review [SLIDES]
  8. Chapter 8 : Conditionals
    1. The if Statement
    2. Predicate Methods in if Statements
    3. Truthiness and Falsiness
    4. if and elsif
    5. if and else
    6. Multiple Conditions with And Operator ()
    7. Multiple Conditions with Or Operator (||)
    8. Parentheses Precedence
    9. Nested if Statements
    10. Ternary Operator
    11. Call A Method from Another Method
    12. The case Statement
    13. The unless Keyword
    14. Statement Modifiers
    15. Conditional Assignment Operator
    16. Section Review [SLIDES]
  9. Chapter 9 : Strings I
    1. Single Quotes vs Double Quotes
    2. Multiline Strings
    3. String Comparisons
    4. String Concatenation Options
    5. The length and size Methods
    6. Intro to Index Positions
    7. Extract Multiple Characters from a String
    8. Overwrite Characters in String
    9. The insert Method
    10. The empty? and nil? Methods
    11. Case Methods
    12. The reverse Method
    13. Bang Methods on Strings
    14. Section Review [SLIDES]
  10. Chapter 10 : Loops
    1. The while Loop
    2. The until Loop
    3. FizzBuzz Problem
    4. FizzBuzz Solution
    5. The next Keyword
    6. The break keyword
    7. Recursion I
    8. Recursion II
    9. Section Review [SLIDES]
  11. Chapter 11 : Debugging
    1. The debugger and binding.break Methods
    2. The step Keyword
    3. The info Keyword
    4. Section Review [SLIDES]
  12. Chapter 12 : Arrays I: Creation and Access
    1. Introduction to Arrays
    2. Nested Arrays
    3. Shorthand %w Syntax to Create An Array of Strings
    4. Access and Overwrite Array Element by Index Position
    5. Access Single Array Element with the fetch Method
    6. Access and Overwrite Multiple Array Elements with Bracket Syntax
    7. Access Multiple Array Elements with the values_at Method
    8. The first and last Methods
    9. The length, size, and count Methods
    10. The empty? and nil? Methods
    11. Equality and Inequality Operators with Arrays
    12. The Spaceship Operator
    13. The push Method and Shovel Operator
    14. The insert Method
    15. The pop Method
    16. The shift and unshift Methods
    17. Section Review [SLIDES]
  13. Chapter 13 : Ranges
    1. Intro to Ranges
    2. Alphabetical Ranges
    3. The include? and member? Method on Ranges
    4. Random Numbers in Ruby (rand Method)
    5. Extract Multiple Characters or Elements
    6. The case Statement with Ranges
    7. Convert Ranges to Arrays with to_a Method
    8. Section Review [SLIDES]
  14. Chapter 14 : Arrays II: Iteration and Various Methods
    1. The each Method
    2. Filtering with the each Method
    3. each within each
    4. The for Loop
    5. The each_with_index Method
    6. Iteration over Array with while or until Loops
    7. The map and collect Methods
    8. The select and reject Methods
    9. The partition Method
    10. The any? and all? Methods
    11. The find and detect Mthods
    12. The index and find_index Methods
    13. The include? Method
    14. The max and min Methods
    15. Unlimited Method Arguments/Splat Argument
    16. Section Review [SLIDES]
  15. Chapter 15 : Strings II
    1. The split Method on a String
    2. The chars and each_char Methods
    3. The join Method on an Array
    4. The count Method on a String
    5. The index and rindex Methods
    6. The delete Method
    7. Section Review [SLIDES]
  16. Chapter 16 : Object References and Copies
    1. Object References
    2. The dup and clone Methods
    3. The freeze Method
    4. Passing Objects to Mutating Methods
  17. Chapter 17 : Hashes I
    1. Intro to Hashes
    2. Populate Hash and Extract Values from Keys
    3. Intro to Symbols
    4. Symbols as Hash Keys
    5. Ruby 3.1 Shorthand Hash Syntax
    6. Add a New Key-Value Pair to Hash
    7. Iterating over a Hash
    8. Check for Inclusion in a Hash
    9. The select and reject Methods on a Hash
    10. Convert Hash to Array and Vice Versa
    11. The delete Method
    12. The merge Method
    13. Create Hash with Default Value (Hash.new)
    14. Reference Problems with Hash.new
    15. Section Review [SLIDES]
  18. Chapter 18 : Arrays III: Bonus Methods
    1. The reverse Method
    2. The sort Method
    3. The uniq Method
    4. The compact Method
    5. The inject and reduce Methods
    6. The flatten Method
    7. The sample Method
    8. Multiply an Array with an Asterisk
    9. Merge Arrays and Exclude Duplicates
    10. Remove Array Items that Exist in Another Array
    11. Array Intersection with the Ampersand Symbol
    12. Section Review [SLIDES]
  19. Chapter 19 : Blocks, Procs, and Lambdas
    1. Review of Blocks
    2. The yield Keyword
    3. Block Return Values
    4. The block_given? Method
    5. Block Parameters
    6. A Custom each Method
    7. Procs
    8. More Proc Examples
    9. Methods with Proc Parameters
    10. Intro to Lambdas
    11. Differences between Lambdas and Procs
    12. Section Review [SLIDES]
  20. Chapter 20 : Classes I: The Basics
    1. Intro to Classes
    2. Create a Class
    3. The new Method on Ruby's Native Objects
    4. Instance Variables and the initialize Method
    5. Instance Methods
    6. Override the to_s Method
    7. The self Keyword
    8. Omitting the self Keyword
    9. Getter Methods (Read Methods)
    10. Setter Methods (Write Methods)
    11. The attr_reader and attr_writer Methods
    12. The attr_accessor Method
    13. Add Parameters to initialize Method
    14. Section Review [SLIDES]
  21. Chapter 21 : Classes II
    1. Private Methods
    2. Protected Methods
    3. Add Validation to Setter Methods
    4. Derived Values
    5. Class Methods
    6. Alternative Class Method Syntax
    7. Class Variables
    8. Building a Class Over Time
    9. Monkey Patching
    10. Section Review [SLIDES]
  22. Chapter 22 : Keyword Arguments
    1. Hash as initialize Argument
    2. Required Keyword Arguments
    3. Optional Keyword Arguments
    4. Positional Arguments and Keyword Arguments
    5. New Version of Candidate Class with Keyword Arguments
    6. Section Review [SLIDES]
  23. Chapter 23 : Classes III: Inheritance
    1. Intro to Inheritance [SLIDES]
    2. Create Subclasses
    3. The superclass and ancestors Class Methods
    4. Check Inheritance Hierarchy of our Subclasses
    5. The is_a? and instance_of? Methods
    6. The methods Method
    7. Exclusive Instance Methods in Subclasses
    8. Override Methods in a Subclass
    9. The super Keyword I
    10. The super Keyword II
    11. Defining Equality
    12. Duck Typing
    13. Section Review [SLIDES]
  24. Chapter 24 : Input and Output
    1. Read from a Text File
    2. Write to a Text File
    3. Rename and Delete a File
    4. Command Line Arguments (ARGV)
    5. Load A Ruby File with load Method
    6. The require and require_relative Methods
    7. Section Review [SLIDES]
  25. Chapter 25 : Modules and Mixins
    1. Intro to Modules
    2. Modules with Identical Methods
    3. Import Modules into the Current File
    4. The Math Module
    5. The uri and net/http Modules
    6. The Enumerable Mixin
    7. The Comparable Mixin
    8. Mixing in Our Own Module
    9. The ancestors Method in Depth
    10. The prepend Keyword
    11. The extend Keyword
    12. Mixing in Multiple Modules
    13. Multiple Declarations for the Same Module
    14. Modules within Modules
    15. Section Review [SLIDES]
  26. Chapter 26 : Sets
    1. Intro to Sets
    2. Add and Delete Items from Set
    3. Explore set.rb on GitHub
    4. Section Review [SLIDES]
  27. Chapter 27 : Datetimes
    1. The Date Object
    2. The Time Object
    3. Add or Subtract Time
    4. The Comparable Methods on a Time Object
    5. Convert Time Object to Formatted String
    6. The parse and strptime Methods
    7. Section Review [SLIDES]
  28. Chapter 28 : Regular Expressions
    1. Intro to Regular Expressions
    2. The scan Method
    3. The Digit Symbol
    4. The Wildcard Symbol
    5. Anchors
    6. Exclude Characters
    7. The sub and gsub Methods with Regular Expressions
    8. Rubular.com
    9. Section Review [SLIDES]
  29. Chapter 29 : Exceptions
    1. The begin and rescue Keywords
    2. Catching Error Object
    3. The retry Keyword
    4. The ensure Keyword
    5. Using begin and rescue at Top Level
    6. The raise Keyword
    7. Custom Exceptions
    8. Section Review [SLIDES]
  30. Chapter 30 : Testing with Minitest
    1. Intro to Testing
    2. Testing a Class
    3. The setup and teardown Methods
    4. Assert Inclusion
    5. Assert Error was Raised
    6. Final Argument to Assertion Methods
    7. Section Review [SLIDES]
  31. Chapter 31 : Reading and Writing Documentation
    1. Reading Documentation
    2. Use RDoc to Generate Documentation
  32. Chapter 32 : Gems
    1. Intro to Ruby Gems
    2. Updating Gem Program
    3. Installing Faker Gem
    4. Use Faker Gem
  33. Chapter 33 : Conclusion
    1. Conclusion

Product information

  • Title: Learn to Code with Ruby
  • Author(s): Boris Paskhaver
  • Release date: February 2024
  • Publisher(s): Packt Publishing
  • ISBN: 9781788834063