Forem

Pascal Thormeier
Pascal Thormeier

Posted on • Edited on

21

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

This experiment is inspired by a post on the ProgrammerHumor subreddit, where the original author did this exact thing: The most upvoted 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)

So, the first most liked comment decides which language we're going with.

Our code so far:


Enter fullscreen mode Exit fullscreen mode

Let's get going!

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

Top comments (11)

Collapse
 
ben profile image
Ben Halpern • Edited
emotions = ["🥲", "🥰", "🥺", "😫", "🤬", "😞", "😅", "😊", "😰"]
Enter fullscreen mode Exit fullscreen mode

(Ruby)

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

Congrats!

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

A tiny garden in your console!

['🌹','🌻','🍄'].forEach(($) => {console.log($.repeat((1 + Math.random() * 10).toFixed()))});
Enter fullscreen mode Exit fullscreen mode

(JS)

Collapse
 
sherrydays profile image
Sherry Day
let chanceOfSuccess = Math.random();
Enter fullscreen mode Exit fullscreen mode

(JS)

Collapse
 
phlash profile image
Phil Ashby

#! /usr/bin/env python3
Unless anyone fancies writing a polyglot of course!

Collapse
 
alinp25 profile image
Alin Pisica


const getRandomNumber = () => 13

(JS)

Collapse
 
peteole profile image
Ole Petersen
function getValidProgrammingLanguages(task="webdev"):Set<string>{
Enter fullscreen mode Exit fullscreen mode

(Typescript)

Collapse
 
_firelinks profile image
Mike Dabydeen
package main

import "fmt"

func main() {
    fmt.Println("LFG")
}
Enter fullscreen mode Exit fullscreen mode

I choose Go

Collapse
 
orliesaurus profile image
orliesaurus
emotions.shift()
emotions.push("👑")
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nicolus profile image
Nicolus
<?php
Enter fullscreen mode Exit fullscreen mode
Collapse
 
mhcrocky profile image
mhcrocky

Cool idea!
Thanks a lot. I will think about it in near future.

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More