Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save davidagitlen/39c5a94f4413066727d5e0c47086a03f to your computer and use it in GitHub Desktop.

Select an option

Save davidagitlen/39c5a94f4413066727d5e0c47086a03f to your computer and use it in GitHub Desktop.

Revisions

  1. davidagitlen revised this gist Mar 19, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -150,4 +150,5 @@ export PS1="\u\w\`parse_git_branch\`$ "

    If you have any questions, comments, or confusions from the any of the readings that you would an instructor to address, list them below:

    1.
    1. What is the %r{\s*} in the split section of the ruby doc page you gave us?
    2. A friend already put zsh/oh my zsh on my terminal so I'm not sure if the bash profile update will do what it's supposed to!
  2. davidagitlen revised this gist Mar 19, 2019. No changes.
  3. davidagitlen revised this gist Mar 18, 2019. No changes.
  4. davidagitlen revised this gist Mar 18, 2019. No changes.
  5. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -88,7 +88,7 @@ Imagine that you're taking your favorite board game and turning it into a comput
    - [ ] Create a list below of **three programming situations** where iteration would be used. For each situation, explain why it would be an example of iteration.
    - giving a list of available goods in an online store - could loop through a list of inventory and subtract the number of items sold since the last restocking date and return the values that are greater than zero
    - a program/loop that plays an alarm at specified times - it would check the time repeatedly, and then perform a pre-determined action only when it returned the specified value
    - generating an appropriate greeting - display a greeting by accessing the appropriate data entered by a user into a form and inserting it, saying "Hi, *username*! Welcome to *site*!" Could also check their birthday agains the date and give them a birthday greeting
    - generating an appropriate greeting - display a greeting by accessing the appropriate data entered by a user into a form and inserting it into a preset string, saying "Hi, *username*! Welcome to *site*!" Could also check their birthday agains the date and give them a birthday greeting


    ### 4. Modify your Bash Profile (10 min)
  6. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 7 additions and 6 deletions.
    13 changes: 7 additions & 6 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -81,14 +81,15 @@ Imagine that you're taking your favorite board game and turning it into a comput
    ### 3. Iteration (30 min)

    - [ ] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration.
    -
    -
    -
    - Playing a piece of music through one time - you go through what is essentially an array of notes, and for each one perform a the action of playing the note, on whatever instrument specified, and then stop when you get to the end
    - A bartender closing out people's tabs - the bartender goes through each card they have behind the bar and performs the action of charging an amount to the card based on what each individual owes
    - filling in a sudoku - you take each 3x3 box, row, and column, and fill them in with the numbers 1-9 such that each box, row, and column contain them only once, then stop when they're filled

    - [ ] Create a list below of **three programming situations** where iteration would be used. For each situation, explain why it would be an example of iteration.
    -
    -
    -
    - giving a list of available goods in an online store - could loop through a list of inventory and subtract the number of items sold since the last restocking date and return the values that are greater than zero
    - a program/loop that plays an alarm at specified times - it would check the time repeatedly, and then perform a pre-determined action only when it returned the specified value
    - generating an appropriate greeting - display a greeting by accessing the appropriate data entered by a user into a form and inserting it, saying "Hi, *username*! Welcome to *site*!" Could also check their birthday agains the date and give them a birthday greeting


    ### 4. Modify your Bash Profile (10 min)

  7. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -32,20 +32,20 @@ Documentation of a langauge, framework, or tool is the information that describe

    There are multiple options for how this can turn out: the delimiter is a string, in which case the parts of the original string that are matching are used to separate the rest and are not themselves returned in the final array; the delimiter can be a regular expression, which are patterns formed with either /*pat*/ or %r{*pat*}, or constructed with regexp.new, whereby *pat* is used as the delimiter; the delimiter can not be specified at all (just writing .split after the string), in which case it assumes the value of $; (which is a predefined value in Ruby and defaults to nil) and splits the string on the whitespace as if the user had written .split(' ') or .split(/ /). If the optional limit is left out it returns an array with a number of elements equal to the non-null fields in the original string, if it is a positive number it returns an array with that number of elements as the maximum (attempting to use the delimiter as many times as it can before returning the rest of the string as one element, including the null fields of the string), and if it is a negative number there is no limit to the number of elements in the returned array and it returns all null fields of the original string as separate elements.

    So, using the above order on the string "That's at Pat's house" we could have:
    So, using the above order on the string "That\'s at Pat\'s house" we could have:

    "That's at Pat's house".split("at") which would return ["Th", "'s ", " P", "'s ", "house"]
    "That\'s at Pat\'s house".split("at") which would return ["Th", "'s ", " P", "'s ", "house"]

    "That's at Pat's house".split(/ /) #=> ["That's", "at", "Pat's", "house"]
    "That\'s at Pat\'s house".split(/ /) #=> ["That's", "at", "Pat's", "house"]

    "That's at Pat's house".split(//, 4) #=> ["T", "h", "a", "t's at Pat's house"]
    "That\'s at Pat\'s house".split(//, 4) #=> ["T", "h", "a", "t's at Pat's house"]

    "That's at Pat's house".split #=> ["That's", "at", "Pat's", "house"]
    "That\'s at Pat\'s house".split #=> ["That's", "at", "Pat's", "house"]


    - [ ] What did you Google to help you with this task, and how did you pick your results?

    I googled a lot of different things, different examples of split, as well as "delimiter programming definition", "$; ruby" and "predefined variable ruby", and "regexp ruby", and I tended to use the top definitions, additional information from ruby-doc.org, as well as an explanation of some common predefined variables from tutorialspoint.com. Again, I was trying to confirm information given in the provided reference, as well as look up what I assumed were fairly well-known terms, so I went for the top hits.
    I googled a lot of different things, different examples of split, as well as "delimiter programming definition", "$; ruby" and "predefined variable ruby", and "regexp ruby", and I tended to use the top definitions, additional information from ruby-doc.org, as well as an explanation of some common predefined variables from tutorialspoint.com. Again, I was trying to confirm information given in the provided reference, as well as look up what I assumed were fairly well-known terms, so I went for the top hits.

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:

  8. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 10 additions and 6 deletions.
    16 changes: 10 additions & 6 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -57,22 +57,26 @@ Documentation of a langauge, framework, or tool is the information that describe

    - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer:

    This returns the values of a given object as an array. So, if we had dog = {"tails": "one", "legs": "three", "nose":"wet", "friends":"everyone"} logging object.values(dog) to the console would give us the following array: ["one", "three", "wet", "everyone"].

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    Googling "object.values javascript" resulted in the top hits being essentially the same documentation on MDN, as well as a page on geeksforgeeks, which was talking about objects and constructors. Further searching "object.values javascript stackoverflow" returned a result from 2017 about how IE11 does not support this function...


    ### 2. Data Types (15 min)

    Imagine that you're taking your favorite board game and turning it into a computer-based game.

    - [ ] Name of board game: ______
    - [ ] Name of board game: _**Pandemic: Legacy**_

    - [ ] Use the space below to categorize game data into each of the following data types. You should have a **minimum of two** pieces of data for each category.

    1. String data:
    1. Integer and/or float data:
    1. Boolean data:
    1. Array data:
    1. Hash or Object data:
    1. String data: character names, names of cities, types of actions
    1. Integer and/or float data: maximum number of actions per turn, actions used in current turn, tracker for number of outbreaks
    1. Boolean data: cities are connected (true/false), disease is cured or eradicated (true/false)
    1. Array data: cities that are currently "on the grid" and connected, number of disease/supply cubes per city, cards in deck
    1. Hash or Object data: character profiles with scars/abilities, collection of available funded events with names and descriptions, collection of available unfunded events with names and descriptions

    ### 3. Iteration (30 min)

  9. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -49,7 +49,7 @@ Documentation of a langauge, framework, or tool is the information that describe

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:

    Slice returns a portion of an array as a new array object, with at least the start of the "slicing" provided (but not necessarily the end), where the start and end points are given as integers referencing the index of the array, which starts at 0. So, if we declared var colors = [black, white, grey, red, green, yellow] and we wanted to separate them into two new arrays we could do as follows: var monochrome= colors.slice(0, 3); var chromatic= colors.slice(3); and (I think) we would end up with two new arrays, one of them containing the elements indexed at 0, 1, and 2, and the next containing the elements from the one indexed at 3 until the end of the original array.
    Slice returns a portion of an array as a new array object, with at least the start of the "slicing" provided (but not necessarily the end), where the start and end points are given as integers referencing the index of the array, which starts at 0. So, if we declared var colors = ['black', 'white', 'gray', 'red', 'green', 'yellow'] and we wanted to separate them into two new arrays we could do as follows: var monochrome= colors.slice(0, 3); var chromatic= colors.slice(3); and (I think) we would end up with two new arrays, one of them containing the elements indexed at 0, 1, and 2, and the next containing the elements from the one indexed at 3 until the end of the original array.

    - [ ] What did you Google to help you with this task, and how did you pick your results?

  10. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -47,10 +47,14 @@ Documentation of a langauge, framework, or tool is the information that describe

    I googled a lot of different things, different examples of split, as well as "delimiter programming definition", "$; ruby" and "predefined variable ruby", and "regexp ruby", and I tended to use the top definitions, additional information from ruby-doc.org, as well as an explanation of some common predefined variables from tutorialspoint.com. Again, I was trying to confirm information given in the provided reference, as well as look up what I assumed were fairly well-known terms, so I went for the top hits.

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:
    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:

    Slice returns a portion of an array as a new array object, with at least the start of the "slicing" provided (but not necessarily the end), where the start and end points are given as integers referencing the index of the array, which starts at 0. So, if we declared var colors = [black, white, grey, red, green, yellow] and we wanted to separate them into two new arrays we could do as follows: var monochrome= colors.slice(0, 3); var chromatic= colors.slice(3); and (I think) we would end up with two new arrays, one of them containing the elements indexed at 0, 1, and 2, and the next containing the elements from the one indexed at 3 until the end of the original array.

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    I googled "slice javascript stackoverflow" as well as "indexing array javascript" and looked at the MDN webdocs and first stackoverflow results, as they not only contained the information I was looking for, but they are two of the recommended sites to use!

    - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer:

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  11. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 15 additions and 3 deletions.
    18 changes: 15 additions & 3 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -16,25 +16,37 @@ Documentation of a langauge, framework, or tool is the information that describe

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    To confirm what was given in the drop documentation provided I googled "drop array ruby" and looked at the example given in apidock.com as well as stackoverflow. The apidock answer contained the same information as the ruby-doc provided, so I went with that primarily, the first stackoverflow question was about "dropping the *end* of an array" and the best answer for the user's situation was slice, so that was not directly relavent to this...
    To confirm what was given in the drop documentation provided I googled "drop array ruby" and looked at the example given in apidock.com as well as stackoverflow. The apidock answer contained the same information as the ruby-doc provided, so I went with that primarily, the first stackoverflow question was about "dropping the *end* of an array" and the best answer for the user's situation was slice, so that was not directly relavent to this... Since I was trying to match the information already given I was basically looking for top answers that contained similar information.

    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer:

    It appends the specified arguments to the end of the array. So, if we took the same array above a = [1, 2, 3, 5, 8] we could modify it with a.push(13, 21, 34) to get a = [1, 2, 3, 5, 8, 13, 21, 34]. Looks like we can also write multiple ones in a row to provide additional elements individually (?) like [1, 2, 3, 5, 8].push(13).push(21).push(34) to get the same result.

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    To verify and try out a few different searches (and also see if I could get more specific information on the "chaining" thing) I searched for "push array Ruby" as well as "append to an array push Ruby", and found basic confirmation on gistpages and apidock again. Apidock also mentions that multiple ones can be chained together because this expression returns the array itself. Googling "chaining push ruby" gave the same wording on docs.ruby-lang.org for the top hit.
    To verify and try out a few different searches (and also see if I could get more specific information on the "chaining" thing) I searched for "push array Ruby" as well as "append to an array push Ruby", and found basic confirmation on gistpages and apidock again. Apidock also mentions that multiple ones can be chained together because this expression returns the array itself. Googling "chaining push ruby" gave the same wording on docs.ruby-lang.org for the top hit.

    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer:

    Split takes a string and divies it up using a specified value (the delimiter) and then returns an array as a result, with the option to specify the maximum number of elements in the final array.
    Split takes a string and divies it up using a specified sequence of characters (the delimiter) and then returns an array as a result, with the option to specify the maximum number of elements in the final array.

    There are multiple options for how this can turn out: the delimiter is a string, in which case the parts of the original string that are matching are used to separate the rest and are not themselves returned in the final array; the delimiter can be a regular expression, which are patterns formed with either /*pat*/ or %r{*pat*}, or constructed with regexp.new, whereby *pat* is used as the delimiter; the delimiter can not be specified at all (just writing .split after the string), in which case it assumes the value of $; (which is a predefined value in Ruby and defaults to nil) and splits the string on the whitespace as if the user had written .split(' ') or .split(/ /). If the optional limit is left out it returns an array with a number of elements equal to the non-null fields in the original string, if it is a positive number it returns an array with that number of elements as the maximum (attempting to use the delimiter as many times as it can before returning the rest of the string as one element, including the null fields of the string), and if it is a negative number there is no limit to the number of elements in the returned array and it returns all null fields of the original string as separate elements.

    So, using the above order on the string "That's at Pat's house" we could have:

    "That's at Pat's house".split("at") which would return ["Th", "'s ", " P", "'s ", "house"]

    "That's at Pat's house".split(/ /) #=> ["That's", "at", "Pat's", "house"]

    "That's at Pat's house".split(//, 4) #=> ["T", "h", "a", "t's at Pat's house"]

    "That's at Pat's house".split #=> ["That's", "at", "Pat's", "house"]


    - [ ] What did you Google to help you with this task, and how did you pick your results?

    I googled a lot of different things, different examples of split, as well as "delimiter programming definition", "$; ruby" and "predefined variable ruby", and "regexp ruby", and I tended to use the top definitions, additional information from ruby-doc.org, as well as an explanation of some common predefined variables from tutorialspoint.com. Again, I was trying to confirm information given in the provided reference, as well as look up what I assumed were fairly well-known terms, so I went for the top hits.

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  12. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -24,10 +24,15 @@ Documentation of a langauge, framework, or tool is the information that describe

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    To verify and try out a few different searches (and also see if I could get more specific information on the "chaining" thing) I searched for "push array Ruby" as well as "append to an array push Ruby", and found basic confirmation on gistpages and apidock again. Apidock also mentions that multiple ones can be chained together because this expression returns the array itself.
    To verify and try out a few different searches (and also see if I could get more specific information on the "chaining" thing) I searched for "push array Ruby" as well as "append to an array push Ruby", and found basic confirmation on gistpages and apidock again. Apidock also mentions that multiple ones can be chained together because this expression returns the array itself. Googling "chaining push ruby" gave the same wording on docs.ruby-lang.org for the top hit.

    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer:

    Split takes a string and divies it up using a specified value (the delimiter) and then returns an array as a result, with the option to specify the maximum number of elements in the final array.

    There are multiple options for how this can turn out: the delimiter is a string, in which case the parts of the original string that are matching are used to separate the rest and are not themselves returned in the final array; the delimiter can be a regular expression, which are patterns formed with either /*pat*/ or %r{*pat*}, or constructed with regexp.new, whereby *pat* is used as the delimiter; the delimiter can not be specified at all (just writing .split after the string), in which case it assumes the value of $; (which is a predefined value in Ruby and defaults to nil) and splits the string on the whitespace as if the user had written .split(' ') or .split(/ /). If the optional limit is left out it returns an array with a number of elements equal to the non-null fields in the original string, if it is a positive number it returns an array with that number of elements as the maximum (attempting to use the delimiter as many times as it can before returning the rest of the string as one element, including the null fields of the string), and if it is a negative number there is no limit to the number of elements in the returned array and it returns all null fields of the original string as separate elements.


    - [ ] What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:
  13. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -10,16 +10,22 @@ Documentation of a langauge, framework, or tool is the information that describe

    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:
    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:

    It removes the first *n* elements of a given array and then returns the modified array. So, if you had a = [1, 2, 3, 5, 8] and then a.drop(2) it will remove the first two and return the rest, resulting in a = [3, 5, 8].

    - [ ] What did you Google to help you with this task, and how did you pick your results?
    To confirm what was given in the drop documentation provided I googled "drop array ruby" and looked at example given in apidock.com

    To confirm what was given in the drop documentation provided I googled "drop array ruby" and looked at the example given in apidock.com as well as stackoverflow. The apidock answer contained the same information as the ruby-doc provided, so I went with that primarily, the first stackoverflow question was about "dropping the *end* of an array" and the best answer for the user's situation was slice, so that was not directly relavent to this...

    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer:

    It appends the specified arguments to the end of the array. So, if we took the same array above a = [1, 2, 3, 5, 8] we could modify it with a.push(13, 21, 34) to get a = [1, 2, 3, 5, 8, 13, 21, 34]. Looks like we can also write multiple ones in a row to provide additional elements individually (?) like [1, 2, 3, 5, 8].push(13).push(21).push(34) to get the same result.

    - [ ] What did you Google to help you with this task, and how did you pick your results?

    To verify and try out a few different searches (and also see if I could get more specific information on the "chaining" thing) I searched for "push array Ruby" as well as "append to an array push Ruby", and found basic confirmation on gistpages and apidock again. Apidock also mentions that multiple ones can be chained together because this expression returns the array itself.

    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer:

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  14. davidagitlen revised this gist Mar 18, 2019. No changes.
  15. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,6 @@ Documentation of a langauge, framework, or tool is the information that describe
    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:

    It removes the first *n* elements of a given array and then returns the modified array. So, if you had a = [1, 2, 3, 5, 8] and then a.drop(2) it will remove the first two and return the rest, resulting in a = [3, 5, 8].

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  16. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,8 @@ Documentation of a langauge, framework, or tool is the information that describe

    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: return
    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:

    It removes the first *n* elements of a given array and then returns the modified array. So, if you had a = [1, 2, 3, 5, 8] and then a.drop(2) it will remove the first two and return the rest, resulting in a = [3, 5, 8].

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  17. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ Documentation of a langauge, framework, or tool is the information that describe

    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:
    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer: return
    It removes the first *n* elements of a given array and then returns the modified array. So, if you had a = [1, 2, 3, 5, 8] and then a.drop(2) it will remove the first two and return the rest, resulting in a = [3, 5, 8].

    - [ ] What did you Google to help you with this task, and how did you pick your results?
  18. davidagitlen revised this gist Mar 18, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -11,8 +11,10 @@ Documentation of a langauge, framework, or tool is the information that describe
    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:
    It removes the first *n* elements of a given array and then returns the modified array. So, if you had a = [1, 2, 3, 5, 8] and then a.drop(2) it will remove the first two and return the rest, resulting in a = [3, 5, 8].

    - [ ] What did you Google to help you with this task, and how did you pick your results?
    To confirm what was given in the drop documentation provided I googled "drop array ruby" and looked at example given in apidock.com

    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer:

  19. @rwarbelow rwarbelow revised this gist Feb 18, 2019. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -47,8 +47,6 @@ Imagine that you're taking your favorite board game and turning it into a comput

    ### 3. Iteration (30 min)

    - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! When you're done, take a photo of your diagram and post it in the Mod 0 channel on Slack. Your instructor(s) will provide feedback in a thread. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_

    - [ ] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration.
    -
    -
  20. @rwarbelow rwarbelow revised this gist Feb 15, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -111,7 +111,7 @@ function parse_git_dirty {
    fi
    }
    export PS1="\u\w\`parse_git_branch\` $ "
    export PS1="\u\w\`parse_git_branch\`$ "
    ```

    ### 5. Questions/Comments/Confusions
  21. @rwarbelow rwarbelow revised this gist Feb 15, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -111,7 +111,7 @@ function parse_git_dirty {
    fi
    }
    export PS1="\u\w\`parse_git_branch\` "
    export PS1="\u\w\`parse_git_branch\` $ "
    ```

    ### 5. Questions/Comments/Confusions
  22. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -59,7 +59,7 @@ Imagine that you're taking your favorite board game and turning it into a comput
    -
    -

    ### 4. Modify your Bash Profile (15 min)
    ### 4. Modify your Bash Profile (10 min)

    - [ ] Watch [this video](https://drive.google.com/file/d/1s_CDBnxHSA0HDWldjosulthAvBi-C-d5/view?usp=sharing) and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below:

  23. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ Imagine that you're taking your favorite board game and turning it into a comput

    ### 4. Modify your Bash Profile (15 min)

    - [ ] Watch [this video]() and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below:
    - [ ] Watch [this video](https://drive.google.com/file/d/1s_CDBnxHSA0HDWldjosulthAvBi-C-d5/view?usp=sharing) and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below:

    ```
    # get current branch in git repo
  24. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 52 additions and 1 deletion.
    53 changes: 52 additions & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,58 @@ Imagine that you're taking your favorite board game and turning it into a comput

    ### 4. Modify your Bash Profile (15 min)

    - [ ] Watch [this video]() and follow each step to modify your own bash profile.
    - [ ] Watch [this video]() and follow each step to modify your own bash profile. As mentioned in the video, you will need this snippet below:

    ```
    # get current branch in git repo
    function parse_git_branch() {
    BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
    if [ ! "${BRANCH}" == "" ]
    then
    STAT=`parse_git_dirty`
    echo "[${BRANCH}${STAT}]"
    else
    echo ""
    fi
    }
    # get current status of git repo
    function parse_git_dirty {
    status=`git status 2>&1 | tee`
    dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
    untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
    ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
    newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
    renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
    deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
    bits=''
    if [ "${renamed}" == "0" ]; then
    bits=">${bits}"
    fi
    if [ "${ahead}" == "0" ]; then
    bits="*${bits}"
    fi
    if [ "${newfile}" == "0" ]; then
    bits="+${bits}"
    fi
    if [ "${untracked}" == "0" ]; then
    bits="?${bits}"
    fi
    if [ "${deleted}" == "0" ]; then
    bits="x${bits}"
    fi
    if [ "${dirty}" == "0" ]; then
    bits="!${bits}"
    fi
    if [ ! "${bits}" == "" ]; then
    echo " ${bits}"
    else
    echo ""
    fi
    }
    export PS1="\u\w\`parse_git_branch\` "
    ```

    ### 5. Questions/Comments/Confusions

  25. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -61,7 +61,7 @@ Imagine that you're taking your favorite board game and turning it into a comput

    ### 4. Modify your Bash Profile (15 min)

    Watch [this video]() and follow each step to modify your own bash profile.
    - [ ] Watch [this video]() and follow each step to modify your own bash profile.

    ### 5. Questions/Comments/Confusions

  26. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -59,3 +59,12 @@ Imagine that you're taking your favorite board game and turning it into a comput
    -
    -

    ### 4. Modify your Bash Profile (15 min)

    Watch [this video]() and follow each step to modify your own bash profile.

    ### 5. Questions/Comments/Confusions

    If you have any questions, comments, or confusions from the any of the readings that you would an instructor to address, list them below:

    1.
  27. @rwarbelow rwarbelow revised this gist Feb 14, 2019. 1 changed file with 11 additions and 21 deletions.
    32 changes: 11 additions & 21 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -10,35 +10,25 @@ Documentation of a langauge, framework, or tool is the information that describe

    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example.
    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example. Your answer:

    Your answer:
    - [ ] What did you Google to help you with this task, and how did you pick your results?

    What did you Google to help you with this task, and how did you pick your results?
    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example. Your answer:

    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example.
    - [ ] What did you Google to help you with this task, and how did you pick your results?

    Your answer:
    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example. Your answer:

    What did you Google to help you with this task, and how did you pick your results?
    - [ ] What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example.
    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example. Your answer:

    Your answer:
    - [ ] What did you Google to help you with this task, and how did you pick your results?

    What did you Google to help you with this task, and how did you pick your results?
    - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example. Your answer:

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?
    - [ ] What did you Google to help you with this task, and how did you pick your results?


    ### 2. Data Types (15 min)
    @@ -57,7 +47,7 @@ Imagine that you're taking your favorite board game and turning it into a comput

    ### 3. Iteration (30 min)

    - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! This should *not* be the simple table that we used during the lesson. When you're done, take a photo of your diagram and send it to Rachel and Tim on Slack. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_
    - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! When you're done, take a photo of your diagram and post it in the Mod 0 channel on Slack. Your instructor(s) will provide feedback in a thread. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_

    - [ ] Create a list below of **three real-life situations** where iteration is used. For each situation, explain why it would be an example of iteration.
    -
  28. @rwarbelow rwarbelow revised this gist Jan 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Session 2 Practice Tasks

    The assignments listed here should take you approximately ___ total minutes.
    The assignments listed here should take you approximately 2 hours.

    To start this assignment, click the button in the upper right-hand corner that says **Fork**. This is now your copy of the document. Click the **Edit** button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

  29. @rwarbelow rwarbelow revised this gist Jan 21, 2019. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@ The assignments listed here should take you approximately ___ total minutes.

    To start this assignment, click the button in the upper right-hand corner that says **Fork**. This is now your copy of the document. Click the **Edit** button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

    ### 1. Documentation
    ### 1. Documentation and Googling (75 min)

    Documentation of a langauge, framework, or tool is the information that describes its functionality. For this part of the practice tasks, you're going to practice digging into documentation.
    Documentation of a langauge, framework, or tool is the information that describes its functionality. For this part of the practice tasks, you're going to practice digging into documentation and other reference material.

    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    @@ -41,7 +41,7 @@ Your answer:
    What did you Google to help you with this task, and how did you pick your results?


    ### 2. Data Types
    ### 2. Data Types (15 min)

    Imagine that you're taking your favorite board game and turning it into a computer-based game.

    @@ -55,7 +55,7 @@ Imagine that you're taking your favorite board game and turning it into a comput
    1. Array data:
    1. Hash or Object data:

    ### 3. Iteration
    ### 3. Iteration (30 min)

    - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! This should *not* be the simple table that we used during the lesson. When you're done, take a photo of your diagram and send it to Rachel and Tim on Slack. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_

  30. @rwarbelow rwarbelow revised this gist Jan 21, 2019. 1 changed file with 15 additions and 7 deletions.
    22 changes: 15 additions & 7 deletions mod_0_session_2_practice_tasks.md
    Original file line number Diff line number Diff line change
    @@ -4,36 +4,44 @@ The assignments listed here should take you approximately ___ total minutes.

    To start this assignment, click the button in the upper right-hand corner that says **Fork**. This is now your copy of the document. Click the **Edit** button when you're ready to start adding your answers. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

    ### 1. Googling
    ### 1. Documentation

    [Need ideas]
    Documentation of a langauge, framework, or tool is the information that describes its functionality. For this part of the practice tasks, you're going to practice digging into documentation.

    ### 2. Documentation

    Documentation of a langauge, framework, or tool is the information that describes its functionality. For this part of the practice tasks, you're going to practice digging into documentation. **If you're reading the documentation and come across terminology or examples that don't make sense, Google!**
    **NOTE:** The linked documentation for each question below is a good starting place, but you should also be practicing your Googling skills and sifting through the results to find relevant and helpful sites.

    - [ ] In your own words, what does the Ruby array [drop](https://ruby-doc.org/core-2.4.0/Array.html#method-i-drop) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the Ruby array [push](https://ruby-doc.org/core-2.4.0/Array.html#method-i-push) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the Ruby string [split](https://ruby-doc.org/core-2.4.0/String.html#method-i-split) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the JavaScript array [slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?

    - [ ] In your own words, what does the JavaScript object [values](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values) method do? As you're explaining, be sure to provide an example.

    Your answer:

    What did you Google to help you with this task, and how did you pick your results?


    ### 3. Data Types
    ### 2. Data Types

    Imagine that you're taking your favorite board game and turning it into a computer-based game.

    @@ -47,7 +55,7 @@ Imagine that you're taking your favorite board game and turning it into a comput
    1. Array data:
    1. Hash or Object data:

    ### 4. Iteration
    ### 3. Iteration

    - [ ] On a blank sheet of paper, create a diagram that shows how you understand iteration working. Be detailed and get creative! This should *not* be the simple table that we used during the lesson. When you're done, take a photo of your diagram and send it to Rachel and Tim on Slack. _(If you're feeling extra fancy, feel free to create your diagram using software instead of pencil and paper)_