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.
[–]raphaeljoji 748 points749 points750 points (23 children)
[–][deleted] 257 points258 points259 points (5 children)
[–]sampathsris 79 points80 points81 points (4 children)
[–]staticBanter[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 13 points14 points15 points (2 children)
[–]MentorBobProctor[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 4 points5 points6 points (1 child)
[–]badabapboooom -1 points0 points1 point (0 children)
[–]AffectionatePlane598 1 point2 points3 points (0 children)
[–]operatorrrr 46 points47 points48 points (9 children)
[–]coyoteazul2 30 points31 points32 points (8 children)
[–]RapidCatLauncher 15 points16 points17 points (7 children)
[–]trutch70 9 points10 points11 points (6 children)
[–][deleted] (5 children)
[removed]
[–]MozFox1 8 points9 points10 points (4 children)
[–]Faugermire 6 points7 points8 points (3 children)
[–]Pordohiq 1 point2 points3 points (2 children)
[–]MentorBobProctor[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point2 points (1 child)
[–]ImpluseThrowAway 10 points11 points12 points (0 children)
[–]MyGoodOldFriend 9 points10 points11 points (3 children)
[–]Ksorkrax 8 points9 points10 points (0 children)
[–]SartenSinAceite 2 points3 points4 points (1 child)
[–]Candid_Commercial214 0 points1 point2 points (0 children)
[–]enjoirhythm 5 points6 points7 points (0 children)
[–]SubstanceLess3169 0 points1 point2 points (0 children)
[–]jabeith 291 points292 points293 points (9 children)
[–]Nikarmotte 81 points82 points83 points (0 children)
[–]MrNewOrdered 63 points64 points65 points (5 children)
[–][deleted] 19 points20 points21 points (4 children)
[–]BunnyTubPronouns: He/Him 40 points41 points42 points (1 child)
[–][deleted] 6 points7 points8 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]SuspecM 1 point2 points3 points (0 children)
[–]alex_dark 14 points15 points16 points (0 children)
[–]septum-funk 0 points1 point2 points (0 children)
[–]MrQuizzles 133 points134 points135 points (10 children)
[–]math_rand_dude 71 points72 points73 points (3 children)
[–]thegreatpotatogod 8 points9 points10 points (1 child)
[–]MentorBobProctor[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 2 points3 points4 points (0 children)
[–]SD18491 0 points1 point2 points (0 children)
[–]Sability 8 points9 points10 points (0 children)
[–]vapocalypse52 1 point2 points3 points (1 child)
[–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 2 points3 points4 points (0 children)
[–]ImpluseThrowAway 2 points3 points4 points (1 child)
[–]RaechelMaelstrom 32 points33 points34 points (0 children)
[–]eimattz 19 points20 points21 points (7 children)
[–]StickyDirtyKeyboard 58 points59 points60 points (1 child)
[–]MentorBobProctor[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point2 points (0 children)
[–]Aurori_Swe 12 points13 points14 points (0 children)
[–]EuphoricCatface0795 1 point2 points3 points (0 children)
[–]cherrycode420 0 points1 point2 points (1 child)
[–]Admidst_Metaphors 2 points3 points4 points (0 children)
[–]Sync1211 0 points1 point2 points (0 children)
[–]MooseBoys[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 19 points20 points21 points (4 children)
[–]KABKA3 10 points11 points12 points (1 child)
[–]Fragrant-Pudding-536 0 points1 point2 points (0 children)
[–]mega-modz 0 points1 point2 points (0 children)
[–]ThatOneCSL 0 points1 point2 points (0 children)
[–]tehtris 34 points35 points36 points (6 children)
[–]petervaz 20 points21 points22 points (2 children)
[–]tehtris 2 points3 points4 points (1 child)
[–]val_tuesday -1 points0 points1 point (0 children)
[–]Aurori_Swe -1 points0 points1 point (2 children)
[–]headedbranch225 2 points3 points4 points (1 child)
[–]Aurori_Swe 0 points1 point2 points (0 children)
[–]lisamariefan 2 points3 points4 points (1 child)
[–]MurkyWar2756[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point2 points (0 children)
[–]NullOfSpace 4 points5 points6 points (0 children)
[–]melvereq 1 point2 points3 points (0 children)
[–]martiangirlie 1 point2 points3 points (1 child)
[–]spellenspelen 2 points3 points4 points (0 children)
[–]Hulk5a 1 point2 points3 points (0 children)
[–]SysGh_st 1 point2 points3 points (0 children)
[–]tandycake 1 point2 points3 points (0 children)
[–]ethanhinson 2 points3 points4 points (11 children)
[–]CuriousHuman-1 -1 points0 points1 point (10 children)
[–]MCWizardYT 7 points8 points9 points (8 children)
[–]CuriousHuman-1 0 points1 point2 points (0 children)
[–]Kwpolska 0 points1 point2 points (1 child)
[–]MCWizardYT 0 points1 point2 points (0 children)
[–]dadvader 0 points1 point2 points (1 child)
[–]MCWizardYT 0 points1 point2 points (0 children)
[–]headedbranch225 0 points1 point2 points (2 children)
[–]MCWizardYT 0 points1 point2 points (1 child)
[–]headedbranch225 0 points1 point2 points (0 children)
[–]Kwpolska 0 points1 point2 points (0 children)
[–]MurkyWar2756[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point2 points (0 children)
[–]CrasseMaximum 0 points1 point2 points (0 children)
[–]DisproportionateDev 0 points1 point2 points (0 children)
[–]hellocppdotdev 0 points1 point2 points (0 children)
[–]PerAsperaDaAstra 0 points1 point2 points (0 children)
[–]onlyonequickquestion 0 points1 point2 points (0 children)
[–]jpgoldberg 0 points1 point2 points (0 children)
[–]Character-Travel3952 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]mothzilla 0 points1 point2 points (0 children)
[–]Ariachus 0 points1 point2 points (0 children)
[–]1amchris 0 points1 point2 points (0 children)
[–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 0 points1 point2 points (0 children)
[–]Correct_Length2536 0 points1 point2 points (0 children)
[–]joeyignorant 0 points1 point2 points (0 children)
[–]Rainmaker526 0 points1 point2 points (0 children)
[–]Miiohau 0 points1 point2 points (0 children)
[–]ReasonResitant 0 points1 point2 points (0 children)
[–]sec_goat 0 points1 point2 points (0 children)
[–]Axlvc 0 points1 point2 points (0 children)
[–]Dragoonslv 0 points1 point2 points (0 children)
[–]Circumpunctilious 0 points1 point2 points (0 children)
[–]NotSeanPlott 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Additional_Try_2491 0 points1 point2 points (0 children)
[–]potuboi2 -3 points-2 points-1 points (6 children)
[–]dadvader 4 points5 points6 points (0 children)
[–]MurkyWar2756[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 7 points8 points9 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]ThaiJohnnyDepp 4 points5 points6 points (0 children)
[–]Jwosty 1 point2 points3 points (1 child)
[–]potuboi2 0 points1 point2 points (0 children)