- screenshots of scores will be posted in comments
- screenshots of completed sections will be posted in comments
- Did you run into any issues? I only ran into typo issues. once I slowed down and retried, everything went successfully.
- How do you open Atom from your Terminal? use the command "atom ."
- What is the file extension for a Ruby file? .rb
- What is the Atom shortcut for hiding/ showing your file tree view? cmd-\
- What is the Atom shortcut for quickly finding a file (fuzzy finder)? cmd-t
- screenshots of your terminal after each exercise will be posted in comments
Day One Questions:
- What does pwd stand for, and how is this command helpful? it stands for present working directory, it lets you know the current directory that Terminal is working in.
- What does hostname tell you, and what shows up in YOUR terminal when you type hostname? hostname tells you the name of your computer. in my case, it was "Zacks-MBP.home".
IRB
- How do you start and stop irb? you start irb by typing 'irb' into Terminal. typing 'exit' will stop irb.
- What might you use irb for? for experimentation and learning ruby.
Variables
- How do you create a variable? you create a variable by declaring the variable name and setting it equal to something.
- What did you learn about the rules for naming variables? variables can't have numbers at the beginning, but can contain numbers in between letters or at the end. all-number variables don't work either. they cannot contain dashes, but can contain underscores.
- How do you change the value of a variable? simply set it equal to another value.
worked up through Variables on day Two.
Datatypes
- How can you find out the class of a variable? by adding '.class' to the end of the variable
- What are two string methods? .to_s and .to_i
- How can you change an integer to a string? by adding '.to_s' to the end of the integer
Strings
- Why might you use double quotes instead of single quotes in Ruby? string interpolation only works with double quotes.
- What is this used for in Ruby: #{}? it's a string interpolation. it is used to embed another ruby statement in a string.
- How would you remove all the vowels from a string? using the method '.delete('aeiou') at the end of the string.
ended here on day Three.
Input & Output
- What do 'print' and 'puts' do in Ruby? print prints the contents of a string. puts does the same thing but also goes to the next line.
- What does 'gets' do in Ruby? gets pauses the execution of the code while you type something, then hit enter, and it returns the string you typed and continues execution.
- Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O".
ended here Day Four.
Numbers & Arithmetic
- What is the difference between integers and floats? floats can have decimal places, but integers are rounded to the nearest whole number.
- Complete the challenge, and post a screenshot of your program in the comments with the title, "Numbers".
Booleans
- What do each of the following symbols mean?
- == equals
-
= greater than or equal to
- <= lesser than or equal to
- != does not equal
- && and
- || or
- What are two Ruby methods that return booleans? .include? and .nil?
Conditionals
- What is flow control? flow control is allowing the computer to make decisions based on the data it is given.
- What will the following code return? 'Not many apples...'
apple_count = 4
if apple_count > 5
puts "Lots of apples!"
else
puts 'Not many apples...'
end
- What is an infinite loop, and how can you get out of one? an infinite loop can happen when you don't specify a way for your loop to complete, so it just keeps on going. pressing ctrl + c in terminal will kill the offending loop.
- Take a screenshot of your program and terminal showing two different outputs, and post it in the comments with the title, "Conditionals".
nil
- What is nil? it means "nothing" or "empty"
- Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "nil".
Symbols
- How can symbols be beneficial in Ruby? they can save memory by referring to one object instead of many separate iterations of the same object.
- Does naming symbols use the same rules for naming variables? yes, they do.
- Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "Symbols".
Arrays
- What method can you call to find out how many elements are in an array? .length
- What is the index of pizza in this array: ["pizza", "ice cream", "cauliflower"]? [0]
- What do 'push' and 'pop' do? .push adds another item to the end of the array, and .pop removes the last item of the array.
ended here "day five". hard to quantify days, though.
Hashes
- Describe some differences between arrays and hashes. Hashes are stored via keys, not indexes as arrays are, as well as each entry being a pair of terms - the key and the value.
- What is a case when you might prefer an array? What is a case when you might prefer a hash? arrays are best for lists of data that don't need clarifying otherwise. hashes seem to work really well for keeping track of specific qualities, like as used in the exercise, the manufacturer of a bicycle.
-
- Take a screenshot of your terminal after working through Step 2, and post it in the comments with the title, "Hashes".
- Were you able to get through the work? Did you rush to finish, or take your time? I didn't feel rushed to et through it. I have FELT urgency in needing to complete it, but actually sitting down to get it done was rather relaxed.
- What are you most looking forward to learning more about? typing is difficult for me as my index finger on my left (dominant) hand is numb from an accident, so I want to really push myself to practice that a lot to improve. I'm also really enjoying the primer on Terminal, and would like to learn more about that. the best though was beginning to write small programs in Atom. really excited to learn all that I can about ruby.
- What topics would you most like to see reinforced by instructors? I'm really interested in learning about ruby's syntax. it seems a lot more relaxed than javascript, from what I've seen so far.
- What is most confusing to you about what you've learned? I haven't really been confused by much so far. I am excited to delve deep into the language, maybe even more so the process of coding.
- What questions do you have for your student mentor or for your instructors? I've talked to my mentor about some of the issues I was having with programming some of the challenges, but they turned out to be easily solvable.
(Note: You will most likely only get to the following sections if you have more than a week for your pre-work. If you are doing the one week pre-work schedule, you may delete this section of the Gist.)
- Loops: Take a screenshot of your "Challenge" program, and post it as a comment in your Gist.
- What challenges did you try for "Summary: Basics"? Post a screenshot of one of your programs.
- Functions: How do you call a function and store the result in a variable? you declare the variable, set it equal to the function with the values needed to complete the function added.
- Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables. initialize saves the initial parameters of your object and sets it up. new creates a new instance of your object. instance variables only exist inside the object.
- How to Write a Program: Screenhero with your student mentor and share your program. Write a bit about what you found most challenging, and most enjoyable, in creating your program.
- screenshots will be posted in comments
- What are your three biggest takeaways from working through this book?
- screenshots will be posted in comments
- What are your two biggest takeaways from working through this tutorial?
- What is one question you have about Git & GitHub?
- Describe your thinking on effective workflow. What shortcuts do you think you'll find most useful? What would you like to learn or practice that will most help you improve your speed and workflow?
As you complete each section, respond to the related questions below (mostly taken directly from the tutorial exercises):
- 1.3: By reading the "man" page for echo, determine the command needed to print out “hello” without the trailing newline. How did you do it?
- 1.4: What do Ctrl-A, Ctrl-E, and Ctrl-U do?
- 1.5: What are the shortcuts for clearing your screen, and exiting your terminal?
- 2.1: What is the "cat" command used for? What is the "diff" command used for?
- 2.2: What command would you use to list all txt files? What command would you use to show all hidden files?
- 3.1: How can you download a file from the internet, using the command line?
- 3.3: Describe two commands you can use in conjunction with "less".
- 3.4: What are two things you can do with "grep"?





































screenshots from day 1 typing: did 3 lessons, but clicked next lesson accidentally on the 2nd one. had 21wpm if I remember correctly.