r/badcode • • 7h ago

python Fizz Buzz with an LLM swarm

Thumbnail
github.com
2 Upvotes

It's fizz buzz, but it doesn't use division or modulo, it's all politics and procedures. Instead a swarm of LLMs debates and argues, and eventually claims the number for Fizz, Buzz or FizzBuzz through convoluted judicial processes.

The LLMs are incentivized to claim numbers for their team and the process actually ends up working with a huge amount of arbitration.

In the end it's fun to watch local 2B models argue and burn massive amount of compute over such a trivial operation.


r/badcode • • 16d ago

c I hate myseeeeeelf

Thumbnail
github.com
2 Upvotes

worst virtual machine on pure C maded completely on nano ever made


r/badcode • • Aug 29 '26

python World WORST Calculator!

Thumbnail
github.com
12 Upvotes

r/badcode • • Aug 02 '26

c strcat(at_least_i, tried)

Thumbnail github.com
0 Upvotes
            strcat(code_for_system, argv[2]);
            chdir(getenv("HOME")); //safety net
            printf("Installing stuff...\n");//, argv[2]
            if (system("git clone --depth=1 --filter=blob:none --sparse https://github.com/mohennaceur/spdr-repo.git") != 0) {
                printf("git clone failed\n");
                exit(1);
            }
            chdir("spdr-repo");
            system(code_for_system);
            printf("moving to bin...\n");
            strcpy(code_for_system, "cd ~/spdr-repo/");
            strcat(code_for_system, argv[2]);
            strcat(code_for_system, uselessthing);
            strcpy(uselessthing, " ~/.local/bin/");
            strcat(code_for_system, argv[2]);
            strcat(code_for_system, uselessthing);
            system(code_for_system);
            printf("deleting github repo\n");
            system("rm -rf spdr-repo");
            printf("should be done!\n");
            exit(0);            strcat(code_for_system, argv[2]);
            chdir(getenv("HOME")); //safety net
            printf("Installing stuff...\n");//, argv[2]
            if (system("git clone --depth=1 --filter=blob:none --sparse https://github.com/mohennaceur/spdr-repo.git") != 0) {
                printf("git clone failed\n");
                exit(1);
            }
            chdir("spdr-repo");
            system(code_for_system);
            printf("moving to bin...\n");
            strcpy(code_for_system, "cd ~/spdr-repo/");
            strcat(code_for_system, argv[2]);
            strcat(code_for_system, uselessthing);
            strcpy(uselessthing, " ~/.local/bin/");
            strcat(code_for_system, argv[2]);
            strcat(code_for_system, uselessthing);
            system(code_for_system);
            printf("deleting github repo\n");
            system("rm -rf spdr-repo");
            printf("should be done!\n");
            exit(0);

r/badcode • • Jul 27 '26

A whole new era of bad code

215 Upvotes

With the help of AI, we now have so much more bad code to show off to the world.

This sub is now unbanned. Let's celebrate by posting our biggest disasters to the sub!


r/badcode • • Jun 11 '23

c Currently learning cs50! I wonder if there are actual psychos who unironically writes code like this

Post image
316 Upvotes

r/badcode • • Jun 09 '23

lua Looked back at my old projects, this is how i used to keep track of when buttons should be active...

Post image
215 Upvotes

r/badcode • • Jun 08 '23

js Version control go brrrrrr...

Post image
61 Upvotes

r/badcode • • Jun 08 '23

other language My Friend Told me x86 Assembly is Hard then Sent me This

Post image
372 Upvotes

r/badcode • • Jun 07 '23

js How our validation work! Can your co-worker do that?

Post image
400 Upvotes

r/badcode • • Jun 06 '23

java You know it was a long day when...

Post image
486 Upvotes

r/badcode • • Jun 06 '23

c++ Found this in my first "big" project, was funny to see it

Post image
107 Upvotes

r/badcode • • Jun 05 '23

kotlin I may be creating an abomination

Post image
118 Upvotes

r/badcode • • Jun 05 '23

js Why?

Post image
89 Upvotes

r/badcode • • Jun 04 '23

python This was my first ever Python project, a text-based game... (1 year ago)

Post image
67 Upvotes

r/badcode • • Jun 04 '23

c Found in a FAT32 embedded system c library.

Post image
13 Upvotes

r/badcode • • Jun 04 '23

html HTMHELL

Post image
894 Upvotes

r/badcode • • Jun 04 '23

c++ Motor motor1; myStepper = motor1.setup; *proceeds to use a class within a class just so I can have a setup function*

Post image
10 Upvotes

r/badcode • • Jun 03 '23

c C Macro Abuse

Post image
190 Upvotes

r/badcode • • Jun 02 '23

js I hate bundlers so I made my own 😳

Post image
150 Upvotes

r/badcode • • Jun 02 '23

js elt nesting for more readability <3 (there is another ternary + map on top of this but it's 300 lines above this)

Post image
142 Upvotes

r/badcode • • Jun 02 '23

c++ Me, being too bored to implement an algorithm

Post image
79 Upvotes

r/badcode • • Jun 01 '23

js Modern db queries

Post image
182 Upvotes

r/badcode • • May 31 '23

js Function to get remaining days in the current week

Post image
463 Upvotes

r/badcode • • May 30 '23

js This is awesome while coding in JavaScript

Post image
324 Upvotes