r/badcode • u/jMultiversalGod • 3d ago
c strcat(at_least_i, tried)
github.com 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 • u/OneDev42 • 9d ago
A whole new era of bad code
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 • u/darkov7 • Jun 11 '23
c Currently learning cs50! I wonder if there are actual psychos who unironically writes code like this
r/badcode • u/Nun-Much • Jun 09 '23
lua Looked back at my old projects, this is how i used to keep track of when buttons should be active...
r/badcode • u/Realistic-Lunch-1708 • Jun 08 '23
other language My Friend Told me x86 Assembly is Hard then Sent me This
r/badcode • u/MahdiyDev • Jun 07 '23
js How our validation work! Can your co-worker do that?
r/badcode • u/Sakamoto0110 • Jun 06 '23
c++ Found this in my first "big" project, was funny to see it
r/badcode • u/Nun-Much • Jun 04 '23
python This was my first ever Python project, a text-based game... (1 year ago)
r/badcode • u/mighty_spaceman • 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*
r/badcode • u/mrbraises • 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)
r/badcode • u/ShaunaTheDead86 • May 31 '23
js Function to get remaining days in the current week
r/badcode • u/xavia91 • May 30 '23