Maria is delivering pizzas to an infinite two-dimensional grid of houses. She begins by delivering a pizza to the house at her starting location, then a dispatcher calls via radio and tells her where to move next. Moves are always exactly one house to the north (^), south (v), east (>), or west (<). After each move, Maria delivers a pizza to the house at her new location. The dispatcher has been a little spacey lately, so Maria sometimes ends up delivering more than one pizza to the same house.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[7:25pm] nkallen_: [7:18pm] nkallen_: but my point is conceptual and not about ruby | |
[7:25pm] nkallen_: [7:18pm] nkallen_: it applies to every oo language and also I might argue to functional languages | |
[7:25pm] nkallen_: [7:18pm] nkallen_: which is to structure a program around the ability to layer on enhanced functionality and ensure that no assumptions are hardcoded by abstracting over the manufacture of objects | |
[7:25pm] nkallen_: [7:19pm] nkallen_: in the literature, these techniques are called DI, decorators, and factories. | |
[7:25pm] nkallen_: [7:20pm] nkallen_: i like these terms because they reflect the concepts that are at work. because ruby might have little ceremony (you don't ever need to name a thing "Factory") doesn't mean the concept of "any object that responds to #new and returns an object that obeys such-and-such ducktype" | |
[7:25pm] nkallen_: [7:20pm] nkallen_: is not a real and useful concept to think about. | |
[7:26pm] wycats_: My concern is about adoption | |
[7:27pm] wycats_: By calling these thin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: 1.1.3-reflection-self | |
Scenario Outline: reflection text based on valid answer to previous question | |
Given prior node "1.1.3-self" has the answer <answer> | |
Then the reflection text for "1.1.3-reflection-self" should be <reflection_text> | |
Scenarios: | |
| answer | reflection_text | | |
| 1 | "So, you were able to talk about yourself without too much stress." | | |
| 2 | "So, you were able to talk about yourself without too much stress." | | |
| 3 | "So it sounds like it was somewhat hard to talk about yourself." | | |
| 4 | "So it sounds like it was somewhat hard to talk about yourself." | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def total_pony_count | |
total_ponies = 0 | |
farms.each do |farm| | |
total_ponies += farm.pony_count | |
end | |
total_ponies | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total_pony_count = | |
farms.inject(0) do |counter, farm| | |
counter += farm.pony_count | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def total_pony_count | |
farms.inject(0) do |counter, farm| | |
counter += farm.pony_count | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total_pony_count = farms.inject(0) do |counter, farm| | |
counter += farm.pony_count | |
end |
I hereby claim:
- I am peashutop on github.
- I am jacob_hodes (https://keybase.io/jacob_hodes) on keybase.
- I have a public key ASCgi9NoYi-FwRQh5cgUAcRzf2utJMt5xSzIKBSAN7OdVAo
To claim this, I am signing this object: