Skip to content

Instantly share code, notes, and snippets.

@mollybrown
Forked from mbburch/prework.md
Last active October 3, 2016 00:22
Show Gist options
  • Save mollybrown/c0ef06ee7c4c3b582cbe03760f099204 to your computer and use it in GitHub Desktop.
Save mollybrown/c0ef06ee7c4c3b582cbe03760f099204 to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

Turing School Prework - Molly Brown

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, however installing one of the required packages seemed to take absolutely forever (~30min) and I was worried that something was hung and I had no idea how to abort the process. Luckily I kept waiting and all was well.
  • How do you open Atom from your Terminal? I used atom . to open my current working directory within 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)? Both cmd-t and cmd-p seemed to do the same thing.

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? pwd stands for "print working directory". This command returns the directory the user is currently in. This is useful in terms of confirming that you are working with the files that you intend to work with.
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? The hostname command returns your computer's local network name. In my case, it returns "users-MacBook-Pro.local"

Task F- Learn Ruby:

Option 1 Questions:

IRB: 08/22/16

  • How do you start and stop irb? To start irb, type irb in the terminal and hit enter. To stop irb, type exit in the terminal and hit enter.
  • What might you use irb for? irb is good for testing simple ruby statments and how certain ruby features work.

Variables 08/22/2016

  • How do you create a variable? You create a variable by using a variable name, a single equals sign, and a variable value.
  • What did you learn about the rules for naming variables? all letters, underscores, number in the middle of letters, and number at the end were ok. All numbers, dashes, and number at the start threw errors.
  • How do you change the value of a variable? You change the value of a variable by assigning a new value to an existing variable.

Datatypes 08/28/2016

  • How can you find out the class of a variable? You can find the class of a variable by calling the class method on the variable, ex: myVariable.class
  • What are two string methods? :concat, :reverse
  • How can you change an integer to a string? You can change an interger to a string by calling the conversion method of .to_s on the integer.

Strings 08/28/2016

  • Why might you use double quotes instead of single quotes in Ruby? While you can create strings in Ruby using both single and double quotes, string interpolation will only work with strings created with double quotes.
  • What is this used for in Ruby: #{}? In Ruby, #{} allows for string interpolation, or embedding another Ruby statement within a string.
  • How would you remove all the vowels from a string? "my example string".delete("aeiou")

Input & Output 08/28/2016

  • What do 'print' and 'puts' do in Ruby? Both print and puts print/display output to the screen, but puts makes a new line after printing to the screen and print does not.
  • What does 'gets' do in Ruby? gets is used to pause execution of the program, prompt the user for input, and resume execution once user input is recieved.
  • 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 09/04/2016

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

Booleans 09/04/2016

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

    • <= less than or equal to
    • != not equal to
    • && and
    • || or
  • What are two Ruby methods that return booleans? .empty? and .nil? (methods in Ruby that return booleans end with a question mark by convention.)

Conditionals 09/04/2016

  • What is flow control? A design pattern that allows a program to make decisions as to what parts of the program to execute.
  • 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 in a program occurs when a loop can never teminiate, and will therefore run forever. You can't exit the loop, but you can terminate the program 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".

nil 09/04/2016

  • What is nil? nil is a Ruby data type that means "nothing" (equivalent to null or None in other languages). It's used to show that a variable hasn't been assigned anything yet, 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".

Symbols 09/09/2016

  • How can symbols be beneficial in Ruby? Symbols allow variables to point to the same object in several places instead of allocating a new copy, which allows for more efficient memory usage.
  • 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 09/09/2016

  • What method can you call to find out how many elements are in an array? length, as in array.length
  • What is the index of pizza in this array: ["pizza", "ice cream", "cauliflower"]? The index is 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 09/09/2016

  • Describe some differences between arrays and hashes. An array is an ordered list of things, a hash is a collection of key/value pairs. In arrays, elements are accessed by their index (number). In a 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? Using an array might be best when you are trying to store a list of things in which order matters. A hash might be best when you need to associate a specific label (rather than an index/position) with a thing.
  • 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 09/22/2016

  • screenshots will be posted in comments
  • What are your two biggest takeaways from working through this tutorial? Honestly, I thought this tutorial was just ok and could be greatly improved by visually showing the relation b/t workspace, local repository, and remote repository. Anyways. My biggest takeaways were a. liberally making use of git will likely be key to completing projects sucessfully due to the ability to track and reverse changs if needed, and b. keeping your branches well-named and organized is essential to making sure you don't lose track of what you are working on.
  • What is one question you have about Git & GitHub? How do organizations keep all of their branches organized? It seems like you could easily end up with an unmanageable mess of branches jusr as an individual, let alone with multiple people working on a project.

Workflow Video 09/22/2016

  • 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? I really like the Cmd+d with right arrow shortcut, as there have been many times I have needed to make a change to some code, fail to update all the variables name that I need to, break something, and then spend too long hunting for the source of the problem. Selecting all then making the change would prevent this from happening in the future and will save time. Also, I will definitely be downloading Spectale tonight, as I waste too much time toggling/hunting for windows on my small macbook screen. I think that continuing to work the typing.io practice sets will make the biggest spped difference for me as I am not a strong typist. With more practice there I will be able to make better use of key bindings and shortcuts.

Michael Hartl's Command Line Book 09/10/2016

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? echo -n "hello" (I used the -n option/flag)
  • 1.4: What do Ctrl-A, Ctrl-E, and Ctrl-U do? Ctrl-A allows you to move to the beginning of a command.Ctrl-E jumps to the end of the line. Ctrl-U clears the entire line, allowing you to start over.
  • 1.5: What are the shortcuts for clearing your screen, and exiting your terminal? Clear: Ctrl-L, Exit: Ctrl-D
  • 2.1: What is the "cat" command used for? What is the "diff" command used for? The cat command is generally used for concatenating, or combining the contents of multiple files. However, you can also call cat on a file to view the contents of that file within the terminal. diff compares the contents of two text files and outputs a list of differences.
  • 2.2: What command would you use to list all txt files? What command would you use to show all hidden files? List all text files within a directory: ls *.txt Show all hidden files within a directory: ls -a (the -a option stands for "all")
  • 3.1: How can you download a file from the internet, using the command line? By using the command curl as in curl -O example.com/file.txt
  • 3.3: Describe two commands you can use in conjunction with "less". In less, you can use / to search and highlight each occurance of a given string within a file. You can also use G to move to the end of the file.
  • 3.4: What are two things you can do with "grep"? You can use grep to find a string within a file, and grep -i to find a string within a file case-insensitively.
@mollybrown
Copy link
Author

D1 // Task A: Typing, Lesson 1
lesson 1 screenshot

@mollybrown
Copy link
Author

mollybrown commented Aug 27, 2016

D1 // Task E: CLI Flashcards
d1 cli flashcards

@mollybrown
Copy link
Author

D1 // Task D: Ruby, RVM, and Git versions installed
taskd_env

@mollybrown
Copy link
Author

mollybrown commented Aug 27, 2016

D2 // Task E: mkdir exercise
d2 mkdir

@mollybrown
Copy link
Author

D2 // Task E: cd lesson
d2 cd

@mollybrown
Copy link
Author

D2 // Task E: ls lesson
d2 ls

@mollybrown
Copy link
Author

D3 // Task E: rmdir lesson
d3 rmdir

@mollybrown
Copy link
Author

mollybrown commented Aug 28, 2016

D3 // Task E: popd, pushd
d3 popd pushd

@mollybrown
Copy link
Author

D3 // Task A: Lesson 3
l3

@mollybrown
Copy link
Author

D3 // Task B: Data Structures
data structures 828

@mollybrown
Copy link
Author

mollybrown commented Aug 28, 2016

D3 // Task F: Inputs and Outputs
i o

@mollybrown
Copy link
Author

D2 // Task E: Codecademy Unit 2: Viewing and Changing the File System
unit2

@mollybrown
Copy link
Author

D3 // Task E: Codecademy Unit 3: Redirecting Input and Output
unit3

@mollybrown
Copy link
Author

D4 // Task E: Codecademy Unit 4: Configuring the Environment
unit4

@mollybrown
Copy link
Author

D4 // Task A: Lesson 8
l8

@mollybrown
Copy link
Author

D4 // Task B: Challenge Quiz Level 1
challenge quiz l1

@mollybrown
Copy link
Author

D4 // Task F: Numbers
numbers

@mollybrown
Copy link
Author

mollybrown commented Sep 4, 2016

D4 // Task F: Conditionals
conditionals

@mollybrown
Copy link
Author

mollybrown commented Sep 4, 2016

D4 // Task F: Nil
nil

@mollybrown
Copy link
Author

D5 // Task A: Lesson 12
l12

@mollybrown
Copy link
Author

D6 // Task A: Lesson 13
l13

@mollybrown
Copy link
Author

D5 // Task B: Challenge Quiz Level 2
challenge quiz l2

@mollybrown
Copy link
Author

D5 // Task F: Symbols
symbols

@mollybrown
Copy link
Author

D5 // Task F: Hashes
hashes

@mollybrown
Copy link
Author

D7 // Task A: Lesson 1 (Repeat)
l1

@mollybrown
Copy link
Author

CodeSchool Try Git Badge
git_badge

@mollybrown
Copy link
Author

D6 // Task B: Challenge Quiz Level 3
screen shot 2016-10-02 at 6 04 43 pm

@mollybrown
Copy link
Author

D7 // Task B: Challenge Quiz Level 4
screen shot 2016-10-02 at 6 21 30 pm

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