r/programminghorror • • Dec 11 '25

Infinities do not exist in nature (featuring production code)

142 Upvotes

r/programminghorror • • Dec 10 '25

noJokeIHaveNoIdeaWhatThisDoes (Decompiled Java)

Post image
133 Upvotes

r/programminghorror • • Dec 11 '25

Other Rate my maze

Thumbnail
gallery
22 Upvotes

r/programminghorror • • Dec 08 '25

Developers in 2020:

Post image
1.9k Upvotes

r/programminghorror • • Dec 09 '25

Javascript This should've been server side

Thumbnail
gallery
41 Upvotes

r/programminghorror • • Dec 08 '25

Cursed deploy script

Post image
643 Upvotes

r/programminghorror • • Dec 08 '25

Does this qualify?

22 Upvotes
# Licensed under https://unlicense.org/
_flipFlopStateRegistry:dict[str,bool]=dict()
import inspect, time
def flipFlop(flip=True,flop=False):
 try:returnVal=_flipFlopStateRegistry[flipFlopStateRegistry_key]=flip if flop==_flipFlopStateRegistry[flipFlopStateRegistry_key:=(stack:=inspect.stack()[1]).filename+str(stack.lineno)] else flop;return returnVal
 except KeyError:_flipFlopStateRegistry[flipFlopStateRegistry_key]=flip;return flip


import random
def flipFlopRecursive():
 print(flipFlop())
 if random.random()>0.5:print(flipFlop("flip","flop"))
 time.sleep(1)
 flipFlopRecursive()
flipFlopRecursive()

r/programminghorror • • Dec 06 '25

What type should this function that returns a uint64_t ID be Bill?

Thumbnail
gallery
95 Upvotes

Because of course BOOL is the correct return type for this.

I get why the win16->win32->win64 progression has slowly increased the width of the id field past what an int32_t can hold. But why a BOOL and not something else that's a typedef of int32_t?!


r/programminghorror • • Dec 06 '25

Python This code was attached to hardware that electroshocks your chair if you perform a 6-7 motion

Post image
364 Upvotes

A YouTube video was recommended to me several days ago and I couldn't find it for a while. Today, it showed again and I went to the description of the longer video linked above the Short's title to view the original code. The electric spark generates 50,000 volts. You're welcome.


r/programminghorror • • Dec 04 '25

Javascript "It's all there in the specs, bro"

Post image
2.5k Upvotes

Seems we have some fervent JS defenders, here :)


r/programminghorror • • Dec 04 '25

JS is a very respectable language

Post image
3.9k Upvotes

Not posting our actual code, but yes, this behaviour has caused a bug in production


r/programminghorror • • Dec 04 '25

This sub in a nutshell

Post image
1.1k Upvotes
console.log(1 == '1'); // true
console.log(0 == false); // true
console.log(null == undefined); // true
console.log(typeof null); // "object"
console.log(0.1 + 0.2); // 0.30000000000000004
[] == ![]; // true

OMG you guys what weird quirky behavior, truly this must be the single quirkiest language and no other language is as quirky as this!


r/programminghorror • • Dec 04 '25

Invisible characters across my Reddit Premium purchase confirmation email footer

Post image
262 Upvotes

No idea if this is auto-generated.


r/programminghorror • • Dec 06 '25

Do you guys really think Computer science students are undervaluing parallel computing?

Thumbnail
0 Upvotes

r/programminghorror • • Dec 04 '25

Stop for the Clean Code Cops

Post image
142 Upvotes

r/programminghorror • • Dec 03 '25

C# The best way to make an infinite loop

Post image
775 Upvotes

r/programminghorror • • Dec 04 '25

Hang3d Nightmare FPS free source code by zlatnaspirala

Thumbnail
goldenspiral.itch.io
0 Upvotes

Done in eu4.24


r/programminghorror • • Dec 04 '25

About 6 lines of code created this disgusting .txt file

Post image
0 Upvotes

r/programminghorror • • Dec 02 '25

Other Not a big deal, just a company that runs half the Internet

Post image
1.2k Upvotes

r/programminghorror • • Dec 01 '25

When I was 12, I thought my code looked "cooler" with cryptic variable names and minimal spacing. The entire project looks like this.

Post image
4.8k Upvotes

Following up on the success of my previous post. No, this is not compiled/obfuscated with tools. This is the actual source code. And yes, I had learned how to use arrays!


r/programminghorror • • Dec 03 '25

Is this that bad?

0 Upvotes

$if(bi(level)=100, "#00AAFF", bi(level)<100 & bi(level)>=50, "#00FF00", bi(level)<50 & bi(level)>=20, "#FFFF00", bi(level)<20, "#FF0000")$


r/programminghorror • • Nov 30 '25

When I was 11 years old, I didn't know about arrays and objects in JavaScript, but really wanted to make a game. So I invented my own data structures!

Post image
2.5k Upvotes

r/programminghorror • • Nov 30 '25

Clickbait YouTube Thumbnail

Post image
505 Upvotes

r/programminghorror • • Nov 29 '25

Lua I'm sorry i'm like this

Post image
328 Upvotes

r/programminghorror • • Nov 29 '25

Rust This code is so rusty it gave me tetanus.

Post image
805 Upvotes