- screenshots of scores will be posted in comments
- screenshots of completed sections will be posted in comments
- Did you run into any issues? Missed the "Install Shell Commands" bit, but found the answer on Stack Overflow. Had to update my OS too.
- How do you open Atom from your Terminal? atom
- What is the file extension for a Ruby file? .rb
- What is the Atom shortcut for hiding/ showing your file tree view?
command + \
- What is the Atom shortcut for quickly finding a file (fuzzy finder)?
command + t
, alsocommand + p
,but I'm not entirely sure what that does...ok I read the thing and compared it tocommand + b
and now I get it.
- 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? print working directory and it tells you where you are
- What does hostname tell you, and what shows up in YOUR terminal when you type hostname? It's the name of my computer. I thought it would be more complicated and specific. Also I am realizing that I should come up with a naming theme for my devices. Lucindas-MBP
IRB
- How do you start and stop irb? type
irb
, typeexit
- What might you use irb for? testing small bits of Ruby, or experimenting, but not anything you want to save
Variables
- How do you create a variable? set something equal to something like
dalmations = 101
- What did you learn about the rules for naming variables? all letters is ok, all numbers is ok, letters with an underscore is ok, letters with a dash is not ok, numbers in the middle of letters, or at the end of the variable is ok, but a variable can't start with a number
- How do you change the value of a variable? set it equal to something else
Datatypes
- How can you find out the class of a variable?
variable.class
- What are two string methods? :prepend , :slice!
- How can you change an integer to a string?
5.to_s
Strings
- Why might you use double quotes instead of single quotes in Ruby? when you are using string interpolation, maybe I should just use double quotes all the time?
- What is this used for in Ruby: #{}? string interpolation, embedding variables or other Ruby into your string
- How would you remove all the vowels from a string?
"some string".delete('aeiou')
I am surprised it doesn't delete only the string 'aeiou', how could you delete a word?
Input & Output
- What do 'print' and 'puts' do in Ruby?
puts
prints information for the user of the program,prints
is similar, but doesn't make a new line - What does 'gets' do in Ruby?
gets
pauses the program so the user can input a string, and then the program uses it - Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O". done
Numbers & Arithmetic
- What is the difference between integers and floats? integers are whole and floats are decimals (truncated not rounded)
- Complete the challenge, and post a screenshot of your program in the comments with the title, "Numbers". done
Booleans
- What do each of the following symbols mean?
- == equal to
-
= greater than or equal to
- <= less than or equal to
- != not equal to
- && and
- || or
- What are two Ruby methods that return booleans?
.empty?
&&.nil?
Conditionals
- What is flow control? selectively executing code based on values in the program
- 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? and infinite loop occurs when there is no condition that makes the while loop false and your code runs forever
- Take a screenshot of your program and terminal showing two different outputs, and post it in the comments with the title, "Conditionals". done
nil
- What is nil?
- 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?
- Does naming symbols use the same rules for naming variables?
- 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?
- What is the index of pizza in this array: ["pizza", "ice cream", "cauliflower"]?
- What do 'push' and 'pop' do?
Hashes
- Describe some differences between arrays and hashes.
- What is a case when you might prefer an array? What is a case when you might prefer a hash?
-
- 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?The work was fun! I got through most of it and will skim nil, symbols, arrays, and hashes, just so I've seen them before. The first few days took forever, but the last one's weren't so bad. My schedule was complicated by moving and freelance projects, but I'm looking forward to giving school 100%.
- What are you most looking forward to learning more about? So far the things I have built haven't done much. I'm really excited to build something that does something cool.
- What topics would you most like to see reinforced by instructors? computer learning, coding language conventions
- What is most confusing to you about what you've learned? Some of the logic stuff was difficult for me.
- What questions do you have for your student mentor or for your instructors? I am currently wondering if Back-End was the right decision for me, but I think that is mostly first-day jitters.
Day 3
![screen shot 2016-08-30 at 3 14 19 pm](https://cloud.githubusercontent.com/assets/16562801/18109237/0a94d57e-6ec5-11e6-9407-33b0a57a5947.png)
![screen shot 2016-08-30 at 3 15 59 pm](https://cloud.githubusercontent.com/assets/16562801/18109239/0a98c206-6ec5-11e6-821b-1367b6f22291.png)
![screen shot 2016-08-30 at 3 18 27 pm](https://cloud.githubusercontent.com/assets/16562801/18109238/0a9790ac-6ec5-11e6-8497-267d04b6c205.png)
A - typing practice
B - Brilliant Quizzes: Graphs
![screen shot 2016-08-30 at 3 29 15 pm](https://cloud.githubusercontent.com/assets/16562801/18109513/944ae1ea-6ec6-11e6-874b-9cc5cbef1002.png)
E - Codecademy Command Line: Redirecting Input and Output
![screen shot 2016-08-30 at 11 26 02 am](https://cloud.githubusercontent.com/assets/16562801/18102455/7846aeda-6ea7-11e6-9cf7-57337e3d84b5.png)
![screen shot 2016-08-30 at 11 46 20 am](https://cloud.githubusercontent.com/assets/16562801/18102454/78422158-6ea7-11e6-8912-63c31ff880ca.png)
F - Railsbridge Ruby: irb and Running Programs from a File
![screen shot 2016-08-30 at 2 44 15 pm](https://cloud.githubusercontent.com/assets/16562801/18108244/4dc699fe-6ec0-11e6-9482-f8b83e2fd8c0.png)