November 12, 2022 08:52 pm GMT
Original Link: https://dev.to/thormeier/devto-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5-156i
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 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.sampleif how_i_feel_right_now === "" letsDoThis()enddef 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_doneenddef big_mistakes deploy_on_friday() || buy_twitter()enddef 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 backenddef user_base_has_bots? true # well... yesend
(I had to adjust the code a bit for it to be valid Ruby.)
See you in 24 hours!
Original Link: https://dev.to/thormeier/devto-codes-collaborative-coding-experiment-the-most-liked-comment-picks-the-next-line-of-code-day-5-156i
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To