Skip to content

Instantly share code, notes, and snippets.

@megstang
megstang / find_practice.md
Created August 24, 2020 18:52
Find Practice
  numbers = [5,1,13,2,7,9,10]
  1. Use each to return the first element that is divisible by 3.
  2. Refactor the code you implemented for #1 above to use find instead of each.
  3. Use each to find the first element that is greater than 5.
  4. Refactor the code you implemented for #3 above to use find instead of each.
@megstang
megstang / map_practice.md
Created August 24, 2020 18:50
Map Practice
  numbers = [5,1,13,2,7,9,10]
  1. Use each to return an array with every element in the numbers array doubled.
  2. Refactor the code you implemented for #1 above to use map instead of each.
  3. Use each to return true if the element is even and return false if the element is odd.
  4. Refactor the code you implemented for #3 above to use map instead of each.
@megstang
megstang / block_scope_examples.md
Created August 19, 2020 04:02
Block Scope Examples 14-19

Example 14

numbers = [1,2,3]
total = 0
numbers.each do |number|
  total += number
end

p total
@megstang
megstang / argument_scope_examples.md
Created August 19, 2020 04:01
Argument Scope Examples 10-13

Example 10

def print_variable(x)
puts x
end

print_variable(4)
@megstang
megstang / method_scope_examples.md
Created August 19, 2020 04:00
Method Scope Examples 6-9

Example 6

def print_variable
  x = 10
  puts x
end
print_variable
puts x
@megstang
megstang / global_scope_examples.md
Created August 19, 2020 03:58
Global Scope Examples

Example 1

x = 10
puts x
puts y

Example 2

@megstang
megstang / feedback_from_me.md
Last active August 25, 2021 20:16
Project Feedback (Mod 1 && Mod 2)

Project Feedback

Directions

  1. For every partner you have, make a copy of this gist
  2. Fill out the copied gists with feedback for each group project partner (one gist per partner)
  3. Send us your feedback for each partner using the form posted in slack/assignment tracker (one submission per partner)
  4. Individually slack your partners the link of the gist you filled out for them
  5. Spend some time reviewing your partner’s feedback that they sent you
  6. Get on a video call with your partner(s) for the in person partner retro to discuss feedback.
@megstang
megstang / mod_2_repeat_intermission.md
Last active August 5, 2020 21:19
Mod 2 Repeat Intermission Work

BE Mod 2 Repeat Intermission Work

For your Intermission work for this upcoming repeat of Mod 2, we expect that you do #4 and #5 of the Required Intermission Work below. Yes, it is the same thing that you had done at the beginning of this past mod, but we believe it would be good practice for you to work on SQL and the Task Manager one more time. When you're done with the required intermission work, follow submission in the link below.

Required Intermission Work

Below are some optional practices for you, broken up by what they are reviewing:

Video Lessons to review

@megstang
megstang / monster_shop_part_two.md
Last active January 7, 2020 16:15
Monster Shop Part 2

Monster Shop

BE Mod 2 Week 4/5 Group Project (Part 1 && Part 2)

Background and Description

"Monster Shop" is a fictitious e-commerce platform where users can register to place items into a shopping cart and 'check out'. Users who work for a merchant can mark their items as 'fulfilled'; the last merchant to mark items in an order as 'fulfilled' will automatically set the order status to "shipped". Each user role will have access to some or all CRUD functionality for application models.

Students will be put into 3 or 4 person groups to complete the project.\n

Learning Goals

@megstang
megstang / winter_break_m2_practice.md
Last active December 26, 2019 14:51
Winter Break Suggested Practice

Winter Break Suggested Work

None of this is required work, but rather suggested practice for you all. If you ever would like feedback on your code, send us the link to your repo, and tell us what to look at/ask us for a review.

The practice is broken down into three areas:

  1. Mod 1 review
  2. Rails Practice
  3. Active Record Practice

Refresh Your Ruby Skills (Mod 1 Review)