Skip to content

Instantly share code, notes, and snippets.

@chris-olszewski
Created September 24, 2014 03:54
Show Gist options
  • Save chris-olszewski/ac3f21c14dc932118f09 to your computer and use it in GitHub Desktop.
Save chris-olszewski/ac3f21c14dc932118f09 to your computer and use it in GitHub Desktop.
# taken from http://omniref.com/blog/blog/2014/09/19/programmers-are-hipster-librarians/
while coding do
next unless Problem.unsolved?
frustration = 1
question = Question.formulate(Problem)
while frustration < MAX_FRUSTRATION
answer = PersonalExperience.search(question) || InterTubes.search(question)
break unless answer.nil?
question.rephrase!
frustration += 1
end
Problem.solve!(answer) || raise IGiveUp("I'm moving to the wilderness and raising goats.")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment