Welcome to day 5! I think we're passt the next "line" of code, so we'll use the most liked "piece" of code from here on. Not an issue, though. Congrats to @rafaelhashimoto for picking this large snippet. I had to adjust it a bit to fit the previous code.
his experiment is inspired by a post on the ProgrammerHumor subreddit, where the original author did this exact thing: The most liked comment after 24 hours picks the next line of code.
The rules:
- Nothing that's against any applicable law
- Nothing that's against the community code of conduct, terms of use, or privacy policy
- No leaking of personal information of anyone
- No malware/ransomware/viruses/etc.
- Keep it civil
- (To be expanded, depending on the case)
Our code so far:
emotions = ["π₯²", "π₯°", "π₯Ί", "π«", "π€¬", "π", "π
", "π", "π°"]
how_i_feel_right_now = emotions.sample
if how_i_feel_right_now === "π"
letsDoThis()
end
def letsDoThis
# things a person can do that will change his humor
what_have_i_done = "π₯²" if big_mistakes
how_i_feel_right_now = what_have_i_done
end
def big_mistakes
deploy_on_friday() || buy_twitter()
end
def buy_twitter
raise AquisitionError, "I won't buy it" if user_base_has_bots?
rescue AquisitionError => e
puts e.message
true # because you can't step back
end
def user_base_has_bots?
true # well... yes
end
(I had to adjust the code a bit for it to be valid Ruby.)
See you in 24 hours!
Top comments (2)
great.