Skip to content

Instantly share code, notes, and snippets.

@dmitshur
Created January 13, 2014 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitshur/8396442 to your computer and use it in GitHub Desktop.
Save dmitshur/8396442 to your computer and use it in GitHub Desktop.
Story of my life, in a for loop...
for {
var hmmWhyNotDoItLikeThis Idea = myself.GetNextIdea()
software := hmmWhyNotDoItLikeThis.UnderlyingSoftware()
if software.IsOpenSource() || software.OwnerCompany().DoesEmploy(myself) {
ideaStatus, understanding = hmmWhyNotDoItLikeThis.Evaluate(software.GetSourceCode())
if ideaStatus == GoodIdea ||
(ideaStatus == BadIdea && understanding != nil) {
myself.FeelGood()
if ideaStatus == GoodIdea {
world.Contribute(hmmWhyNotDoItLikeThis)
}
}
} else {
// mother$@#%!&*@$!@$#@!!!!!!!
myself.GetUpset()
}
}
func (*Idea) Evaluate(_ SourceCode) (IdeaStatus, Understanding) {
switch outcome := fate.RollDie(); outcome {
case 1, 2, 3, 4:
return BadIdea, fate.Why()
case 5, 6:
return GoodIdea, fate.Why()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment