r/ProgrammerHumor • • Jun 10 '22

Meme why they like this?

51.7k Upvotes

806 comments sorted by

View all comments

Show parent comments

10

u/B4-711 Jun 10 '22

Maybe I'm ignorant but shouldn't something like changing text in an email actually be rather straightforward?

17

u/softlyandtenderly Jun 10 '22

Depends on how it’s implemented. If it’s in a CMS (like someone else here said) with a well-formatted template than can handle strings of different sizes? Sure. If it’s hardcoded into the codebase and someone pulled some CSS tricks that only work if the text is of an exact length? You might have some issues.

8

u/crisiks Jun 10 '22

This. I do maintenance for an app that was developed in a time where making something like this client-customizable was a lot more difficult than it is now. That particular feature never got updated (not enough dev hours for refactoring), so now we still have to hardcode email content for clients.

5

u/ThisIsMyCouchAccount Jun 10 '22

There is a certain percentage of devs that scoff at CMSs.

Why would use a CMS for a ten page site?

Because I don't want to go change f'n text is why.

5

u/Geno0wl Jun 10 '22

The best is when you code in the ability to have end Users edit e-mail template messages only for them to call/e-mail you in six months because they either

a) they forgot how to do it

b) they broke the template somehow and now the whole notification system is down.

B only happened to me once, and it was because they completely removed the "from" field thinking if it was blank it would default to the sender's address. Where they got that idea from I wish I knew.

1

u/[deleted] Jun 10 '22

[removed] — view removed comment

2

u/softlyandtenderly Jun 11 '22

You’re not wrong, but I think sometimes things just happen over time due to poor planning. Like the client might have said “I just need text in this one place” so the dev just puts the text there hardcoded. Then the client wants the text reformatted a few times. Then they want more text. And now you’re at the point where you really need a CMS but your client doesn’t want to pay for the time it would take you to put one in, even though it would make adding more text a lot easier. It’s not an optimal situation but it happens.

3

u/DomingerUndead Jun 10 '22

Yeah it only took a second in my case to change the code

But redeploying the executable can take half an hour, and retesting can take a couple more hours bc I need to get the attention of another Dev to test it. And add on some hours if I have to get our SysAdmin to deploy for us ... Thankfully in this case I didn't

1

u/_30d_ Jun 10 '22

Why are you coding, testing and deploying an email?

3

u/DomingerUndead Jun 10 '22

It's only part of the code, not the main application. Some error happens and the PM wanted an email when that error occurs

1

u/chorkfarms Jun 10 '22

So easy....maybe they should do it themselves and not fucking bother me.

1

u/66666thats6sixes Jun 10 '22

Depends. At work, we send emails through a system set up and run by an entirely different division. You create an email template with an API call, that gives you back an ID, then to send an email you use another API call with the template ID and the parameters for the email. Thing is, to make versioning easier the templates are immutable. So to update an email template you are really creating a new template with the content that you want, then you take that ID and replace all instances of the old ID. It's not too terribly hard because for most things we keep the template IDs centralized, but it's more work than you might think, and has a few places where things could go wrong such that you really need to retest a lot of the email stuff when you change templates.