Skip to content

Instantly share code, notes, and snippets.

@GSmes
Forked from mbburch/prework.md
Last active May 6, 2016 03:21
Show Gist options
  • Save GSmes/32adbde0d2bfcf66e7c240b40497101f to your computer and use it in GitHub Desktop.
Save GSmes/32adbde0d2bfcf66e7c240b40497101f to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

Turing School Prework- Garrett S.

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 Atom from your Terminal? Enter the command: atom .
  • What is the file extension for a Ruby file? .rb
  • What is the Atom shortcut for hiding/ showing your file tree view? *⌘*
  • What is the Atom shortcut for quickly finding a file (fuzzy finder)? ⌘P

Task E- The Command Line:

  • Screenshots of my 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 tells you within what directory you are currently working.
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? My computer's network name: Garretts-MacBook-Pro.local

Task F- Learn Ruby:

Option 1 Questions:

IRB

  • How do you start and stop irb? Start by entering the command: irb. Stop by entering the command: exit.
  • What might you use irb for? To experiment and find out how certain Ruby language features work.

Variables

  • How do you create a variable? By entering the desired name for the variable followed by a single equals sign and then the assigned value (i.e., cool_variable = 5)
  • What did you learn about the rules for naming variables? They cannot be constants. They also cannot be all numbers, contain dashes, or begin with a number.
  • How do you change the value of a variable? The same way you initially assign a value to the variable. Simply enter the variable followed by a single equals sign followed by the new value.

Datatypes

  • How can you find out the class of a variable? Enter the variable followed by ".class"
  • What are two string methods? count and swapcase
  • How can you change an integer to a string? Use the method "to_s"

Strings

  • Why might you use double quotes instead of single quotes in Ruby? To embed a string in another string--interpolation.
  • What is this used for in Ruby: #{}? String interpolation.
  • How would you remove all the vowels from a string? Use the method "delete('aeiou')"

Input & Output

  • What do 'print' and 'puts' do in Ruby? Print information to the user of the program. 'Puts' adds a new line after printing the information, whereas 'print' does not.
  • What does 'gets' do in Ruby? Pauses the program until the user enters information (a response).
  • Screenshot of the program I created that uses 'puts' and 'gets' will be posted in comments with the title, "I/O".

Numbers & Arithmetic

  • What is the difference between integers and floats? Integers are whole numbers, whereas floats contain decimals.
  • Screenshot of the program I created will be posted in the comments with the title, "Numbers".

Booleans

  • What do each of the following symbols mean?
    • == - Equal to
    • = - Greater than or equal to

    • <= - Less than or equal to
    • != - Not equal to (or the opposite of equal to)
    • && - and
    • || - or
  • What are two Ruby methods that return booleans? include? and empty?

Conditionals

  • What is flow control? Using conditions/values to selectively execute code
  • 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? It is a while loop in which there is no condition that is false. You can terminate it using ctrl+c
  • Screenshot of my program and terminal showing two different outputs will be posted in the comments with the title, "Conditionals".

nil

  • What is nil? A special data type that means "nothing". It's used to show that a variable hasn't been assigned anything yet, or that a function didn't return a value.
  • Screenshot of my terminal after working through Step 4 will be posted in the comments with the title, "nil".

Symbols

  • How can symbols be beneficial in Ruby? To use for unchanging ideas that you want to refer to the same way, no matter where you are in a program.
  • Does naming symbols use the same rules for naming variables? Yes
  • Screenshot of my terminal after working through Step 4 will be posted 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 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 let us access elements by their position, or index, in the array. Hashes let us access them by name, or a key.
  • What is a case when you might prefer an array? What is a case when you might prefer a hash? Arrays are ideal when we want to store an ordered list of items that can be accessed by their position. Hashes are ideal for storing the properties and property values of objects.
  • Screenshot of my terminal after working through Step 2 will be posted 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? I was able to finish the work without feeling very rushed.
  • What are you most looking forward to learning more about? I'm looking forward to learning more about arrays, hashes, and conditionals, because they seem very useful and may be used extremely often.
  • What topics would you most like to see reinforced by instructors? I'd really like to be taught more about symbols, because I don't feel very confident in my understanding of them.
  • What is most confusing to you about what you've learned? Symbols. I'm not entirely clear about what they are, as opposed to variables, and how to use them.
  • What questions do you have for your student mentor or for your instructors? Can you explain symbols to me again? Haha.

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

GSmes commented Apr 21, 2016

Task D- Environment:
screen shot 2016-04-21 at 4 58 03 pm

@GSmes
Copy link
Author

GSmes commented Apr 24, 2016

Task E- Flashcards
20160424_182410

@GSmes
Copy link
Author

GSmes commented Apr 25, 2016

Task E- Make a Directory (mkdir)
task e - 1 - mkdir
Task E- Change Directory (cd)
task e - 2 - cd
Task E- List Directory (ls)
task e - 3 - ls

@GSmes
Copy link
Author

GSmes commented Apr 25, 2016

Task A- Practice Typing (Lesson 1)
screen shot 2016-04-24 at 7 19 01 pm

@GSmes
Copy link
Author

GSmes commented Apr 26, 2016

Task F- Option 2 (Badges)
screen shot 2016-04-25 at 6 05 49 pm
screen shot 2016-04-25 at 7 07 56 pm
screen shot 2016-04-25 at 7 03 28 pm
screen shot 2016-04-25 at 8 18 19 pm

@GSmes
Copy link
Author

GSmes commented May 3, 2016

Task A- Practice Typing (Lesson 2)
screen shot 2016-05-02 at 7 13 11 pm

@GSmes
Copy link
Author

GSmes commented May 3, 2016

Task A- Practice Typing (Lesson 3)
screen shot 2016-05-02 at 7 24 10 pm

@GSmes
Copy link
Author

GSmes commented May 3, 2016

Task E- Remove Directory (rmdir)
screen shot 2016-05-02 at 7 46 00 pm
Task E- Moving Around (pushd, popd)
screen shot 2016-05-02 at 8 01 14 pm

@GSmes
Copy link
Author

GSmes commented May 3, 2016

Task F- Input & Output
I/O
screen shot 2016-05-02 at 9 18 49 pm
screen shot 2016-05-02 at 9 19 24 pm

@GSmes
Copy link
Author

GSmes commented May 5, 2016

Task F- Numbers & Arithmetic
Numbers
screen shot 2016-05-04 at 9 10 01 pm
screen shot 2016-05-04 at 9 11 50 pm

@GSmes
Copy link
Author

GSmes commented May 5, 2016

Task A- Practice Typing (Lesson 4)
screen shot 2016-05-02 at 9 46 58 pm

Task A- Practice Typing (Lesson 5)
screen shot 2016-05-02 at 9 52 06 pm

@GSmes
Copy link
Author

GSmes commented May 5, 2016

Task F- Conditionals
Conditionals
screen shot 2016-05-04 at 11 22 58 pm
screen shot 2016-05-04 at 11 25 05 pm

@GSmes
Copy link
Author

GSmes commented May 5, 2016

Task F- nil
nil
screen shot 2016-05-05 at 12 37 46 am

@GSmes
Copy link
Author

GSmes commented May 5, 2016

Task F- Symbols
Symbols
screen shot 2016-05-05 at 12 59 32 am

@GSmes
Copy link
Author

GSmes commented May 6, 2016

Task E- Making Empty Files (touch, new-item)
screen shot 2016-05-05 at 6 24 59 pm

Task E- Copy a File (cp)
screen shot 2016-05-05 at 6 53 36 pm

Task E- Moving a File (mv)
screen shot 2016-05-05 at 7 03 32 pm

@GSmes
Copy link
Author

GSmes commented May 6, 2016

Task E- View a File (less, more)
screen shot 2016-05-05 at 8 01 47 pm

Task E- Stream a File (cat)
screen shot 2016-05-05 at 8 09 25 pm

Task E- Removing a File (rm)
screen shot 2016-05-05 at 8 18 44 pm

@GSmes
Copy link
Author

GSmes commented May 6, 2016

Task F- Hashes
Hashes
screen shot 2016-05-05 at 8 59 03 pm

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