Skip to content

Instantly share code, notes, and snippets.

@nmcolome
Forked from mbburch/prework.md
Last active February 14, 2017 07:06
Show Gist options
  • Save nmcolome/37bf0b8c2737bf5c45ccfdb322e90f9b to your computer and use it in GitHub Desktop.
Save nmcolome/37bf0b8c2737bf5c45ccfdb322e90f9b to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

Turing School Prework - Natalia

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

Task D- Set up your Environment:

  • Did you run into any issues? No
  • How do you open VS Code from your Terminal? by typing "code" (after installing the command)
  • What is the file extension for a Ruby file? .rb
  • What is the VS Code shortcut for hiding/ showing your file tree view? shift+cmd+E
  • What is the VS Code shortcut for quickly finding a file (fuzzy finder)? shift+cmd+F

Task E- The Command Line:

  • screenshots of your terminal after each exercise will be posted in comments DONE

Day One Questions:

  • What does pwd stand for, and how is this command helpful? it stands for present working directory, and it tells me the pathway of the directory I'm currently working on.
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? prints the name of the current host system, mine shows Natalias-MacBook-Pro.local

Task F- Learn Ruby:

Option 1 Questions:

IRB

  • How do you start and stop irb? to start in the terminal>> typing irb; to stop it>> typing quit
  • What might you use irb for? to experiment and find out how certain language features work.

Variables

  • How do you create a variable? typing a name variable, then "=", then a value
  • What did you learn about the rules for naming variables? the convention is to use lowercase and underscores for multiple words and they must start with letters but can contain numbers. Ruby does not accept names starting with numbers, containing only numbers nor containing dashes.
  • How do you change the value of a variable? by typing the name of the variable we want to change, then "=", then assign the new variable value

Datatypes

  • How can you find out the class of a variable? using the method .class
  • What are two string methods? .upcase; .length
  • How can you change an integer to a string? using .to_s

Strings

  • Why might you use double quotes instead of single quotes in Ruby? When I want to interpolate #{} and/or use escape characters.
  • What is this used for in Ruby: #{}? it lets you embed a Ruby statement in another string (interpolate).
  • How would you remove all the vowels from a string? 'string'.delete('aeiou')

Input & Output

  • What do 'print' and 'puts' do in Ruby? Both print information to the user of my program; the difference is 'puts' adds a line after printing it.
  • What does 'gets' do in Ruby? It pauses my program and waits for the user to type something and hit the enter key. It then returns the value back to my program 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". DONE

Numbers & Arithmetic

  • What is the difference between integers and floats? Integers are whole numbers and floats are decimals.
  • 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? .include? .empty?

Conditionals

  • What is flow control? is to select different outcomes depending on the information the user types, the result of computation, or the value returned by another part of 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? An infinite loop is when a loop runs forever because there is nothing that makes the while condition false; we can get out of one by typing ctrl + c.
  • 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? it means "nothing", that a variable is empty or that a function didn't return a value.
  • Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "nil". DONE

Symbols

  • How can symbols be beneficial in Ruby? They help use use memory more efficiently.
  • Does naming symbols use the same rules for naming variables? no, the first character of a symbol must be ":".
  • Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "Symbols". DONE

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 a new element to the end of the array; 'pop' removes (and returns) the element at the end of the array

Hashes

  • Describe some differences between arrays and hashes. Arrays store elements, while hashes store keys and values; with arrays, we access elements by their index (position), while with hashes we access elements by their key.
  • What is a case when you might prefer an array? What is a case when you might prefer a hash? Array: when I just need a list of similar elements (group of objects in a set); Hash: when I want to list different properties (for showing relationship between a pair of objects).
    • Take a screenshot of your terminal after working through Step 2, and post it in the comments with the title, "Hashes". DONE

Task G- Prework Reflection:

  • Were you able to get through the work? Did you rush to finish, or take your time? I took my time
  • What are you most looking forward to learning more about? on doing more real-world projects
  • What topics would you most like to see reinforced by instructors? procs, lambdas and 'yield'
  • What is most confusing to you about what you've learned? procs, lambdas and 'yield'
  • What questions do you have for your student mentor or for your instructors? None for the moment, I would just like a more in-depth look.

Pre-work Tasks- One Month Schedule

(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.)

Railsbridge Curriculum, cont.

  • Loops: Take a screenshot of your "Challenge" program, and post it as a comment in your Gist. DONE
  • What challenges did you try for "Summary: Basics"? Post a screenshot of one of your programs. DONE
  • Functions: How do you call a function and store the result in a variable? To call a function, first you type the name of the function and then enter the values the function needs. To store the result in a variable, you have to write the name of the variable, then "=", then the function.
  • Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables. The initialize method saves the initial data of the new class. The new method is to create a new instance of my new object (class). And instance variables are the way we store data in an 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.

Launch School Ruby Book

  • screenshots will be posted in comments
  • What are your three biggest takeaways from working through this book?

CodeSchool

  • 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?

Workflow Video

  • 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?

Michael Hartl's Command Line Book

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"?
@nmcolome
Copy link
Author

Task A- Screenshot of my typing scores on Jan. 30th

task a 2017-01-30 5 39 pm

@nmcolome
Copy link
Author

Task D - Installed versions of Ruby, RVM, and Git
task d

@nmcolome
Copy link
Author

nmcolome commented Feb 14, 2017

Task F - Learn Ruby: Input & Output - IO.rb
io screenshot

@nmcolome
Copy link
Author

Task F - Learn Ruby: Numbers & Arithmetic - numbers.rb
numbers screenshot

@nmcolome
Copy link
Author

nmcolome commented Feb 14, 2017

Task F - Learn Ruby: Conditionals - conditionals.rb
conditionals

@nmcolome
Copy link
Author

Task F - Learn Ruby: nil
nil

@nmcolome
Copy link
Author

Task F - Learn Ruby: Symbols
symbols

@nmcolome
Copy link
Author

Task F - Learn Ruby: Hashes
hashes

@nmcolome
Copy link
Author

Railsbridge Curriculum, cont. - Loops
loops

@nmcolome
Copy link
Author

nmcolome commented Feb 14, 2017

Railsbridge Curriculum, cont. - Summary: Basics

  • Write a program that plays back the message a user supplied.

program

@nmcolome
Copy link
Author

Task A- Screenshot of my typing scores on Feb. 8th
screen shot 2017-02-08 at 6 45 36 pm

@nmcolome
Copy link
Author

Task E- The Command Line
screen shot 2017-02-14 at 1 05 45 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment