DEV Community

Pascal Thormeier
Pascal Thormeier

Posted on • Updated on

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.