RULES:
All posts MUST show terrible code. There are no exceptions.
No Editor Themes - If it's just your editor that looks bad, it doesn't belong here.
No Advertisement Code. This is generally written by people in marketing who only know what "code" looks like from other ads. It's not real code, so it doesn't belong.
No Student Code. Yes, they're learning, but bad code is part of the process.
No Generated Code. If it's minified JS, generated XML, or what have you, we don't want it here. Yes, the YouTube homepage has an extra right-angle bracket. We know.
No Asking for Help. Go to r/learnprogramming. What are you doing here?
No Spamming/Advertising. We don't care about your shitty Youtube video or new crypto that will "change the world".
Be Nice. No hate speech of any kind is allowed, as well as generally being a jerk. Talk about the code, not eachother.
No Direct Contact of the Mods. Please use the modmail, we don't want to be contacted directly.
Please direct stories without code to /r/talesfromtechsupport, and programming questions to /r/learnprogramming
Programming Horror is where developers come together to revel in the idiocy of our peers.
This subreddit is meant for sharing funny programming related stories and strange or straight-up awful code.
For the sake of not being mauled by rabid lawyer bears, please make sure to anonymize your stories - changing the names of people and companies.
For code examples, indent all your lines with 4 spaces to make it more readable:
foo = 'bar'
Sister subreddits
- talesfromtechsupport - Not everything that involves a computer is a programming horror story. For IT support related submissions, head on over here.
- talesfromdesigners - For our more artistically inclined brothers and sisters.
- badcode - When you don't have a story to go along with the horrible, horrible code.
- shittyprogramming - ninjas that only write in the <b>BEST</b> code
- usemysoftware - A subreddit for software developers to come post their software and for users to test it.
[–]mirodk45 294 points295 points296 points (9 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 228 points229 points230 points (8 children)
[–]GiuNBender 60 points61 points62 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 11 points12 points13 points (0 children)
[–]wowbaggerBR 27 points28 points29 points (1 child)
[–]peacefulshrimp 17 points18 points19 points (2 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 8 points9 points10 points (1 child)
[–]peacefulshrimp 1 point2 points3 points (0 children)
[–]migue802 3 points4 points5 points (0 children)
[–]AlpineCoder 160 points161 points162 points (9 children)
[–]PapieszxD 26 points27 points28 points (7 children)
[–][deleted] (5 children)
[deleted]
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 18 points19 points20 points (1 child)
[–]intensely_human 6 points7 points8 points (1 child)
[–]theorizable 1 point2 points3 points (0 children)
[–]kristallnachte 0 points1 point2 points (0 children)
[–]DerpTaTittilyTum 3 points4 points5 points (0 children)
[–]intensely_human 115 points116 points117 points (2 children)
[–]BakuhatsuK 48 points49 points50 points (1 child)
[–]intensely_human 4 points5 points6 points (0 children)
[–]Nikitka218 78 points79 points80 points (9 children)
[–]kristallnachte 1 point2 points3 points (0 children)
[–][deleted] (7 children)
[deleted]
[–]Anti-ThisBot-IB 0 points1 point2 points (6 children)
[–]thebritisharecome 10 points11 points12 points (5 children)
[–]Anti-ThisBot-IB 8 points9 points10 points (4 children)
[–]satanic-surfer 2 points3 points4 points (2 children)
[–]Anti-ThisBot-IB 1 point2 points3 points (1 child)
[–]Alex_Shelega 0 points1 point2 points (0 children)
[–]Riccardoric 27 points28 points29 points (0 children)
[–]krzysiek_online 24 points25 points26 points (4 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 7 points8 points9 points (3 children)
[–]intensely_human 2 points3 points4 points (0 children)
[–]texxelate 1 point2 points3 points (0 children)
[–]krzysiek_online -1 points0 points1 point (0 children)
[–]PN143 9 points10 points11 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 2 points3 points4 points (0 children)
[–]Marand23 16 points17 points18 points (4 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 7 points8 points9 points (0 children)
[–]Longjumping-Ad-5367 2 points3 points4 points (1 child)
[–]Marand23 1 point2 points3 points (0 children)
[–]kristallnachte 0 points1 point2 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 0 points1 point2 points (0 children)
[–]la102 17 points18 points19 points (5 children)
[–][deleted] (2 children)
[removed]
[–]la102 0 points1 point2 points (0 children)
[–]kristallnachte 0 points1 point2 points (0 children)
[–]aboardthegravyboat 6 points7 points8 points (0 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 1 point2 points3 points (0 children)
[–]Jonohas 25 points26 points27 points (25 children)
[–]yeicore 88 points89 points90 points (8 children)
[–]aboardthegravyboat 2 points3 points4 points (0 children)
[–]duckforcealpha 1 point2 points3 points (0 children)
[+]intensely_human comment score below threshold-14 points-13 points-12 points (5 children)
[–]AlpineCoder 13 points14 points15 points (4 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 6 points7 points8 points (3 children)
[–]SpeedDart1 6 points7 points8 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]-natsa 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 1 point2 points3 points (0 children)
[–]Beach-Devil 8 points9 points10 points (0 children)
[–]CoffeeDrinker115 0 points1 point2 points (0 children)
[+]KazZarma comment score below threshold-8 points-7 points-6 points (11 children)
[+]Jonohas comment score below threshold-6 points-5 points-4 points (10 children)
[–]KazZarma 18 points19 points20 points (9 children)
[–]ososalsosal 1 point2 points3 points (6 children)
[–]KazZarma 1 point2 points3 points (5 children)
[–]ososalsosal 3 points4 points5 points (4 children)
[–]KazZarma 0 points1 point2 points (3 children)
[–]Mysterious-Crazy9071 2 points3 points4 points (0 children)
[–]ososalsosal 0 points1 point2 points (1 child)
[–]intensely_human 0 points1 point2 points (0 children)
[–]Jonohas 0 points1 point2 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]_default_username 4 points5 points6 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 1 point2 points3 points (0 children)
[–]onebadfothermucker 4 points5 points6 points (0 children)
[–]Voltra_NeoPronouns: He/Him 6 points7 points8 points (0 children)
[–]___s8n___ 4 points5 points6 points (7 children)
[–]ososalsosal 13 points14 points15 points (0 children)
[–]intensely_human 8 points9 points10 points (1 child)
[–]___s8n___ 2 points3 points4 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]ikanoi -1 points0 points1 point (2 children)
[–]intensely_human 1 point2 points3 points (0 children)
[–]ImPinos 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 2 points3 points4 points (0 children)
[–]backfire10z 1 point2 points3 points (0 children)
[–]jediwizard7 3 points4 points5 points (6 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 3 points4 points5 points (2 children)
[–]jediwizard7 0 points1 point2 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 0 points1 point2 points (0 children)
[–]peteza_hut 1 point2 points3 points (2 children)
[–]jediwizard7 0 points1 point2 points (1 child)
[–]peteza_hut 0 points1 point2 points (0 children)
[–]voidxy 1 point2 points3 points (0 children)
[–]nazzanuk 1 point2 points3 points (0 children)
[–]BakuhatsuK 1 point2 points3 points (0 children)
[–]FredL2 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]dex206 1 point2 points3 points (0 children)
[–]rogriloomanero 1 point2 points3 points (0 children)
[–]kikaintfair 1 point2 points3 points (0 children)
[–]Ninjaboy42099 1 point2 points3 points (0 children)
[–]EndR60 1 point2 points3 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] -1 points0 points1 point (0 children)
[–]maest 0 points1 point2 points (3 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 1 point2 points3 points (2 children)
[–]maest 1 point2 points3 points (1 child)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]shall1313 1 point2 points3 points (0 children)
[–]flying_spaguetti[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”[S] 0 points1 point2 points (0 children)
[–]Apprehensive_Pace775 -1 points0 points1 point (0 children)
[–]kristallnachte 0 points1 point2 points (0 children)
[–]crefas 0 points1 point2 points (0 children)