/r/programminghorror

Photograph via snooOG

Share strange or straight-up awful code.

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.

/r/programminghorror

355,274 Subscribers

9

Screwed it up, I wasn't gonna make another var

9 Comments
2024/12/12
03:48 UTC

57

if True else True

5 Comments
2024/12/11
21:35 UTC

0

update to the people who requested to see the PR

8 Comments
2024/12/11
20:17 UTC

87

r/githorror

16 Comments
2024/12/11
18:50 UTC

1,221

+10h of debugging later, I found this. Javascript, WTF?!

81 Comments
2024/12/11
17:37 UTC

18

Here we go again😎

10 Comments
2024/12/11
16:26 UTC

729

delete every file

22 Comments
2024/12/10
18:45 UTC

126

Guys do I have no brain :(

50 Comments
2024/12/10
18:19 UTC

0

Any platform where we can find codes for any given question.passing all test cases

1 Comment
2024/12/10
00:49 UTC

0

ChildrenOfChildrenNodes

https://preview.redd.it/4zt2rwvu2w5e1.png?width=579&format=png&auto=webp&s=b2b95e82ebacb359cff821f02c5a8c537ddcbeb7

an excerpt from a personal project, I don't expect this to make sense in a week

3 Comments
2024/12/09
21:17 UTC

673

Is this efficient?

87 Comments
2024/12/09
12:10 UTC

123

this is how I initialize a class that takes in an array of exactly 3 elements

34 Comments
2024/12/09
04:00 UTC

0

Why ?

7 Comments
2024/12/08
06:41 UTC

251

this indentation is a certified Flutter moment

16 Comments
2024/12/07
16:28 UTC

47

Internal VoidWrapper of a Reflection System im working with

8 Comments
2024/12/07
14:16 UTC

438

My engineering prof who teaches Java

81 Comments
2024/12/06
20:59 UTC

391

Finding the Max Value in a List

This was my attempt at finding the largest number in a list. Am I cooked?

133 Comments
2024/12/06
03:10 UTC

61

this is python, or is it?

11 Comments
2024/12/05
22:49 UTC

169

Who needs bool if you can use strings? A whole lot of different ones!

https://preview.redd.it/gqpt3n8ggy4e1.png?width=510&format=png&auto=webp&s=c178025213a6f5b68abfaf86c41e25b5252b65c2

In some other places, this is even mapped to 0 and 1. And also "0" and "1". No, the strings aren't actually used for anything else besides comparing them with each other.

69 Comments
2024/12/05
03:48 UTC

129

One giant handler with 50 if-statements in a single API endpoint > Multiple semantically meaningful API endpoints with small maintainable functions

29 Comments
2024/12/05
01:36 UTC

0

Real horror

18 Comments
2024/12/04
18:23 UTC

6 Comments
2024/12/04
13:33 UTC

181

python with braces low-key slaps

48 Comments
2024/12/04
03:25 UTC

44

[C++] my eyes spontaneously combusted.

3 Comments
2024/12/03
19:49 UTC

Back To Top