Skip to content

Instantly share code, notes, and snippets.

@janderson16
Forked from mbburch/prework.md
Last active November 26, 2016 17:30
Show Gist options
  • Save janderson16/bac1797efcce417519901bbde8f0031b to your computer and use it in GitHub Desktop.
Save janderson16/bac1797efcce417519901bbde8f0031b to your computer and use it in GitHub Desktop.
My Turing pre-work Gist

Turing School Prework- James

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? Yes, my 2007 MB was too old to run any of the programs. My other machine crashed; waiting for Turing computer. New computer-no issues
  • 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 + P command + T

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; to find out which directory you are currently working in
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? the unique identifier for your computer; Jamess-MacBook-Pro.local

Task F- Learn Ruby:

Option 1 Questions:

IRB Completed 11-18

  • How do you start and stop irb? irb exit
  • What might you use irb for? To find out how certain features work and experiment

Variables Completed 11-18

  • How do you create a variable? variable_name = value
  • What did you learn about the rules for naming variables? cannot start variable names with numbers or use hyphens
  • How do you change the value of a variable? variable_name = new value

Datatypes Completed 11-20

  • How can you find out the class of a variable? "variable in question".class
  • What are two string methods? :scan, :squeeze
  • How can you change an integer to a string? variable.to_s

Strings Completed 11-20

  • Why might you use double quotes instead of single quotes in Ruby? when you want to do a string interpolation
  • What is this used for in Ruby: #{}? interpolation
  • How would you remove all the vowels from a string? .delete('aeiou')

Input & Output Completed 11-21

  • What do 'print' and 'puts' do in Ruby? 'puts' prints information to the user; 'print' is like 'puts' but doesn't create a new line
  • What does 'gets' do in Ruby? prompts an input from the user
  • 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 Completed 11-21

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

Booleans Completed 11-21

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

    • <= less than or equal to
    • != opposite of
    • && and
    • || or
  • What are two Ruby methods that return booleans? .end_with? .include?

Conditionals Completed 11-22

  • What is flow control? When programs make decisions for us, i.e. conditionals
  • 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? A loop that never returns a false condition; type 'ctrl+c'
  • Take a screenshot of your program and terminal showing two different outputs, and post it in the comments with the title, "Conditionals".

nil Completed 11-22

  • What is nil? Nothing, a variable has not been assigned anything yet or the 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".

Symbols Completed 11-23

  • How can symbols be beneficial in Ruby? They use memory more efficiently. The allow variables to point to the same object in several places rather than allocating a new copy.
  • Does naming symbols use the same rules for naming variables? Symbols can use spaces rather than _ if in quotes; Also can use ' ' or " "
  • Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "Symbols".

Arrays Completed 11-23

  • 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 Completed 11-26

  • Describe some differences between arrays and hashes. Array elements are accessed by their index, whereas hash elements 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? Arrays might be preferred when an elements index/order is the most crucial factor; Hashes would be better used in accessing elements based on one or more of their attributes/keys
    • 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? There was enough time to finish the 'Week One' tasks
  • What are you most looking forward to learning more about? Loops, during self study a few months ago I really struggled with loop concepts.
  • What topics would you most like to see reinforced by instructors? Too early to know.
  • What is most confusing to you about what you've learned? I had trouble in the beginning getting my .rb files to run properly in terminal but problem has been solved.
  • What questions do you have for your student mentor or for your instructors? None at the moment. I'm sure there will be plenty in the near future.

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.
  • Functions: How do you call a function and store the result in a variable?
  • Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables.
  • 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"?
@janderson16
Copy link
Author

screen shot 2016-11-17 at 12 06 34 pm

@janderson16
Copy link
Author

screen shot 2016-11-18 at 2 41 00 pm

@janderson16
Copy link
Author

screen shot 2016-11-18 at 2 45 44 pm

@janderson16
Copy link
Author

screen shot 2016-11-18 at 3 00 58 pm

@janderson16
Copy link
Author

screen shot 2016-11-18 at 3 02 28 pm

@janderson16
Copy link
Author

screen shot 2016-11-18 at 3 03 27 pm

@janderson16
Copy link
Author

screen shot 2016-11-20 at 12 20 45 pm

@janderson16
Copy link
Author

screen shot 2016-11-20 at 12 28 49 pm

@janderson16
Copy link
Author

janderson16 commented Nov 21, 2016

I/O:
i o

@janderson16
Copy link
Author

janderson16 commented Nov 21, 2016

Numbers:
screen shot 2016-11-21 at 2 47 33 pm

@janderson16
Copy link
Author

screen shot 2016-11-21 at 3 12 55 pm

@janderson16
Copy link
Author

Conditionals:
screen shot 2016-11-22 at 12 16 14 pm

screen shot 2016-11-22 at 12 14 52 pm

@janderson16
Copy link
Author

Nil:
screen shot 2016-11-22 at 12 27 14 pm

@janderson16
Copy link
Author

screen shot 2016-11-22 at 12 55 17 pm

@janderson16
Copy link
Author

screen shot 2016-11-22 at 1 02 25 pm

@janderson16
Copy link
Author

screen shot 2016-11-23 at 10 15 40 am

@janderson16
Copy link
Author

screen shot 2016-11-23 at 10 19 12 am

@janderson16
Copy link
Author

Symbols:
screen shot 2016-11-23 at 10 31 19 am

@janderson16
Copy link
Author

screen shot 2016-11-26 at 9 37 37 am

@janderson16
Copy link
Author

screen shot 2016-11-26 at 9 43 00 am

@janderson16
Copy link
Author

Hashes:
screen shot 2016-11-26 at 10 06 21 am

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