Skip to content

Instantly share code, notes, and snippets.

@TheKaterTot
Forked from mbburch/prework.md
Last active November 19, 2016 16:19
Show Gist options
  • Save TheKaterTot/1b9f1f3f41ff8db360ca2090bc0ff306 to your computer and use it in GitHub Desktop.
Save TheKaterTot/1b9f1f3f41ff8db360ca2090bc0ff306 to your computer and use it in GitHub Desktop.
An example template for your Turing pre-work Gist

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:

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

Daily Typing Practice

screen shot 2016-10-19 at 2 58 47 pm

screen shot 2016-10-19 at 3 01 41 pm

@TheKaterTot
Copy link
Author

Day Three: Task F
I did sections:

Strings
I would use double quotes to avoid problems with interpolation and issues with apostrophes.
#{} is used to insert Ruby code into a string.
To remove all vowels from a string I would call .delete('aeiou').
Input & Output
Print prints the contents of a string. Puts also prints the contents of a string, but includes a line break.
Gets grabs user input, ending when they hit enter.
Integers are whole numbers, and floats are decimals.
Booleans
== compares the two values to see if they are equal.

= greater than or equal to
<= less than or equal to
!= does not equal
&& and
|| or
Two Ruby methods that return Booleans are include and nil.

@TheKaterTot
Copy link
Author

I/O
screen shot 2016-10-20 at 3 36 45 pm

Numbers
screen shot 2016-10-20 at 3 45 39 pm

@TheKaterTot
Copy link
Author

Daily Typing Task
screen shot 2016-10-20 at 12 07 30 pm
screen shot 2016-10-20 at 12 10 13 pm

@TheKaterTot
Copy link
Author

TheKaterTot commented Oct 22, 2016

Day Four: Task F

I did sections:

Conditionals
Flow control is the path code takes as it runs.
The code example will return "Not many apples..."
An infinite loop happens when you don't tell the code when a process should stop, so it keeps looping to check the conditions. Ctrl + C stops this.

Nil
Nil means nothing. It's a way to assign a variable without a value.

@TheKaterTot
Copy link
Author

Daily Typing Task

screen shot 2016-10-21 at 1 51 00 pm

screen shot 2016-10-21 at 1 54 35 pm

screen shot 2016-10-21 at 1 57 42 pm

@TheKaterTot
Copy link
Author

TheKaterTot commented Oct 22, 2016

Nil Edit: this has a type, and I fixed it.
screen shot 2016-10-21 at 9 34 06 pm

@TheKaterTot
Copy link
Author

Day 5: Task F

I did sections:
Symbols
Symbols can save memory in Ruby. As far as I could tell, symbols follow the same naming rules as variables.
Screenshot to follow.
Arrays
I can call .length to find out how many elements are in an array.
In the array: ["pizza", "ice cream", "cauliflower"], the index of pizza is 0.
Push adds an item to an array, and pop removes one (and returns it as a value).
Hashes
Hashes are different from arrays in that they can specify that items are related (key and value).
An array is better if you have a list of values you need to store, but a hash would be better if you have different types of objects with properties that you want to store (i.e., username => password, name => age, etc.).

@TheKaterTot
Copy link
Author

Symbols
screen shot 2016-10-22 at 8 58 59 pm

@TheKaterTot
Copy link
Author

Hashes
screen shot 2016-10-22 at 9 09 31 pm

@TheKaterTot
Copy link
Author

Daily Typing Task

screen shot 2016-10-22 at 9 13 29 pm

screen shot 2016-10-22 at 9 15 47 pm

@TheKaterTot
Copy link
Author

Prework Reflections
I got through the work for Week 1 pretty smoothly because I have some experience with Ruby. I went through it quickly, but I didn't feel rushed. I'm looking forward to doing more with hashes and seeing their practicality in action. I'd like to talk about symbols more with the instructors because it seems to me the most abstract thing covered in this week. I didn't feel confused by the material, but I want to see it all in concrete examples so that it feels more solid to me. I don't have any questions right now, but that's because I'm still in the stuff I've learned before. I'm going to continue with next steps and update this.

@TheKaterTot
Copy link
Author

Next Steps: Loops

screen shot 2016-10-24 at 6 31 53 pm

@TheKaterTot
Copy link
Author

Daily Typing Task
screen shot 2016-10-24 at 6 40 01 pm
screen shot 2016-10-24 at 6 43 09 pm

@TheKaterTot
Copy link
Author

Summary: Basics

The first program I wrote checked voting age.

screen shot 2016-10-25 at 10 09 47 pm

@TheKaterTot
Copy link
Author

Summary: Basics

I wrote a program to repeat user input.

screen shot 2016-10-25 at 10 35 18 pm

@TheKaterTot
Copy link
Author

Summary: Basics

I wrote a program to add up user-supplied numbers.
screen shot 2016-10-25 at 10 57 45 pm

@TheKaterTot
Copy link
Author

Next steps: Functions

I call a function by stating the name, and store its results by simply assigning it to a variable. For example, my_variable = function(parameter).

@TheKaterTot
Copy link
Author

TheKaterTot commented Oct 30, 2016

Next steps: Classes
The initialize method sets up the initial attributes of the object. Calling the new method creates a new object (a new instance of the class). Instance variables are variables specific to the instance of the class..

@TheKaterTot
Copy link
Author

How to Write a Program

I went through my code with my mentor, which was really fun. I liked trying to think of ways to make the code more concise and also more usable. One problem I had was that I was copying most of the code from RailsBridge, which made it harder to understand than if I had written it myself. I had to work harder to understand each line of code, but once I started writing new methods to break it down, I wanted to find even more ways to make it cleaner.

@TheKaterTot
Copy link
Author

I finished the Launch School book, and here are some screenshots of my programs.

screen shot 2016-11-10 at 12 42 15 pm

screen shot 2016-11-10 at 12 42 30 pm

screen shot 2016-11-10 at 12 42 40 pm

screen shot 2016-11-10 at 12 43 05 pm

screen shot 2016-11-10 at 12 43 13 pm

@TheKaterTot
Copy link
Author

The Launch School book was helpful to reiterate some of the things I knew how to do, but needed to practice. I learned about recursion, which is a little confusing, but fun. The hardest program to write was the task to return specific arrays from a hash. I struggled to break down the problem in a way that helped me move forward. When I got help, I made sure to talk through the code repeatedly to make sure I understood every line.

@TheKaterTot
Copy link
Author

I worked through the Try Git on codeacademy, but I didn't get a screenshot of my badge. I've been playing around with git and github to try to get more comfortable with the material. I'm not sure I have too many opinions on effective workflow just yet; I'll probably focus on keyboard shortcuts and using the terminal so I can save time that way. As far as git, I'm practicing using push, pull, and merge.

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