Skip to content

Instantly share code, notes, and snippets.

@ijonas
Last active December 26, 2015 05:19
Show Gist options
  • Save ijonas/7100217 to your computer and use it in GitHub Desktop.
Save ijonas/7100217 to your computer and use it in GitHub Desktop.
kisselbug - when you get your if-condition the wrong way round.... As epitomised almost daily by the Great Indigenous Ijonous as he traversed the frozen wastelands of Software Development.
class Kisselbugger
def something_that_evaluates_to_true
# ...
end
def decide_and_do_something
# several hours of looking at line 9 results in a: "AArgh, ya wee bugger. Not again!"
if not something_that_evaluates_to_true
do_the_true_response
else
do_the_false_response
end
end
def do_the_true_response
# ...
end
def do_the_false_response
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment