/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

361,210 Subscribers

7

So beautiful...

2 Comments
2025/02/03
08:03 UTC

48

Unity code. This was an answer on a forum.

4 Comments
2025/02/03
03:13 UTC

63

About a year ago, I was offered a full-stack position for a content creator's upcoming Roblox game. I was informed that the previous programmer literally just did not know how to code. I found this old screenshot of one of the horrors presented to me immediately after opening the game in the editor.

2 Comments
2025/02/03
01:51 UTC

918

Rate my even or odd code

64 Comments
2025/02/02
22:22 UTC

77

I notice something new every time I look at it

No, nothing outside of this snippet justifies anything wrong you see. Yes, this is production code.

https://preview.redd.it/3lt2z634ojge1.png?width=341&format=png&auto=webp&s=b9560758eb01ba6a8b1d4745d3dcb3a1dbb9f14f

27 Comments
2025/02/01
15:15 UTC

16

I Am the Documentation – A Breaking Bad Parody for Programmers

3 Comments
2025/01/30
21:35 UTC

0

Can you Help me Start in to Code?

Hello, am 27 and wanting to Start Programmin. I think i want to learn Java but i am Not Sure yet how to Start. Do you have any Tipps or reccomendations that could Help? 🥰

11 Comments
2025/01/30
17:35 UTC

2,267

WTF are these table names???

162 Comments
2025/01/30
05:16 UTC

625

No H button for you

So I work with medical records and there is a scanning program we use. And today seemingly out of nowhere, it decided that the "H button" was banned. It wouldn't accept the input. All other buttons worked just fine. There's really only one type field in the entire program and it's to search a pt's name.

At first I thought it was the keyboard itself. So I immediately swapped it out. But nope, still nada. Then I pulled up notepad and "h" came right up no issue. Pulled up another worked just fine again.

I have no idea what the issue is. I've never heard of this before.

I ended up doing ye ol IT answer to everything and restarted the PC. And the issue went away.

But it's driving me nuts as to why it happened. I hope someone here might have an answer.

32 Comments
2025/01/29
21:47 UTC

225

In my cross-platform abstraction layer for a window & its events.

27 Comments
2025/01/29
08:15 UTC

13,105

My roommate spent hours debugging his game today

264 Comments
2025/01/28
02:42 UTC

2,348

How my senior dev expects me to logout 😭

222 Comments
2025/01/27
07:20 UTC

0

DSA Help needed

HELP!!! Was doing a Question on Strings and just couldn't get the logic ,Tried searching for the question on leetcode and GFG but couldn't find it can you guys help me solve it??
https://ng.tinyc.co/t20dsachallenge

4 Comments
2025/01/26
06:59 UTC

62

Nice one Safari

8 Comments
2025/01/25
14:30 UTC

0

Horrific curly braces! or is it terrific?

13 Comments
2025/01/24
08:45 UTC

0

Why is this valid C#?

20 Comments
2025/01/24
05:50 UTC

0

A 2009 Macbook Pro Mid for programming in 2025

Hello, I recently started programming and I'm looking for a notebook to program outside my room and I can't afford a very expensive notebook, I found a MacBook Pro mid 2009 with 8GB of RAM, Intel Core 2 Duo and a 240GB SSD, will it help me learn to program or is it too old to keep up with programming?

7 Comments
2025/01/23
23:06 UTC

6

Tabourier can go fuck himself

https://preview.redd.it/2qnrf6ra6see1.png?width=803&format=png&auto=webp&s=88d57a47b2e3df8d2783cb27f13d4f7d612ff948

Is this even real computer science? it probably is, i recognize the value of making a map of your code through a flow chart, but who the hell designed these? its come to a point where i genuinely dont know if these are fully meant to be read like a toddler is trying to design a map or if i was just taught poorly

from top to bottom, Warnier's, Chapin's. Jackson's. Bertini's Tabourier's and \"Action\" Flowcharts

Hell, i cant even find any accounts for these methods aside from whatever my college is smoking. is this even a real thing or is my professor smoking a fat one and calling it a day? genuine help here on how i could possibly understand these flowcharts, specifically Tabouriers.

5 Comments
2025/01/23
17:50 UTC

77

always has been

10 Comments
2025/01/23
10:47 UTC

12,698

I made a script that randomly logs out my annoying colleague every hour.

147 Comments
2025/01/23
10:31 UTC

589

natural language programming

55 Comments
2025/01/22
21:58 UTC

117

I don't think that is how it works...

22 Comments
2025/01/22
21:28 UTC

0

Uber app developers be like: I don’t test my code. But when I do, I do it in production. After all, who needs a staging environment when you’ve got real-time feedback?

1 Comment
2025/01/22
10:44 UTC

643

So I wrote this unironically…

31 Comments
2025/01/22
10:42 UTC

Back To Top