Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Ruby Fundamentals and Basic Programming Concepts

Packt via Coursera

Overview

This Ruby programming course starts by guiding you through the setup on different operating systems, covering macOS and Windows, to build a solid foundation. You will learn command-line navigation, tool installation, and writing your first Ruby code. -The course then dives into the core aspects of Ruby, including object-oriented programming (OOP), teaching you to create and manipulate objects and understand how Ruby’s OOP enhances code reusability and readability. -Essential programming concepts like variables, methods, and control structures are also covered, ensuring a comprehensive understanding of writing efficient Ruby code. -Advanced topics such as predicate methods, blocks, and conditionals are explored in the final sections, enabling you to write complex and functional Ruby programs. -Practical examples and exercises are provided to tackle real-world programming challenges. This course is ideal for aspiring programmers, software developers, and tech enthusiasts, including those with experience in other languages looking to add Ruby to their skill set.

Syllabus

  • Introduction and Installation
    • In this module, we will introduce you to the Ruby programming language, its historical context, and its comparison with other languages. You'll learn how to set up the development environment on macOS and Windows, including installing essential tools like XCode, Homebrew, rbenv, and VSCode. By the end, you'll write and run your first Ruby program using both the Terminal and PowerShell.
  • Getting Started
    • In this module, we will delve into fundamental programming concepts using Ruby. You'll learn about different methods for outputting text, such as 'puts', 'print', and 'p', and how to use escape characters to format strings. We will also cover basic arithmetic operations, string concatenation, and handling exceptions, providing a solid foundation for further Ruby programming.
  • Variables
    • In this module, we will focus on variables in Ruby, teaching you how to declare and use them effectively. You'll learn about variable scope, parallel assignment, and swapping values. We will also introduce constants and cover common exceptions like 'NameError', ensuring you can handle variables confidently in your programs.
  • Object Methods
    • In this module, we will explore object methods in Ruby. You'll learn how to call methods on different objects, chain methods for efficiency, and use the 'inspect' method for debugging. We'll also cover the concept of the 'nil' object, string interpolation, user input with the 'gets' method, and converting objects between types, providing a comprehensive understanding of Ruby object methods.
  • Booleans and Predicate Methods
    • In this module, we will introduce Booleans and predicate methods in Ruby. You'll learn about the equality and inequality operators, mathematical comparisons, and how to use predicate methods that return Boolean values. We will also cover methods with arguments, including handling multiple arguments and specific methods for Float objects, enhancing your ability to write logical and efficient Ruby code.
  • Methods
    • In this module, we will focus on defining and using methods in Ruby. You'll learn how to create methods with parameters, pass arguments, and manipulate these within your methods. We'll discuss the scope of local variables, how to return values explicitly and implicitly, and how to set up optional parameters with default arguments, equipping you with essential skills for creating reusable and modular code.
  • Blocks
    • In this module, we will introduce blocks in Ruby, focusing on their use with methods. You'll learn how to declare block variables and pass data between methods and blocks. We will also cover iteration methods such as 'upto', 'downto', and 'step', enabling you to write concise and powerful loops in your Ruby programs.
  • Conditionals
    • In this module, we will explore conditionals in Ruby, teaching you how to create branching logic with if, elsif, and else statements. You'll learn to combine conditions using logical operators, set precedence with parentheses, and nest if statements for complex logic. We will also cover the case statement and the ternary operator, providing tools to write clean and efficient conditional logic in your Ruby programs.

Taught by

Packt

Reviews

Start your review of Ruby Fundamentals and Basic Programming Concepts

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.