
Dive: Coder - Ruby
Description: Knows how to code using Ruby
Level: Level 1
Level Requirements: Can code in Ruby at a basic level
Certified On:
Aug 11, 2020
Editor’s Note: On all dive certifications, we try to edit the writing as little as possible to preserve authenticity, personality, and writing style. We typically fix spelling errors, but minimally modify grammar and sentence structure (just enough to ensure readability).

Name: Susan Gessing Break Diving Level: Recruit Number of Certified Dives: 3 From: United States In: United States
1. When and Why Did You Decide to Pursue This Dive At This Level? What was your inspiration and motivation?
Until now, I’ve been studying other topics from my list (HTML, CSS, Javascript mostly). Learning Ruby in the Break Diving environment as a requirement to join their coding team was a great incentive to not put it off any longer.
2. How Long Did It Take For You To Accomplish This Dive At This Level From The Day You Decided To Pursue It, And Why Did It Take That Long?
3. What Was The Hardest Part About Achieving This Particular Dive Level?
4. What Was The Easiest Part About Achieving This Particular Dive Level?
5. What Is Your Advice For Someone Who Is Pursuing This Dive And Level?
The good news is that all programming languages deal with these concepts, just in different ways, so learn them once, and you’ll have them available to you. Also, any good tutorial will mention and explain most of them.
6. What Are Some Of The Best Resources You Recommend to Those Pursuing This Dive At This Level, And Why Do You Recommend Them? Please Include Relevant Weblinks, If Applicable.
- The Break Diving Ruby handbook is a good place for getting started.
-
Learn Ruby is good for the very basics. -
Codecademy is another great place to learn Ruby. -
The Codecademy cheatsheet is a great place from which to take notes on the various components of the language.
Resource 1: Break Diving - Come join this amazing community.
Resource 2: Learn Ruby Online - Learning the basics.
7. Tell Us A Story Of One Of Your Adventures While Pursuing This Dive (At This Level).
I discovered the following EXACT similarities:
Variables in Ruby are strings, numbers, and booleans. Ex. myvar = "hello"
Math in Ruby is performed with the usual operators: +, -, /, *, **, %. Ex. 5 * 2 would give 10.
Logical operators in Ruby are && for “and”, || for “or” and == for “equals”.
Arrays in Ruby folow the usual convention with []’s Ex myArray = [1, 2, 3]
Arrays in Ruby have many helpful methods such as .each, .join, .sort, .select, etc
Strings in Ruby have many helpful methods such as .length, .reverse, .upcase, .downcase
In addition, the following use different actual syntax, but the concepts are the same across all languages (this is some of what I’ve learned so far):
“puts” or “p” or “print” will print the string to the console.
Ex. puts "This will display."
In Ruby, you can use .each for a for loop. The following example would print each name in the names list:
Ex. @names.each do |name|
puts "Hello #{name}!"
end
String interplation in Ruby uses #{variableName}.
Ex. "My name is #{name}."
Fetching user input in Ruby is done using the .gets method. (.chomp removes the extra line that is added after the input.)
Ex.
print "enter a number: "
num = gets.chomp
Ruby has hashes, which are collections of key-value pairs.
Ex.
digits = { "five" => 5, "six" => 6, "nine" => 9 }
Comments in Ruby start with # for one line or “=begin…=end” for more than one.
Ex. =begin Here is a comment =end
If statements in Ruby use if…elsif…else…end.
Ex.
if (num > 50)
print "larger than 50"
elsif (num < 50)
print "smaller than 50"
else
print "IS 50"
end
Blocks in Ruby use do/end or {}
Ex. #In the below, the code between the do/end is the block and the code between the pipes is the parameter to the block.
@colors.each do |color|
puts "The color is… #{color}!"
end
Class variables in Ruby use @@ while instance variables use @ before the name.
Method definitions in Ruby use “def…end”.
Ex. def myMethod
#Code here
end
If a method doesn’t have an explicit return statement, the results of the last executed statement are returned.
Class definitions in Ruby use “class…end”.
Ex. class MyClass
#Code here
end
Classes in Ruby use their initialize methods to initialize the class when created.
To create a new class, use the “new” keyword.
Ex. myClass = MyClass.new()
The attr_accessor, attr_reader, and attr_writer keywords are used to indicate the readability and/or writability of a class variable.
Ex. attr_reader :name
A Proc in Ruby is a block of code assigned to a variable. It can be created with “new” or with the lambda method. .call is used to call either of these.
Ex. procBlock = Proc.new { puts "Proc method!" }
lambdaBlock = lambda { puts "Lambda method!"}
To pass a Proc to a method, use “&”.
To indicate inheritance, “<” is used. “super” will call the initialize method in the parent class.
Ex class Honda < Car #Honda inherits from Car
As I continue my studies in Ruby and go to the next level, I expect I will encounter many more of these adventures!
8. What Evidence Did You Submit to Prove You Met the Requirements for This Dive and Level?
I also have proven my background in general as a computer programmer.
9. Will You Be Pursuing The Next Level For This Dive? If Yes, Why? If Not, Why Not?
10. What is the Break Diver's Creed?
Certificate photo:
And having made this post, and provided adequate evidence to the dive committee, Susan Gessing is now hereby certified by Break Diving, Inc. as: Coder - Ruby - Level 1. Congratulations ! Thank you for being an inspiration to others!

Certificate number: 55
The author above wrote this WYSEguidance post as one of the certification requirements to become certified by Break Diving, Inc. for a dive completed. Would you also like to find greater success, happiness, and friendship, and make genuine supportive connections with others around the world pursuing your same dreams? Come join us at Break Diving and soon your story will be the next one you read about on this site!
