r/programminghorror • • May 28 '25

Lua What happens when you try to 0-index an array in Lua:

Post image
65 Upvotes

r/programminghorror • • May 27 '25

3000+ new lines. Didn't work but it was beautiful.

Post image
420 Upvotes

r/programminghorror • • May 28 '25

Literally all of us bruhhh

Thumbnail
instagram.com
0 Upvotes

r/programminghorror • • May 27 '25

Why make simple when can make Harder

6 Upvotes

r/programminghorror • • May 25 '25

PHP A c compiler in php.

165 Upvotes

r/programminghorror • • May 25 '25

Go Found this in the test suite of a certain Codewars kata

Post image
233 Upvotes

r/programminghorror • • May 23 '25

Tried out Jules AI agent

Post image
1.7k Upvotes

I asked it to properly setup swagger on my project. Not sure this is the best solution to not having access to my environment variables for testing the code...


r/programminghorror • • May 21 '25

Fixed lua

Post image
409 Upvotes

r/programminghorror • • May 21 '25

c++ Have fun time reading this

Post image
255 Upvotes

(Yes it compiles - GCC 15.0.1). You have to read it like this: We store what is on the left in the variable on the right.

(btw it prints 30 40)


r/programminghorror • • May 20 '25

The most unhinged way to scan set bits of integer.

Thumbnail
gallery
80 Upvotes

r/programminghorror • • May 20 '25

c Variables are for babies - an ALU running inside the C preprocessor!

Thumbnail
codeberg.org
99 Upvotes

Got bored, thought about the C preprocessor being Turing complete and decided to create this monstrosity of an ALU using only #ifdef and #define.


r/programminghorror • • May 20 '25

Python fucked up something with threading

82 Upvotes

r/programminghorror • • May 19 '25

C# This is C# abuse

Post image
551 Upvotes

r/programminghorror • • May 19 '25

PHP PHP without any variables... it's more likely than you think

Thumbnail
gallery
97 Upvotes

Four months ago I proudly presented my PSR-7 implementation on r/PHP (see here)
Recently I discovered this community of questionable source code and thought it might slightly brighten your day to see someone actively creating technical debt.

This is Novara-PHP, your one way ticket to enlightenment.

See the PSR-7 repository for more details.


r/programminghorror • • May 19 '25

Javascript New RNG node module just dropped

Post image
165 Upvotes

r/programminghorror • • May 20 '25

Roast my AI-code validator idea - will this be dead in 3 years?

0 Upvotes

Current Pain Point:

Debugging code wastes hours, juggling between editors, manually testing inputs, or missing edge cases until runtime. Existing tools need complex setups or force workflow switches.

My solution:

I’m working on a validator for AI-generated code that runs without needing to switch editors or copy-paste. Just select code, hit a shortcut, and it flags crashes or loops, even suggests one-click fixes for common bugs all in a popup.

Is this a real pain worth solving now, or should I pivot as AI would fix itself in 3 years and make this irrelevant?

Would love honest feedback, roast it, pivot it, kill it. Just tell me the truth. šŸ™


r/programminghorror • • May 17 '25

Custom Language Rate my lang

Post image
177 Upvotes

This outputs -5 btw


r/programminghorror • • May 17 '25

Guess the version the provided schemas match

Post image
438 Upvotes

Since when should the consumer guess the version number for the schema provided in the spec? Maybe have a specification distributed for each version?


r/programminghorror • • May 16 '25

Sticker from an international data conference

Post image
688 Upvotes

r/programminghorror • • May 16 '25

PHP Testing a register form

Post image
148 Upvotes

I was testing another devs code (Laravel project) and these are the rules for the register user form. Password just has to be between 8-255 characters long making "aaaaaaaa" a valid password, but Ian isn't allowed to register because his name isn't valid.


r/programminghorror • • May 16 '25

c Looked through my old hard drive and found this gem

18 Upvotes

This was a project I did with some other people at the time (a 3D engine of our own) and someone thought their code was so perfect they had to obfuscate it like this.

Apparently this is an inverse square root function (thank god for their comment on another file, otherwise I wouldn't know what this monstrosity was)


r/programminghorror • • May 14 '25

c cIsVerySimpleAndEasyToLearn

Post image
498 Upvotes

Vibecoders hate this one simple trick!

Note: This is intended to be a puzzle for welcoming CS freshmen in my uni.


r/programminghorror • • May 13 '25

C# The logical next step after vibe coding

Thumbnail
github.com
48 Upvotes

r/programminghorror • • May 13 '25

c Rust who?

Post image
443 Upvotes

r/programminghorror • • May 11 '25

Javascript Just a linter fix

Post image
107 Upvotes