Skip to content

Instantly share code, notes, and snippets.

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

Ken Lee's Turing School Prework

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: Done

Task D- Set up your Environment: Done

  • Did you run into any issues? The only problem I had was the RVM requirement update in Terminal took a over 30 mins to update but there was no notes stating that it may take that long. I researched it online and only found one overstack answer. Which told me to wait. I did and it finally updated.
  • How do you open Atom from your Terminal? Just type 'atom' in the terminal
  • What is the file extension for a Ruby file? The file extention for Ruby is .rb
  • What is the Atom shortcut for hiding / showing your file tree view? Command k b
  • What is the Atom shortcut for quickly finding a file (fuzzy finder)? Command p

Task E- The Command Line:

  • screenshots of your terminal after each exercise will be posted in comments DONE

Day One Questions:

  • What does pwd stand for, and how is this command helpful? Print Working Directory. It's useful to let my check which directory I'm currently in.
  • What does hostname tell you, and what shows up in YOUR terminal when you type hostname? Hostname are unique to your computer and helps people on your network find you in case you need to share files. My terminal shows Kenneths-MacBook-Pro.local

Task F- Learn Ruby:

Option 1 Questions:

IRB

  • How do you start and stop irb? Go to Terminal and type irb.
  • What might you use irb for? It's a great place to practice and learn ruby code.

Variables

  • How do you create a variable? Use the equal sign (=) between the name and the type of data.
  • What did you learn about the rules for naming variables? Can't be a number to start, can't have any spaces between words, and can not use hyphens.
  • How do you change the value of a variable? By retyping the variable name with equal sign and then type in a new value.

Datatypes

  • How can you find out the class of a variable? By typing .class at the end of a variable.
  • What are two string methods? .upcase .downcase
  • How can you change an integer to a string? .to_s at the end

Strings

  • Why might you use double quotes instead of single quotes in Ruby? Difference between double quotes and single quotes is that double quotes lets you use interpolates and escaped characters.

  • What is this used for in Ruby: #{}? Interpolation, interpolation let's Ruby code show inside a string.

  • How would you remove all the vowels from a string? "Content".delete('aeiou')

Input & Output

  • What do 'print' and 'puts' do in Ruby? 'puts' adds a newline after execution and prints does not.
  • What does 'gets' do in Ruby? It accepts and stores user input into a variable
  • Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O". DONE

Numbers & Arithmetic

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

Booleans

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

    • <= Less Than or Equal to
    • != Not Equal to
    • && And
    • || Or
  • What are two Ruby methods that return booleans? .empty? .include(x)?

Conditionals

  • What is flow control? Programming concept that programs makes decision for the user. If this, then this...
  • 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? Infinite loop is piece of code that loops and doesn't end because the code was written without an end (a false) program condition. ctrl+c

  • Take a screenshot of your program and terminal showing two different outputs, and post it in the comments with the title, "Conditionals". DONE

nil

  • What is nil? Nil to the rescue. Nil 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.

  • Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "nil". DONE

Symbols

  • How can symbols be beneficial in Ruby?Symbols let Ruby variables point to the same object in several places instead of allocating a new copy and therefore let's Ruby use memory more effeciently.

  • Does naming symbols use the same rules for naming variables? Yes

  • 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 in to the end of an array. 'pop' removes the last element in an array.

Hashes

  • Describe some differences between arrays and hashes. Arrays are unsorted list and hashes are sorted list with keys and values. An array can store large similar data in a simple ordered lists and data can be accessed by it's place in the order. Hashes let you access items in the list based on a name, or key. A hash stores pairs of items, associating keys with values.

  • What is a case when you might prefer an array? What is a case when you might prefer a hash? One would use an array if the list is simple list, say if you only need first name. A hash is perfered if you need to make a list that has a name but also other associated information. For instance, the key/value of some one's first name is associated with last name and age.

    • Take a screenshot of your terminal after working through Step 2, and post it in the comments with the title, "Hashes". DONE

Task G- Prework Reflection:

  • Were you able to get through the work? Did you rush to finish, or take your time? I finished everything I wanted to. I took my time.
  • What are you most looking forward to learning more about? I'm looking forward to some real world coding and repetition.
  • What topics would you most like to see reinforced by instructors? I would like to of had more practice on loops and arrays.
  • What is most confusing to you about what you've learned? Loops and arrays. And learing how to use them.
  • What questions do you have for your student mentor or for your instructors? How do we work together

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. Done

  • What challenges did you try for "Summary: Basics"? Post a screenshot of one of your programs. I did them all.

  • Functions: How do you call a function and store the result in a variable? You call a function by in the names of the function and you can store it by typing in a variable name with an equal sign to the call.

  • Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables. Initialize methods saves the initial data your object is created with and performs any other required set-up. New method.

New method is when a new class is created (Using class Name ... end), an object of type Class is created and assigned to a global constant. When Name.new is called to create a new object, the new method in Class is run by default.

Instance variable (a variable that starts with an "@" symbol) stores data on your object but are only visible from inside 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. The most challening part was wrapping my head around all this new code and how it all relates and works. Why it works... I like writting new code and examining it and trying to see if I could add/change anything and make it run.

Launch School Ruby Book

  • screenshots will be posted in comments Done.
  • What are your three biggest takeaways from working through this book? My first takeaway is that there are multiple ways to code what you want. Second, I need more practice working on the loops, arrays, and hashes. Finally, it would be great to know more why one way of writing code is better than the other.

CodeSchool

  • screenshots will be posted in comments Done.
  • What are your two biggest takeaways from working through this tutorial? Does a git push make your code "live" and if so how do I connect git to my websit?
  • What is one question you have about Git & GitHub? What else can I do with git...

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? I believe effective workflow will be the consistence in working for me. i.e. to do some code everyday until I commit it to muscle memory. The shortcut that stands out while doing this pre work was to walk away from a problem if I get stuck/spend too much time on a problem. Catching myself and letting me say it's okay to take a break. I would like more problems to solve. Getting farmilar and experience is the key for me. Knowing the "why" it works is important for me.

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? type echo -n 'copy'
  • 1.4: What do Ctrl-A, Ctrl-E, and Ctrl-U do? Ctrl-A moves the curser to the beginning, Ctrl-E moves the curser to the end, and Ctrl-U erases everything left of the curser.
  • 1.5: What are the shortcuts for clearing your screen, and exiting your terminal? Ctrl-L to clear and Ctrl-D to exit
  • 2.1: What is the "cat" command used for? What is the "diff" command used for? cat command is a quick and dirty way to print a file on to terminal. A kind of quick pic. diff command prints off two files at the same time so you can see the difference.
  • 2.2: What command would you use to list all txt files? What command would you use to show all hidden files? ls *.txt and la -a
  • 3.1: How can you download a file from the internet, using the command line? use curl
  • 3.3: Describe two commands you can use in conjunction with "less". ^F moves me forward and ^B moves me back
  • 3.4: What are two things you can do with "grep"? regexp=pattern, specify a pattern use during a search of inputs. -A --after-context=num Print num lines of trailing context after each match.
@wewert
Copy link
Author

wewert commented Nov 4, 2016

Task-E
First 5 Command Line
first 5 command line

@wewert
Copy link
Author

wewert commented Nov 4, 2016

Task-E
command line to view and manipulate
command line to view and manipulate

@wewert
Copy link
Author

wewert commented Nov 4, 2016

Task-E
command line to redirect
command line to redirect

@wewert
Copy link
Author

wewert commented Nov 4, 2016

Task-E
bash profile to configure the environment
bash profile to configure the environment

@wewert
Copy link
Author

wewert commented Nov 4, 2016

Priority 1
Loops 1
loops 1

Loops 2
loops 2

@wewert
Copy link
Author

wewert commented Nov 6, 2016

Railsbridge Curriculum, cont.
What challenges did you try for "Summary: Basics"? Post a screenshot of one of your programs. I did them all.
guestlist

monthyear

vote

add 2 number

five number

@wewert
Copy link
Author

wewert commented Nov 17, 2016

Priority 2

Basics
priorty 2 the basics

Variables
priorty 2 variables

Methods
priorty 2 methods

Control Flow
priority 2 control flow

Loops & Interators
priority 2 control flow

Arrays
priority 2 arrays

Hashes
priorty 2 hashes

@wewert
Copy link
Author

wewert commented Nov 17, 2016

Priority 3

Try Git badge
screen shot 2016-11-17 at 10 41 14 am

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