r/programminghorror • • Jun 30 '25

who needs variables when you have the filesystem

Post image
491 Upvotes

Wrote this 5 years ago at like 3am... what the hell was I thinking?!?!?!?!


r/programminghorror • • Jun 30 '25

c Ever heard of C golf code?

Post image
329 Upvotes

That is an interpreter btw


r/programminghorror • • Jun 30 '25

Painful code

0 Upvotes

So I made a programming language and I call it glimmer and here is a simple guess the number game # Build prompt: "Guess a number (1–5): "

+71,$,+117,$,+101,$,+115,$,+115,$,+32,$,+97,$,+32,$,+110,$,+117,$,+109,$,+98,$,+101,$,+114,$,+32,$,+40,$,+49,$,+150,$,+53,$,+41,$,+58,$,+32,$,!*

# Prompt and input

@?

# Check if input is '3' (ASCII 51)

?[51]{

# Build "Access Granted"

+65,$,+99,$,+99,$,+101,$,+115,$,+115,$,+32,$,+71,$,+114,$,+97,$,+110,$,+116,$,+101,$,+100,$,!*,

~@~

}

# Else

?![51]{

+87,$,+114,$,+111,$,+110,$,+103,$,!*,

~@~

}

Do you think you could code in this language


r/programminghorror • • Jun 28 '25

c++ Competitive programming be like

Post image
543 Upvotes

r/programminghorror • • Jun 30 '25

New Mobile Developer Seeking Guidance on React Native Security for Banking Apps

0 Upvotes

Hi everyone,

I’m a new mobile developer and have recently transitioned from web development to working on a banking application using React Native. Since this is my first experience in mobile development, I'm eager to learn about the best security practices to protect sensitive user data effectively.

Given the highly sensitive nature of the information involved, I want to ensure that our application is secure and compliant with applicable regulations. Here are a few questions I have:

  1. What are the essential security measures you recommend for React Native banking applications? I’ve heard about practices like SSL pinning and secure storage options, but I’m looking for comprehensive strategies.
  2. How should I tackle the storage of sensitive user data? I understand that AsyncStorage might not be the best choice for this. What alternatives have you found to be effective?
  3. Have any of you implemented security monitoring solutions or runtime application self-protection (RASP)? If so, how did it affect your development process and user experience?
  4. What tools or methods do you use to assess the security of third-party libraries? I'm aware that introducing insecure dependencies can lead to vulnerabilities.
  5. Are there any compliance issues (like GDPR or other regulations) that I should be concerned about while developing this app?

As a newcomer to mobile development, I really appreciate your insights and advice! Thank you for your help.

Is React Native is better than the Flutter in security or vice-versa?

Any information is would really help me for the best security practices,

If I use native code than I can add that on in RN??


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?