Created
September 15, 2009 10:20
-
-
Save jimeh/187214 to your computer and use it in GitHub Desktop.
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
# | |
# The dumbest piece of code I've EVER written. | |
# | |
# I REALLY don't know WTF I was thinking, or not thinking. | |
# I must have been drunk and asleep while I wrote this method. | |
# | |
# It's not only stupid, but IT DOESN'T EVEN WORK! *stabs self in face* | |
# | |
def stupid_method | |
data = fetch.some(:data) | |
if !(data.prop_1 == "something" && data.prop_2 == "something else") | |
@result = false | |
else | |
@result = true | |
end | |
@result = true | |
end | |
# | |
# Looking at it today, I fixed it in 30 seconds after screaming | |
# "WHAT THE FUCK?!?" for 25 seconds. | |
# | |
def stupid_method | |
data = fetch.some(:data) | |
@result = false | |
if data.prop_1 == "something" && data.prop_2 == "something else" | |
@result = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Further simplification: