r/shittyprogramming • u/BlockOfDiamond • Jan 23 '23
Some hilarious code I found on the internet
#define PASTA_LA_VISTA 0
int main(void) {
goto Lasagna;
Tagliatelle: goto Spaghetti;
Lasagna: goto Fusilli;
Spaghetti: return PASTA_LA_VISTA;
Fusilli: goto Tagliatelle;
}
25
Upvotes
25
u/TheZipCreator Jan 23 '23
every C programmer when they discover macros:
23
u/Reelix Jan 23 '23
4 spaces for code formatting on Reddit - It doesn't do tabs.
11
u/cant_think_of_one_ Jan 23 '23
It's funny when it isn't you who has to maintain it, but I genuinely was asked to fix some code that was like this, but not funny. It was Python rather than C, and the variables and functions were all named after the author's boyfriend or penguins/penguin characters. More than half the code had no effect. Ugh, I still get flashbacks.
1
u/Nuptay1 Jan 23 '23
😭🤣🤣🤣🤣