Skip to content

Instantly share code, notes, and snippets.

@undecided

undecided/rubber_duck.rb

Last active Aug 29, 2015
Embed
What would you like to do?
#!/usr/bin/env ruby
average_pause_mins = 1
phrases = [
"Can we try taking smaller steps to reach this solution?",
"I think that might need a refactor",
"This is looking good",
"Are the tests passing yet?",
"I wish we could automate this, what do you think?",
"Does this class look like it has a single responsibility?"
]
while true
phrases.shuffle.each do |phrase|
half = average_pause_mins / 2.0
quarter = half / 2.0
sleep(60 * (average_pause_mins + (rand * half) - quarter))
`say "#{phrase}"`
end
end
@undecided

This comment has been minimized.

Copy link
Owner Author

@undecided undecided commented Feb 12, 2014

(only works on OSX, btw)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.