Skip to content

aneely/ruby-crash-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Crash Course

TL;DR

This project is a collection of Ruby language concepts demonstrated in the context of solving the classic programming exercise "Fizz Buzz". The big idea was to distill the first week of a coding boot camp into a single session that takes people from zero to reading real Ruby code that solves the problem.

FizzBuzz

We write a program that prints out whole numbers in a sequence, from one to some higher number. Whenever it's evenly divisible by 3 print "fizz", by 5 print "buzz", and by both print "fizzbuzz". Otherwise just print the number itself. The numbered files progressively introduce language concepts and the whole thing can be run in a single sitting by an experienced Rubyist discussing the contents.

Instructions

On a system with Ruby installed, you can run the quickstart by typing "ruby main.rb" in a terminal.

The material can be covered by reading and running the numbered files in order. The comments document the concepts involved in the code from each file. An experienced Rubyist leading a workshop provide context and answer questions. The presenter can then circle back to the file in the helper directory and discuss requiring code from other files.

Note

For ease of reading for beginners, classes and modules that are dependencies are grouped in the same files for the most part.

TODO

Topics yet to cover include: structs, metaprogramming, nil, any kind of deep-dive of standard library features, requiring files in depth, and gems/frameworks.

Housekeeping

The code has been tested with Ruby 2.5. This crash-course has been developed by Andrew Neely (@ravinglogic on Twitter and @aneely on Github) with the sponsorship of Flywheel and is licensed under the MIT license. Attribution is appreciated if you find this useful in introducing more people to Ruby.

About

A set of files that demonstrate Ruby language concepts with Fizz Buzz in a single session.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages