r/programminghorror • • Jun 30 '25

You don’t really feel the 80/20 rule until what feels like the 80 ends up only being the first 20

0 Upvotes

This is funny because it’s sad


r/programminghorror • • Jun 28 '25

c fralloc

47 Upvotes

r/programminghorror • • Jun 29 '25

Swift repeat while false

Post image
0 Upvotes

r/programminghorror • • Jun 27 '25

"Remove a C feature, but introduce a convoluted workaround." - The Zen of C++

Post image
408 Upvotes

r/programminghorror • • Jun 27 '25

Java This isn’t legacy… someone wrote this recently

Post image
581 Upvotes

Found this little gem buried in a brand-new codebase


r/programminghorror • • Jun 27 '25

Instead of trying to debug the underlying algorithm, I used a special case approach...

Post image
160 Upvotes

Instead of trying to debug the underlying SHA-256 algorithm, I used a special case approach to recognize specific input strings and return their correct hashes.


r/programminghorror • • Jun 27 '25

c Hellsort.c,,,,7 LEVELS deep & 20 CONDITIONS ternary for recursive bubblesort. Passed 1000 testcases from DeepseekR1 , 99 from Claude-Sonnet4 , 79 from Gemini 2.5 Flash , 20 from ChatGpt. If you've testcase which will break my code lemme know.

Thumbnail
gallery
15 Upvotes

r/programminghorror • • Jun 26 '25

XORcist-SORT.c ...., when they said don't go for naive approach they surely didn't expect this one.

Post image
10 Upvotes

r/programminghorror • • Jun 27 '25

When the video title says ‘English’ but your ears file a bug report

Thumbnail
youtube.com
0 Upvotes

Pretty sure this unlocked a secret Windows language setting I didn’t know I had.


r/programminghorror • • Jun 25 '25

Typescript Why use typing when we can avoid it all ?

Post image
337 Upvotes

Proba


r/programminghorror • • Jun 24 '25

oh no

Post image
156 Upvotes

r/programminghorror • • Jun 25 '25

Other Guys, this is what happens when you forget a semicolon.

0 Upvotes

r/programminghorror • • Jun 23 '25

My workplace's diabolical regex for matching e-mail formats

Post image
909 Upvotes

r/programminghorror • • Jun 24 '25

C# This in production

Post image
118 Upvotes

I was asked to do some minor fixes on a system we have in production. This error appeared when I tried to do string interpolation.

Yikes


r/programminghorror • • Jun 24 '25

This commit history

17 Upvotes

Coming from a dsp pure-data processing library: https://github.com/zealtv/bop (just going to check it out itself)


r/programminghorror • • Jun 23 '25

The Loop Of Incompetence.

Post image
284 Upvotes

r/programminghorror • • Jun 23 '25

Python Using Python to run a binary coded in C to beat 99% of users.

596 Upvotes

r/programminghorror • • Jun 23 '25

Dumb, dumb cryptography

38 Upvotes

Coming from the same mindset used by people who brought this pearl: https://www.reddit.com/r/programminghorror/comments/1hgcw4z/dumb_and_downright_dangerous_cryptography/

This one is considerably shorter - but no less funnier.

I received the docs to integrate with a telemetry provider. At first glance, you'd expect they have a basic oauth workflow. You provide a username/password and they return an access token, right?

Well... kinda.

Translation:

Authentication is done by the /login endpoint.

So far so good!

Every following request (except login) requires two headers: uid and browser. Where:
uid is is the desc_uid_retorno provided in the login response body
browser is is the desc_useragent provided in the login response body

... I mean, uid is a weird name for access_token, but who's here to judge, right? 🙂 (Also, browser agent?)

Moving on.

Every one of the following fields is mandatory.
To generate the desc_uid field, use the following statement:
md5(username:md5(password):current_timestamp)

Oooh there you go.

So, the only way to specify the credentials is by md5-ing (#screamInEarly2000'sHorror) the username, password and timestamp, multiple times.

That left me thinking... Gosh, how'd they identify my credentials?

The only way I can think of is

  1. Retrieve every existing username and password, unhashed.
  2. Md5 them with the provided timestamp (it's in the login request, after all)
  3. Match it with the provided hash.

A few tiny issues with that:

  1. They can't save the passwords hashed, can they? Otherwise, they wouldn't manage to match the generated hash with the one provided**.** So... does that mean that every credential is in plain text EDIT: Yep, they could at least md5-hash the passwords and save them in the database. I mean, yay?🤷
  2. They have to perform this aberration for every single credential in the database.

... Nice, yes?


r/programminghorror • • Jun 22 '25

What would you do if you joined a code base and saw this?

Post image
1.3k Upvotes

r/programminghorror • • Jun 24 '25

Python Day 13: Building a learning community for ML + DSA - starting daily challenges tomorrow

Thumbnail reddit.com
0 Upvotes

r/programminghorror • • Jun 22 '25

Don't ask how I got here

Post image
59 Upvotes

r/programminghorror • • Jun 22 '25

Javascript Blessed by callbacks

10 Upvotes
I wanted to reset my Epson ink pad counter... https://github.com/katyo/printer-waste-counter/blob/master/counter.ts
It gets worse..

r/programminghorror • • Jun 23 '25

Typescript So i am getting this issue again and again, what to do ?

Post image
0 Upvotes

I joined this project around 4 days ago and unable to configure properly because of dependencies and library issues. I used every possible aspect of debugging even used all the popular ais like chatgpt, claude, copilot, gemini even the new ones are in market like , bolt, V0, blackbox, lovable etc. But could not resolve this issue. The issues are connected with the react native, this is an mobile application running on android studio jelly fish version. What questions my mind is that everyone is assuming that ai will replace programmers sometimes it doesn't feel true to me because these kind of issues.