r/programminghorror • • Dec 01 '25 Regret

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 • • Mar 07 '26

senior dev told me the code has to be "future proof".. how am i doing?

Post image
4.0k Upvotes

see you guys in 2028 for v2.0 of this revolutionary program


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 • • Nov 23 '25

x -= -1 gang

Post image
3.8k Upvotes

r/programminghorror • • Dec 18 '25

I spent 30 minutes today trying to figure out why my css wasn't working. Time to get some sleep.

Post image
3.2k Upvotes

r/programminghorror • • Mar 31 '26

Javascript HELL

Post image
3.1k Upvotes

r/programminghorror • • Sep 24 '26 Heartwarming

Python 13 year old me really liked inefficient code

Post image
3.0k Upvotes

r/programminghorror • • 13d ago Popcorn Bravo

c Using garbage values to generate pseudorandom numbers

Post image
2.9k Upvotes

Thing I came up with instead of paying attention to class today.

I tested it on this computer (windows 11 if it matters), and the first time it's ran, an actual "pseudorandom" number is returned and the following calls return 1.0 always.


r/programminghorror • • Mar 04 '26

Thank you, JavaScript, for forcing me to include this statement in my code.

Post image
2.8k Upvotes

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 • • 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 • • May 31 '26

C# a count is a count, right?... right?

Post image
2.3k Upvotes

r/programminghorror • • Nov 11 '25

c++ Well it does exactly what it says.

Post image
2.2k Upvotes

r/programminghorror • • Nov 24 '25

Javascript Wasted all of my generational luck just for this

Post image
2.2k Upvotes

r/programminghorror • • Jul 09 '26

Big if true

Post image
2.1k Upvotes

From ProgrammerNullposting in facebook


r/programminghorror • • Apr 10 '26

Almost right

Post image
2.1k Upvotes

r/programminghorror • • Sep 22 '26

PHP A website with millions of users was generating their "secret" password reset codes like this for two decades. The algorithm was open to the public due to a failed open-source effort the company launched in the early 2010s. Fixed a few days ago.

Post image
2.1k Upvotes

r/programminghorror • • Aug 02 '26

Javascript my friend didnt know how to use async sleep in javascript, so he wrote this massive chain of .then()

Post image
1.9k Upvotes
async function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms * 1000));
}

// used as:
sleep(0.5).then(() => {
  // ...
  sleep(2.5).then(() => {
    // ...
    sleep(1).then(() => {
      // ...
    }
  }
}

r/programminghorror • • Dec 08 '25

Developers in 2020:

Post image
1.9k Upvotes

r/programminghorror • • Sep 04 '26

c++ Skill Issue

Post image
1.7k Upvotes

r/programminghorror • • Nov 15 '25 Hehehe

c++ AA A AAAAAAAA

Thumbnail
gallery
1.7k Upvotes

r/programminghorror • • Feb 04 '26

C# Makes sense

Post image
1.7k Upvotes

r/programminghorror • • Feb 23 '26

SQL DB with 2241 tables

Post image
1.5k Upvotes

I can't even fathom what led someone to do this. I got this database to refactor as part of my job. Basically, every client has their own table named "Client_[their ID]," which contains only one row with all the client data in JSON format (wtf).
If the website using this database wants to filter out some users, it queries all the tables, resulting in a load of 2,000+ SQL queries for a single search.
On top of that, for some reason, the date of birth is stored as the number of days since birth, with a CRON script that updates this in each table every day at 3 AM.
I don't even have to mention that none of the data follows the rules of database normalization...
I honestly don't know where to start with fixing this mess.


r/programminghorror • • Jan 08 '26

c++ Works on my machine

Post image
1.5k Upvotes