Skip to content

Instantly share code, notes, and snippets.

@alishersadikov
Forked from mbburch/prework.md
Last active June 26, 2016 20:12
Show Gist options
  • Save alishersadikov/c79d9ee3010da1a0f9bd4699b73586e4 to your computer and use it in GitHub Desktop.
Save alishersadikov/c79d9ee3010da1a0f9bd4699b73586e4 to your computer and use it in GitHub Desktop.
Alisher's 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"?
@alishersadikov
Copy link
Author

alishersadikov commented Jun 8, 2016

screen shot 2016-06-08 at 1 31 06 pm

screen shot 2016-06-12 at 12 49 36 am

screen shot 2016-06-22 at 3 23 54 am

screen shot 2016-06-22 at 6 58 27 pm

screen shot 2016-06-22 at 7 02 51 pm

screen shot 2016-06-22 at 7 06 14 pm

screen shot 2016-06-26 at 1 29 27 pm

screen shot 2016-06-26 at 1 34 31 pm

screen shot 2016-06-26 at 1 37 20 pm

@alishersadikov
Copy link
Author

alishersadikov commented Jun 13, 2016

SETTING UP TOOLS
screen shot 2016-06-12 at 2 16 43 am

@alishersadikov
Copy link
Author

alishersadikov commented Jun 14, 2016

Respond to the following questions in your Gist:
Did you run into any issues? - No
How do you open Atom from your Terminal? - Command-spacebar, type Atom, hit Enter
What is the file extension for a Ruby file? - .rb
What is the Atom shortcut for hiding/ showing your file tree view? - Command-
What is the Atom shortcut for quickly finding a file (fuzzy finder)? - Command-t

@alishersadikov
Copy link
Author

alishersadikov commented Jun 14, 2016

Did you make the flashcards in Setup? Post a picture of your flashcards as a comment in your Gist. - No

Answer the following questions in your Gist:
What does pwd stand for, and how is this command helpful? - present working directory: shows which directory I am in.
What does hostname tell you, and what shows up in YOUR terminal when you type hostname? - It tells me the computer name, MY terminal shows Alisherss-MacBook-Pro.local.

@alishersadikov
Copy link
Author

alishersadikov commented Jun 18, 2016

COMMAND LINE EXERCISES

Make A Directory (mkdir)
screen shot 2016-06-18 at 12 05 04 am

Change Directory (cd)
screen shot 2016-06-18 at 12 19 25 am

List Directory (ls)
screen shot 2016-06-18 at 12 29 28 am

Remove Directory (rmdir)
screen shot 2016-06-18 at 12 36 19 am

Moving Around (pushd, popd)
screen shot 2016-06-18 at 12 42 48 am

Making Empty Files (Touch, New-Item)
screen shot 2016-06-22 at 3 50 07 am

Copy A File (cp)
screen shot 2016-06-22 at 3 54 16 am

Moving A File (mv)
screen shot 2016-06-22 at 4 00 45 am

View A File (less, MORE)
screen shot 2016-06-22 at 6 19 34 pm

Stream A File (cat)
screen shot 2016-06-22 at 6 29 19 pm

Removing A File (rm)
screen shot 2016-06-22 at 6 31 53 pm

@alishersadikov
Copy link
Author

alishersadikov commented Jun 19, 2016

RUBY QUESTIONS
Option 1 Questions:

IRB

How do you start and stop irb? - Start by typing irb on command line, stop by typing exit.
What might you use irb for? - To experiment and find out how certain language features work.

Variables

How do you create a variable? - By typing its name and assigning a value.
What did you learn about the rules for naming variables? - Apparently, the name cannot be just letters, combination of letters and numbers, underscore and dash.
How do you change the value of a variable? - By assigning a new value with =.

Datatypes

How can you find out the class of a variable? - variable.class
What are two string methods? - For example, :include?, :unicode_normalize
How can you change an integer to a string? - 5.to_s

Strings

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

Input & Output

What do 'print' and 'puts' do in Ruby? - 'print' and 'put' print to the screen, 'puts' creates a line after the printing.
What does 'gets' do in Ruby? - Pauses the program and waits for user input and enter.
Add a screenshot in the comments of the program you created that uses 'puts' and 'gets', and give it the title, "I/O". - See below.

Numbers & Arithmetic

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

Booleans

What do each of the following symbols mean?
== 'equal to'

= 'more than or equal to'
<= 'less than or equal to'
!= 'not equal'
&& 'and'
|| 'or'

What are two Ruby methods that return booleans? - Methods that end with question mark.

Conditionals

What is flow control? - A way of selectively executing code based on values that exist in the program.
What will the following code return?
apple_count = 4

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

  • It will return 'Not many apples...'

What is an infinite loop, and how can you get out of one? - Infinite loop is a loop that runs forever. cntl+c can be used to get out
Take a screenshot of your program and terminal showing two different outputs, and post it in the comments with the title, "Conditionals". - See below.

nil

What is nil? - Special Ruby data type that means "nothing".
Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "nil". - See below

Symbols

How can symbols be beneficial in Ruby? - Symbols help Ruby use memory efficiently.
Does naming symbols use the same rules for naming variables? - Apparently so.
Take a screenshot of your terminal after working through Step 4, and post it in the comments with the title, "Symbols". - See below.

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' add an element at the end of the array. 'pop' removes the element at the end of the array.

Hashes

Describe some differences between arrays and hashes. - _A hash stores pairs of items, associating keys with values. Hashes make it easy to access items in the list by using 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. When the position does not really help us we should use hashes.

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

@alishersadikov
Copy link
Author

alishersadikov commented Jun 19, 2016

I/O
screen shot 2016-06-19 at 12 34 38 am

@alishersadikov
Copy link
Author

alishersadikov commented Jun 19, 2016

NUMBERS
screen shot 2016-06-19 at 12 55 21 am
screen shot 2016-06-19 at 12 55 32 am

@alishersadikov
Copy link
Author

CONDITIONALS
screen shot 2016-06-19 at 3 04 24 am
screen shot 2016-06-19 at 3 04 52 am

@alishersadikov
Copy link
Author

NIL
screen shot 2016-06-22 at 7 37 20 pm

@alishersadikov
Copy link
Author

SYMBOLS
screen shot 2016-06-22 at 7 58 40 pm

@alishersadikov
Copy link
Author

HASHES
screen shot 2016-06-25 at 7 40 35 pm

@alishersadikov
Copy link
Author

COMPUTER SCIENCE WARMUPS BY BRILLIANT
screen shot 2016-06-26 at 2 09 59 pm
screen shot 2016-06-26 at 2 10 17 pm
screen shot 2016-06-26 at 2 10 34 pm

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