Skip to content

Instantly share code, notes, and snippets.

@allindow
Forked from mbburch/prework.md
Last active April 28, 2016 04:42
Show Gist options
  • Save allindow/6a0077f18f91e9f02a7a to your computer and use it in GitHub Desktop.
Save allindow/6a0077f18f91e9f02a7a to your computer and use it in GitHub Desktop.
Angela Lindow's Turing Prework Gist!

Turing School Prework- Angela Lindow

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. CTO at my work had installed Atom and set up Terminal for me, so most of it was already installed. The only issue I ran into was the optional Seeing Is Believing - I'll add a screenshot to the comments. *
  • 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? *cmd-*
  • What is the Atom shortcut for quickly finding a file (fuzzy finder)? cmd-T or cmd-P

Task E- The Command Line:

  • 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. It is helpful when you are switching directories often or moving things around, to use that command and figure out where you are.
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? The name of your computer. Mine is Angelas-Macbook-Air.local

Task F- Learn Ruby:

Option 1 Questions:

IRB 3/30/16

  • How do you start and stop irb? irb to start, exit to stop
  • What might you use irb for? to get the return value of a simple line of code, to find out what class something is or all the methods that can be called on that thing

Variables 3/31/16

  • How do you create a variable? you give it a name and set it equal to (=) a value
  • What did you learn about the rules for naming variables? You can separate words with an underscore or dash. It can have a number in the middle or the end
  • How do you change the value of a variable? You set the variable equal to a new value

Datatypes 4/1/16

  • How can you find out the class of a variable? call .class on the variable
  • What are two string methods? .upcase! and .chomp
  • How can you change an integer to a string? use .to_s

Strings 4/1/16

  • Why might you use double quotes instead of single quotes in Ruby? You need to use double quotes for interpolation.
  • What is this used for in Ruby: #{}? As a place holder for a varialbe
  • How would you remove all the vowels from a string? .delete("aeiou")

Input & Output 4/4/16

  • What do 'print' and 'puts' do in Ruby? they print information on the screen for the user to see
  • What does 'gets' do in Ruby? it makes your program pause and wait for an input from the user then send the input back to your program
  • Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O".

Numbers & Arithmetic 4/4/16

  • What is the difference between integers and floats? integers are whole numbers(fixnum) and floats are numbers with decimals
  • Complete the challenge, and post a screenshot of your program in the comments with the title, "Numbers".

Booleans 4/4/16

  • What do each of the following symbols mean?
    • == is equal to
    • = is greater than or equal to

    • <= is less than or equal to
    • != is not equal too
    • && "and", everything has to be true
    • || "or", at least one thing must be true
  • What are two Ruby methods that return booleans? .follows? and .end_with?

Conditionals 4/7/16

  • What is flow control? A way to make the program make decisions for us by taking it through a series of conditional statements
  • 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? When there is no way to make the "while" condition false, the loop will keep going because it doesn't have a trigger to tell it when to stop looping. You'd have to terminate the program (ctrl+c) to get out of the infinite 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? Nothing, no value
  • 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 are beneficial because they allow variables to point to the same object in multiple places which uses less memory
  • Does naming symbols use the same rules for naming variables? no, symbols can be strings
  • 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 an element to the array, pop removes the last element from the array and also returns it

Hashes

  • Describe some differences between arrays and hashes. Hashes use curly braces; arrays use brackets. Elements in an array are accessed by their index; elements in a hash are accessed by their key.
  • What is a case when you might prefer an array? What is a case when you might prefer a hash? An array might be preferable if you just have a simple list of values that you don't mind accessing by their index. Hashes would be preferable if you have a large amount of data and you want to call a value by the key that you define.
    • Take a screenshot of your terminal after working through Step 2, and post it in the comments with the title, "Hashes".

Task G- Prework Reflection:

  • Were you able to get through the work? Did you rush to finish, or take your time? Yes. I did take my time with it.
  • What are you most looking forward to learning more about? Everything! I'm interested in learning how to utilize the tools I am learning about to create something. I'm also looking forward to learning Javascript just because I don't know it at all.
  • What topics would you most like to see reinforced by instructors? It is hard to say because at this point I feel like I don't know what I don't know. I think it would be really important to know when to use things in real life situations, like when to use symbols, when to use hashes vs. arrays, etc
  • What is most confusing to you about what you've learned? Symbols. I get what they look like but I'm not sure I'm grasping when to use them or how to use them.
  • What questions do you have for your student mentor or for your instructors? When do you use symbols and how? :)

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.
  • What challenges did you try for "Summary: Basics"? Post a screenshot of one of your programs. Hashes, voting age
  • Functions: How do you call a function and store the result in a variable? Call the name of the function and then the value that it needs to evaluate. To store the result in a variable, name the variable and set it equal to the name of the function and the value that it needs to evaluate.
  • Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables. Initialize method is used to store the initial data your object is created with. New method is an instance of of your oject. Instance variables start with the @ sign and are only visible within a specific instance of your 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"?
@allindow
Copy link
Author

Launch School: Summary Basics
screen shot 2016-04-27 at 10 41 12 pm

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