Skip to content

Instantly share code, notes, and snippets.

@NicholasJacques
Forked from mbburch/prework.md
Last active January 18, 2017 19:15
Show Gist options
  • Save NicholasJacques/175c78659b607e9e5ba31a6ff22ca68b to your computer and use it in GitHub Desktop.
Save NicholasJacques/175c78659b607e9e5ba31a6ff22ca68b to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

Turing School Prework - Nicholas Jacques

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?
  • How do you open Atom from your Terminal?
  • What is the file extension for a Ruby file?
  • What is the Atom shortcut for hiding/ showing your file tree view?
  • What is the Atom shortcut for quickly finding a file (fuzzy finder)?

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

NicholasJacques commented Dec 6, 2016

Monday 12/5/16
Day 1

Task A: Typing
lesson 1
lesson 2
lesson 3

@NicholasJacques
Copy link
Author

Tuesday 12/6/16

Task A: Typing
lesson 4
lesson 5
lesson 6

Task D: Set Up Environment

Did you run into any issues?
I own a Windows PC so I am currently using Cloud9 to complete my prework. Setting up a Cloud9 account was obviously quite straightforward.

How do you open VS Code from your Terminal?
In order to do this you first need to set up a relationship between VS and the Terminal. You do this by executing the Shell Command "Install 'code' command in PATH." After do this you can open VS code from Terminal simply by typing 'code'.

What is the file extension for a Ruby file?
.rb

I will answer the other questions when I receive my new laptop and am able to properly set up my environment.

Task E: Start Learning to use the command line

What does pwd stand for, and how is this command helpful?
pwd stands for"Present Working Directory". This command tells you the directory that you are currently working in. This is useful because Terminal does not have a GUI.

What does hostname tell you, and what shows up in YOUR terminal when you type hostname?
Hostname is the name assigned to your computer on a network and can be used to identify your computer among others on a network.
My hostname on Cloud9 is "njacques9-turing-prework-4111321"

@NicholasJacques
Copy link
Author

NicholasJacques commented Dec 8, 2016

Wednesday 12/7/16

Task A: Typing
lesson 7
lesson 8
lesson 9

Task E: The Command Line
ls command
make a directory
change directory

@NicholasJacques
Copy link
Author

NicholasJacques commented Dec 10, 2016

12/8/16
Task A: Typing
lesson 10
lesson 11
lesson 12

@akintner
Copy link

Hey Nicholas, this is all looking good. What languages are you practicing typing (that part doesn't show up from these screenshots)? it doesn't really matter which languages you choose, as all of them will give valuable experience and practice, but I'd say focus on Ruby or Python, just FYI.
The command line stuff looks great.

@NicholasJacques
Copy link
Author

Friday 12/16/16

Task A: Typing; I decided to repeat the Ruby typing drills a second time and will then move on to Python
lesson 14
lesson 15
lesson16

Task F- Choose your Ruby adventure!
Option 2: I completed the entire lesson, levels 1 - 6.
code school badges

Task E: The Command Line
Today I completed the manipulation and changing the file system sections of the codeacadamy command line lesson. Scored 100% on the quiz!
command line manipulation

@NicholasJacques
Copy link
Author

12/19/16

Task A: Typing; slowed down a bit to focus on form
lesson 17
lesson 18
lesson 19

Task F: Learn Ruby
How do you start and stop irb?
-To start irb, simply type "irb" in the terminal. Too end irb type "exit".
What might you use irb for?
-irb can be used for experimenting with language features or small bits of code. It is not used for writing long programs.

How do you create a variable?
-To create a variable you assign a value with an equals sign.
What did you learn about the rules for naming variables?
-Variables cannot start with numbers or contain dashes or spaces. They can not be all numbers. They may contain numbers or end with a number. they must be broken up by underscores instead of spaces.
How do you change the value of a variable?
-To change the value of a variable you reassign it a new value with an equals sign.

@NicholasJacques
Copy link
Author

NicholasJacques commented Jan 2, 2017

12/27/2016

Part F: Learn Ruby
How can you find out the class of a variable?

  • attach the method .class at the end of a variable to find out its class.
    What are two string methods?
    -"five" "this is a string"
    How can you change an integer to a string?
  • to change an integer to a string, attach the .to_s method to an integer

Why might you use double quotes instead of single quotes in Ruby?
-Double quotes are used in "string interpolations where you imbed a Ruby statement in another string.
What is this used for in Ruby: #{}?
-#{} is used for interpolation of strings
How would you remove all the vowels from a string?
-attach the method .delete('aeiou')

What do 'print' and 'puts' do in Ruby?

  • 'puts' prints information to the user. 'print' is the same as puts except it does not create a new line after printing.
    What does 'gets' do in Ruby?
    -'gets' pauses the program to get user input followed by hitting enter to resume the program.
    Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O".
    gets example

What is the difference between integers and floats?
-Integers are only whole numbers. Ruby will automatically truncate a decimal to a whole number if it is an integer. A float can contain partial numbers and has a decimal.
Complete the challenge, and post a screenshot of your program in the comments with the title, "Numbers".
addition calculator

What do each of the following symbols mean?

-equal

=
-greater than or equal to
<=
-less than or equal to
!=
-no equal to
&&
-and
||
-or
What are two Ruby methods that return booleans?
.end_with?
.include>?

What is flow control?
Flow control is selectively executing code based on values that exist in the program. It is how programs make decisions
What will the following code return?

apple_count = 4
if apple_count > 5
puts "Lots of apples!"
else
puts 'Not many apples...'
end

This code will return "Not many apples..."

What is an infinite loop, and how can you get out of one?
An infinity loop is a program that never terminates. This happens when a while loop doesn't do anything to make the while condition false.

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

@NicholasJacques
Copy link
Author

1/6/17

nil

What is nil?
nil means "nothing." It is used to show that a variable doesn't have an assignment or that 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".
nil

Symbols

How can symbols be beneficial in Ruby?
Symbols allow Ruby to use memory more efficiently. Symbols allow Ruby to point to the same object in multiple places instead of allocating a new copy.

Does naming symbols use the same rules for naming variables?
Naming symbols do not use the same rules for naming variables. Their name is simply whatever comes after the colon.

Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "Symbols".
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 to the end of an array. 'pop' removes the last element.

Hashes

Describe some differences between arrays and hashes.
A hash stores pairs of items: 'keys' and 'values'. An array stores elements that can be accessed by their position.

What is a case when you might prefer an array? What is a case when you might prefer a hash?
Arrays would be preferred in lists. A hash would be preferred when you want to document the properties of an object.

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

@NicholasJacques
Copy link
Author

NicholasJacques commented Jan 12, 2017

1/11/2017
Task D - Set up your environment
Just got my laptop today so I was able to set up my environment.

Did you run into any issues?
No. Everything went smoothly.

How do you open VS Code from your terminal?
Simply type "code".

What is the file extension for a ruby file?
.rb

What is the VS Code shortcut for hiding/showing your file tree view?
shift + ctrl + e

What is the VS Code shortcut for quickly finding a file?
shift + p

Versions
screen shot 2017-01-11 at 11 17 44 pm

@NicholasJacques
Copy link
Author

NicholasJacques commented Jan 16, 2017

1/16/17

Task C: Turing Culture: Developing Empathetic Programmers

What role does empathy play in your life and how has it helped you?

Before applying to Turing I spent several years working in the food service industry. Most of my time was spent in managerial positions but over the course of my career I have worked in nearly every position in a restaurant that you could think of. While I could write at length about all my gripes with the food service industry, one positive that came from time in that career is that it instilled a really strong sense of empathy in me that I didn’t necessarily have before. In the restaurant industry, and in the service industry in general, there are a lot interactions and relationships that are socially and financially unbalanced. Except for a select few in upper management, very few restaurant employees are making a decent wage. As a manager of a higher-end concept on 16th street I was exposed on a daily basis to both the abject poverty of my employees, who I would occasionally find sleeping on the street after work as well as our highly affluent customers who lived far above street level in glassy highrises. While these two groups of people who lived in worlds completely aliens to one another would be unlikely to cross paths, the restaurant was a space where their worlds collided and most times had very positive interactions with one another. Seeing how well empathy worked to build these positive interactions, which then led to positive customer experience and more business showed me how just how powerful empathy can be.

How does empathy help you build better software?
/Why is empathy important for working on a team?

Empathy is important in building software for a few reasons. First, building software is all about creating solutions to problems. In order to properly understand the problem, and craft the best possible solution, you have to be able to imagine yourself in the shoes of the person facing this problem and not just what you perceive the problem to be. Empathy is also important for a productive work environment because it can help you give and receive feedback in a more constructive way. Knowing how to express yourself in a way that will be productive and mindful of your coworkers will create an efficient and diverse exchange of ideas.

Describe a situation in which your ability to empathize with a colleague or teammate was helpful.

A situation that immediately comes to mind is a conversation I had with the sous chef at one of the restaurants I worked. We had differing opinions on nearly everything when it comes to politics but because of our strong working relationship we were able to discuss our feelings freely and openly with one another. One day we were discussing police violence against African Americans when he expressed an opinion that was quite misinformed and inarguably racist. He said something along the lines of “slavery ended 200 years ago, if blacks haven’t gotten in their shit together by now then they never will.” Initially I was so offended by this statement that I didn’t want to continue the conversation any further. I took a second to think about all the things he has told about his past that might have contributed to creating this opinion of his. I realized that his life experiences and upbringing were very difference from mine and a lot of his beliefs can be attributed to circumstances outside his control, just like mine. After realizing this I brought up just how short the history of racial justice and desegregation in America is, how many black Americans are only one or two generations away from a openly racist society and how systemic racism is still incredibly prevalent even today. While I can’t take credit for turning a racist into a nonracist, I was a little proud when he thanked me for discussing it with him and expressed to me that he had never thought of it that way before.

When do you find it most difficult to be empathetic in professional settings? How can you improve your skills when faced with these scenarios?

I find that practicing empathy takes active effort so my ability to empathize wanes when I am fatigued or stressed. I may become short with people or temporarily lose the ability to empathize because I am preoccupied with my own stress. I think I could improve in these scenarios by taking time out to be more mindful of the situation and the people I am with as well as waiting for my stress/fatigue to subside before responding to a coworker.

@NicholasJacques
Copy link
Author

1/16/17

Task E: Learn the Command Line

Today I completed the command line course one Code Academy.

screen shot 2017-01-16 at 9 06 51 pm

@NicholasJacques
Copy link
Author

1/17/17

Task F: Learn Ruby

Today I completed the Railsbridge Ruby Curriculum and all of the Ruby Challenges.

Input and Output Challenge:
"Create a program that echoes (or repeats) user input. Use puts and gets to make this program work."
inputer_and_output_challenge

Numbers and Arithmetic Challenge:
"Write a calculator that performs addition. Your program should prompt the user to enter two numbers and output the sum."
numbers_and_arithmetic_challenge

Conditionals Challenge:
"Using what you've learned about flow control, allow the user to select whether they would like two numbers to be added, subtracted, multiplied, or divided."
conditionals_challenge

Conditionals Challenge 2:
"As an optional challenge, can you modify this program to continuously ask for numbers?"
while_loop_challenge

Loops Challenge:
"Let's write a program that greets everyone in your group. Use an array to store everyone's name."
loops_challenge1

Loops Challenge 2:
"Let's write a program that adds up a set of numbers in an array. The numbers you can use as a test case are 4, 6, 5, 5, 10"
loops_challenge2

Bonus Challenges:
"Write a program that verifies whether someone can vote based on their supplied age."
vote_challenge

"Write a program that plays back the message a user supplied."
copy_cat_challenge

"Write a program that adds up five user-supplied numbers"
addition_challenge

"Make a hash for the people at your table, where the key is their name and the value is their favorite color."
hash_challenge

"Make an array of the months in the year."
array_challenge

Dice Program:
roller_program

Functions: How do you call a function and store the result in a variable?
To call a function you start with def followed by the functions names and a list of what you plan to send into the function. After this is the actual code that will be evaluated to the function. You then end the function. To later call this function you say its name and then send in the value to be acted upon by this function. You can then set this equal to a variable to store it.

Describe the purpose of the following in Ruby classes: initialize method, new method, instance variables.
Initialize saves the data that your object is created with. The 'new' method creates an instance of your object which will be passed into the initialize method. Instance variable behave like normal variables within a specific instance of an object. They can no be accessed outside this object.

How to Write a Program: Screenhero with your student mentor and share your program. In your Gist, write a bit about what you found most challenging, and most enjoyable, in creating your program.
My only confusion with this exercise is that this section doesn't seem to be right.

puts "Now we're rolling two 20 sided die twice!"
puts Die.new(20).roll(2)

Based on the program I wrote I would think that it would only be rolling two 20 sided die once, not twice. This is how it is worded in the previous step and I don't see anything that would have changed this from rolling the die once to twice. Not sure if "twice" is a typo or if I'm not understanding a step in the program.

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