
Download and install tools to set up a Ruby development environment, then learn basics like strings, variables, and user input, before diving into arrays, hashes, loops, fizzbuzz, methods, and classes.
Check out my student Facebook Group...
It's a great place to get fast support for this course from me, to interact with other students, to post your projects and code, and to access course announcements and extras...
Join Now!
https://www.facebook.com/groups/codemycom/
Install the Ruby programming language on Windows using the official rubyinstaller.org package, optionally with the dev kit, and add ruby executables to your path while associating rb files.
Verify ruby installation and then set up a text editor and terminal to create hello.rb, save it in a project folder, and run ruby hello.rb to print 'Hello world'.
Explore how puts and print control Ruby output, with puts adding a new line and print staying on one line, and introduce strings and numbers as data types.
Explore string manipulation in Ruby by treating strings as objects in object oriented programming and applying methods with dot notation, including downcase, capitalize, reverse, and length.
Explore variables in Ruby as simple buckets you can name and reuse to store data, including strings and numbers. Follow readability with lowercase underscores and remember classes use uppercase.
Learn how to capture user input in Ruby using gets, print, and puts; apply interpolation to display the name and use chomp to remove trailing newlines.
Sometimes Git Bash has issues with gets... to get around them, run your program like this:
winpty ruby program_name.rb
Learn how gets returns a string and convert input to an integer with to_i, then perform arithmetic and interpolation on the result in Ruby.
Explore comparison operators in Ruby, comparing numbers and strings to evaluate equal, not equal, greater than, less than, and inclusive forms, returning booleans.
Master assignment operators in Ruby by assigning values with = and updating variables using +=, -=, *=, /=, and other math operators; learn to increment counters and reuse updated values.
Explore if/else conditional statements in Ruby, using comparison operators and user input to branch actions. Learn to use else if, equals comparisons, and apply these concepts to numbers and strings.
Explore arrays as containers that hold multiple values, using zero-based indices to access items, check length, and retrieve last items; learn about multi-dimensional arrays and printing elements.
Explore while loops in Ruby by building a counter, looping while the condition is true, printing numbers 1 through 9, and avoiding infinite loops with proper increment.
Learn how to use the each loop to iterate over ranges and arrays in Ruby, printing numbers and names with a block and puts, and understand naming conventions like underscores.
Explore hashes in Ruby, comparing them to arrays, using keys and values with the hash rocket and square-bracket access to retrieve data like John's pizza preference.
Learn to build fizz buzz in Ruby by looping 1 to 100 and using modulus with if/elsif to print fizz, buzz, or fizz buzz.
Define and call Ruby methods, pass information into methods, and use variables and interpolation to control program flow.
Explore methods in Ruby, defining with multiple parameters, passing variables, and handling argument counts. Learn returning values, storing output, and transforming results with downcase and upcase.
Explore Ruby classes as blueprints that produce objects, and learn to navigate the Ruby core docs and the Ruby API to discover string and array methods.
Define a Ruby class with a capitalized name, implement initialize to accept a side_length and store it in an instance variable, then inspect the square object.
Define and use a getter to retrieve a square's side length from its class, returning the stored value. See how object oriented programming exposes data through methods in Ruby.
Ruby programming for everyone guides adding perimeter and area methods to a square class, computing perimeter as four times the side and area as side squared, with a two_s report.
Explore how Ruby's attr_accessor automates getters and setters, reducing boilerplate for multiple attributes in a class, demonstrated by a square's side length and a simple test.
Learn to implement a ruby draw method that prints a square of asterisks using a side length, a loop, and string multiplication inside a class illustrating object oriented programming.
Unlock lifetime access to 60 plus courses with a one-time $49 membership. Enjoy a 30-day money-back guarantee, progress, a certificate of completion, and a book library with a Facebook group.
In this course we'll learn the Ruby programming language from an absolute Beginner level all the way to Advanced in no time at all!
This course is aimed at the absolute beginner, you don't need any coding experience at all!
We'll start out by setting up a development environment that has all the tools you need to start writing and running Ruby code.
Then, we'll dive into very basic computer science concepts. Things like:
Printing to the Screen
String Manipulation
Variables
Getting User Input
Simple Math
Comparison Operators
Assignment Operators
After that, we'll move into more intermediate topics like:
Conditional If/Else Statements
Arrays
While Loops
Each Loops
Hashes
Fizzbuzz
Finally we'll finish up with more advanced topics like:
Methods
Classes
Ruby is one of the greatest programming languages to learn, and learning has never been this easy!
I'll see you on the inside!
-John Elder