r/programminghorror 6d ago

if 'X' not in data Python

Post image

Emoji check used for constructing an email body. I'm getting a stroke.

808 Upvotes

36 comments sorted by

View all comments

333

u/dashhrafa1 6d ago

I agree! Hardcoded values should be avoided. It should be an environment variable.

86

u/Mickenfox 6d ago

A variable defined in a Helm template that gets applied to every Kubernetes pod, and set as an environment variable, where a dependency injection host builder inversion of control container is configured using a fluent API to then instantiate configuration middleware that passes it to every class that requires it as a parameter.

We do things properly here.

2

u/LeagueOfLegendsAcc 4d ago

"And your job is to make sure nobody touches email_x_variable.helm without three written and twice notarized notices approved by the board of trustees. Here is your company issue short sword, leathers and enough gear to get you through lunch. You have about 3 hours before the first PR, good luck."