DEV Community

Pascal Thormeier
Pascal Thormeier

Posted on โ€ข Edited on

19

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

Day 2! The response on the first post was amazing, thanks to everyone that contributed! @ben's comment got the most likes and you all decided that we'll go with Ruby.

This 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 = ["๐Ÿฅฒ", "๐Ÿฅฐ", "๐Ÿฅบ", "๐Ÿ˜ซ", "๐Ÿคฌ", "๐Ÿ˜ž", "๐Ÿ˜…", "๐Ÿ˜Š", "๐Ÿ˜ฐ"]
Enter fullscreen mode Exit fullscreen mode

See you in 24 hours!

EDIT: Voting has ended! If you want to contribute code or likes, please see the newest post of the series.

Image of Timescale

๐Ÿš€ pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applicationsโ€”without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post โ†’

Top comments (14)

Collapse
 
sherrydays profile image
Sherry Day โ€ข โ€ข Edited
how_i_feel_right_now = emotions.sample
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mhcrocky profile image
mhcrocky โ€ข

pow!!!

Collapse
 
nickytonline profile image
Nick Taylor โ€ข โ€ข Edited
const thereCanOnlyBeOne = new Set([
    'highlander', 'highlander', 'highlander', 'highlander'
])
Enter fullscreen mode Exit fullscreen mode

Highlander saying, "There can only be one!"

Collapse
 
ben profile image
Ben Halpern โ€ข

Since weโ€™re rolling with Ruby, Iโ€™d suggest tagging the post with #ruby and maybe maybe emphasizing that more in tomorrowโ€™s post ๐Ÿ™‚

Collapse
 
thormeier profile image
Pascal Thormeier โ€ข

Good idea! Adapted the tags, thanks for the headsup.

Collapse
 
thormeier profile image
Pascal Thormeier โ€ข

To be fair, this post received more views in less time! I think the Ruby community should not be underestimated :D

Collapse
 
renancferro profile image
Renan Ferro โ€ข โ€ข Edited
how_hasnot_had_coffee = emotions.find(emotions => emotions === "๐Ÿคฌ");
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mhcrocky profile image
mhcrocky โ€ข

funny!!!

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo) โ€ข โ€ข Edited
emotions_index = ["smiling with a tear", "in love", "pleading with puppy eyes", "tired", "angry", "disappointed", "embarrassed", "flattered", "worried"]
Enter fullscreen mode Exit fullscreen mode
Collapse
 
adiatiayu profile image
Ayu Adiati โ€ข

@nickytonline I bet you have something! ๐Ÿ˜€

Collapse
 
cataua profile image
Rogรฉrio Caetano โ€ข

zodiac_sign_w_no_emotions = emotions.filter((emotion) => !emotion.includes(["๐Ÿฅฒ", "๐Ÿฅฐ", "๐Ÿ˜…", "๐Ÿ˜Š"]))

Collapse
 
baasmurdo profile image
BaasMurdo โ€ข
actions= ["๐Ÿ˜ด", "๐Ÿคฎ", "๐Ÿฅถ", "๐Ÿคฏ", "๐Ÿฅณ", "๐Ÿ˜ฑ", "๐Ÿ’ฅ", "๐Ÿ’จ", "๐Ÿ‘‹"]
Enter fullscreen mode Exit fullscreen mode
Collapse
 
adam_cyclones profile image
Adam Crockett ๐ŸŒ€ โ€ข โ€ข Edited
const emotions = [...globalThis.emotions]; delete globalThis.emotions;
Enter fullscreen mode Exit fullscreen mode

Sentry image

See why 4M developers consider Sentry, โ€œnot bad.โ€

Fixing code doesnโ€™t have to be the worst part of your day. Learn how Sentry can help.

Learn more