Skip to content

Instantly share code, notes, and snippets.

@epintozzi
Forked from mbburch/prework.md
Last active August 4, 2016 20:13
Show Gist options
  • Save epintozzi/1cafaf094d3bb503d1f3389a69531fe7 to your computer and use it in GitHub Desktop.
Save epintozzi/1cafaf094d3bb503d1f3389a69531fe7 to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

Turing School Prework - Erin

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
  • 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?
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname?

Task F- Learn Ruby:

Option 1 Questions:

IRB

  • How do you start and stop irb?
  • What might you use irb for?

Variables

  • How do you create a variable?
  • What did you learn about the rules for naming variables?
  • How do you change the value of a variable?

Datatypes

  • How can you find out the class of a variable?
  • What are two string methods?
  • How can you change an integer to a string?

Strings

  • Why might you use double quotes instead of single quotes in Ruby?
  • What is this used for in Ruby: #{}?
  • How would you remove all the vowels from a string?

Input & Output

  • What do 'print' and 'puts' do in Ruby?
  • What does 'gets' do in Ruby?
  • 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

  • What is the difference between integers and floats?
  • 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?
    • ==
    • =

    • <=
    • !=
    • &&
    • ||
  • What are two Ruby methods that return booleans?

Conditionals

  • What is flow control?
  • What will the following code return?
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?
  • 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?
  • 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".

Task G- Prework Reflection:

  • Were you able to get through the work? Did you rush to finish, or take your time?
  • What are you most looking forward to learning more about?
  • What topics would you most like to see reinforced by instructors?
  • What is most confusing to you about what you've learned?
  • What questions do you have for your student mentor or for your instructors?

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

Task F - Starting with Option 2 (Try Ruby)

screen shot 2016-07-12 at 10 45 44 pm

screen shot 2016-07-12 at 11 14 12 pm

@epintozzi
Copy link
Author

Daily Task - Algorithm Quizzes
algorithm1
algorithm2
algorithm3

@epintozzi
Copy link
Author

Day 3 Task E

terminal12

terminal11

terminal10

terminal9

@epintozzi
Copy link
Author

screen shot 2016-07-19 at 11 01 38 am

screen shot 2016-07-19 at 10 57 30 am

@epintozzi
Copy link
Author

terminal17

terminal16

terminal15

@epintozzi
Copy link
Author

screen shot 2016-07-26 at 10 15 53 pm

@epintozzi
Copy link
Author

screen shot 2016-07-26 at 10 20 51 pm

screen shot 2016-07-26 at 10 19 28 pm

@epintozzi
Copy link
Author

typing9

![Uploading Typing8.png…]()

typing7

@epintozzi
Copy link
Author

typing8

@epintozzi
Copy link
Author

Task F Option 1:

Variables: You create a variable by choosing a variable name and setting it equal to something; Example: dogs_name = "Bruce". There are some rules for naming variables. Variable names can be all letters, letters with underscores, or letters with numbers sprinkled about as long as it doesn't start or end with a number. Variable names cannot be a number only, begin with a number, end with a number, or contain a dash. You can change the value of a variable by simply setting it equal to something else.

@epintozzi
Copy link
Author

epintozzi commented Jul 28, 2016

Task F Option 1:

Datatypes: To determine the class of a variable, type the_variable_name.class. Example: 5.class. Examples of two string methods are upcase and count. You can change an integer to a string by typing integer.to_s, for example: 5.to_s which should return "5".

@epintozzi
Copy link
Author

Task F Option 1:

Strings: You use double quotes in Ruby when you need to do an interpolation. Otherwise, it appears you can use single or double quotes interchangeably, but you must use the same double or single as the start and end quote on an individual string. Ex: "Hello" and 'Hello' both work, but "Hello' does not.

{} is used for interpolation, which means you are including a ruby statement within a string.

You could remove all vowels from a string by using the delete method and choosing "aeiou" as the characters to delete. Example: 'This is my string'.delete('aeiou')

@epintozzi
Copy link
Author

epintozzi commented Jul 28, 2016

Task F Option 1:

Input and Output: puts displays information on the screen to the user. print does this as well, but does not start a new line after. gets waits for the user to input some information. It then returns that information to the program.

Program I created:

"I/O"
screen shot 2016-07-28 at 2 17 00 pm

@epintozzi
Copy link
Author

Task F Option 1:

Numbers & Arithmetic: An integer is a whole number like 1 or 15. A float is a decimal like 1.0 or 15.2.

"Numbers"
numbers

@epintozzi
Copy link
Author

Task F Option 1:

Booleans:
The following symbols mean:

== equals
>= greater than or equal to
<= less than or equal to
!= not equal to
&& and
|| or

Two ruby methods that return booleans are .end_with? and .include?

@epintozzi
Copy link
Author

Task F Option 1:

Conditionals:

Flow control is when the program makes decisions for us and executes specific pieces of code depending on information that exists in the code. For example, this can be achieved with if and else statements.

The sample code above will return "Not many apples..."

An infinite loop is when there is no exit point and the loop goes on forever. You can leave one by typing crtl + c.

"Conditionals"
conditionals terminal
conditionals program

@epintozzi
Copy link
Author

epintozzi commented Jul 29, 2016

Task F Option 1:

Nil: Nil is how you indicate "nothing" or that a value hasn't been stored yet, because sometimes the number zero or false may be actually relevant values that need to be stored.

nil

@epintozzi
Copy link
Author

Task F Option 1:

Symbols: Symbols are useful because they are more efficient than storing a repeating string many times. Naming symbols does follow the same rules as naming variables: cannot be a number only, begin with a number, end with a number, or contain a dash.

screen shot 2016-08-04 at 1 11 37 pm

@epintozzi
Copy link
Author

Task F Option 1

Arrays To find how many elements are in an array, call .length. The index of pizza in this array: ["pizza", "ice cream", "cauliflower"] is 0. "push" adds an element to an array at the end of the list. "pop" removes the element and restores the element that was previously at the end of the list.

@epintozzi
Copy link
Author

Task F Option 1

Hashes: Hashes store data/lists with keys associated to each value while an array assigns an ordered index. You might choose a hash over an array when you want to store properties for an object such as the color of something. You might use an array over a hash when you need to store a list of similarly grouped information like fruits or brands of shoes.

hashes

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