dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5

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 cod…


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Pascal Thormeier

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!


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Pascal Thormeier


Print Share Comment Cite Upload Translate Updates
APA

Pascal Thormeier | Sciencx (2022-11-12T20:52:21+00:00) dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5. Retrieved from https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/

MLA
" » dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5." Pascal Thormeier | Sciencx - Saturday November 12, 2022, https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/
HARVARD
Pascal Thormeier | Sciencx Saturday November 12, 2022 » dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5., viewed ,<https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/>
VANCOUVER
Pascal Thormeier | Sciencx - » dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/
CHICAGO
" » dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5." Pascal Thormeier | Sciencx - Accessed . https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/
IEEE
" » dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5." Pascal Thormeier | Sciencx [Online]. Available: https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/. [Accessed: ]
rf:citation
» dev.to codes! Collaborative coding experiment: The most liked comment picks the next line of code, day 5 | Pascal Thormeier | Sciencx | https://www.scien.cx/2022/11/12/dev-to-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.