this post was submitted on 12 Aug 2024
1010 points (99.5% liked)

Programmer Humor

19166 readers
562 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 1 month ago

Man, actually seeing this in a wild log would make my day.

[–] [email protected] 24 points 1 month ago

I can tell by the error msg this wasn't an error before and was the cause of much grief

[–] [email protected] 61 points 1 month ago

When you’re the reason error log messages are created…

[–] [email protected] 4 points 1 month ago (4 children)

Is that python? If it's, thank you, finally learned how to format text in a way that can be read on the script and in the execution.

[–] [email protected] 9 points 1 month ago

As the other comments have already said it's not Python. Not sure what you mean with text formatting, do you mean that it's multiple strings that are concatenated using +? You don't need the + in Python, you can do

some_function(
    "part one of really long string"
    " part two of really long string"
)

Which is identical to

some_function("part one of really long string part two of really long string")
[–] [email protected] 3 points 1 month ago

Looks like TypeScript to me

[–] [email protected] 2 points 1 month ago (1 children)

No, but you can do the same in python

[–] [email protected] 1 points 1 month ago

I was thinking on trying it. Need to see how it works with f formatting.

[–] [email protected] 8 points 1 month ago (1 children)

It isn't, there are curly braces. It's TypeScript.

[–] [email protected] 1 points 1 month ago (1 children)

Python also have curly bracers, om dictionaries.

[–] [email protected] 5 points 1 month ago

Yes, but not for indentation (which is obviously what I meant)

[–] [email protected] 146 points 1 month ago (1 children)

What the user was doing is that they don't trust that the system truly deleted the account, and they worry it was just deactivated (while claiming it was "deleted"). So they tried to do a password recovery which often reactivates a falsely "deleted" account.

I've done this before and had to message the company and have them confirm the account is entirely deleted.

[–] [email protected] 49 points 1 month ago* (last edited 1 month ago) (1 children)

Many services have a grace period. Mostly it's 30-90 days where they keep your data, just in case somebody else decided to delete your account or you were drunk or something. But it could also be for legal reasons, like websites where you can post stuff for everybody to see, in case you post something highly illegal and the authorities need to find you. Another example is where a webshop is required to keep a copy of your data for their bookkeeping.

[–] [email protected] 14 points 1 month ago (1 children)

But it could also be for legal reasons, like websites where you can post stuff for everybody to see, in case you post something highly illegal and the authorities need to find you. Another example is where a webshop is required to keep a copy of your data for their bookkeeping.

None of these require your account to "exist". There could simply be an acknowledgement stating those reasons with "after X days the data will be deleted, and xyz will be archived for legal reasons".

Mostly it's 30-90 days where they keep your data, just in case somebody else decided to delete your account or you were drunk or something

This is the only valid reason. But even then this could be stated so that the user is fully aware. Then an email one week and another one day before deletion as a reminder, and a final confirmation after the fact. I've used services before that do this. It's done well and appreciated.

This pseudo-deletion shadow account stuff is annoying.

[–] [email protected] 3 points 1 month ago (1 children)

None of these require your account to “exist”.

It's actually much more technical than theoretical. When you delete an account on a website, that is being kept for a little while longer, it merely has field in the database that gets updated. (often with a removal date as well for the automatic removal after x amount of days). This field needs to be checked everywhere the account is used. And account recovery is mostly a part where this is forgotten, or possibly not even wanted.

And to claim this as fact, I just realized that the website I work on allows recovering of banned accounts. (Removed accounts are completely removed though because we don't need to retain any data).

This is the only valid reason. But even then this could be stated so that the user is fully aware.

Keeping the records for a little while longer is actually implied to be known. It's in their privacy policy, and is legal.

Whether or not services should make this easier to know exactly what is happening I definitely agree. Personally I think post history without user identifiable data should also be removed, but this is even less common practice (and is why tools exist to delete all your reddit posts for example).

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (1 children)

This field needs to be checked everywhere the account is used.

Usually something like this would be enforced once in a centralized location (in the data layer / domain model), rather than at every call site.

for the automatic removal after x amount of days

This gets tricky because in many jurisdictions, you need to ensure that you don't just delete the user, but also any data associated with the user (data they created, data collected about them, data provided by third-parties, etc). The fan-out logic can get pretty complex :)

[–] [email protected] 2 points 1 month ago

Usually something like this would be enforced once in a centralized location (in the data layer / domain model), rather than at every call site.

True. Although not every endpoint is the same, nor is every website or service.

This gets tricky because in many jurisdictions, you need to ensure that you don’t just delete the user, but also any data associated with the user

GDPR specifically mentions user identifiable data. I don't know about others.

[–] [email protected] 47 points 1 month ago (1 children)

Trying this every time I need to delete an account

[–] [email protected] 16 points 1 month ago* (last edited 1 month ago) (1 children)

Immediately sue them for ~~DSGVO~~ GDPR

[–] [email protected] 10 points 1 month ago (1 children)

(DSGVO is the German version of GDPR)

[–] [email protected] 3 points 1 month ago

Knew something felt of

[–] [email protected] 4 points 1 month ago

PEBKAC.

definitely a case of the PEBKAC

[–] [email protected] 29 points 1 month ago* (last edited 1 month ago) (1 children)

Day 492 of predicting edge cases…

[–] [email protected] 1 points 1 month ago (1 children)
[–] [email protected] 1 points 1 month ago
[–] [email protected] 11 points 1 month ago (1 children)

whats wild is that all the returned values were the same this is only for a log value that probably zero people check

[–] [email protected] 15 points 1 month ago

I believe rule of thumb is to track/log at least one level deeper than what you show to the end user, to ease with troubleshooting and debugging.

Beyond that, logs are only useless until they aren't, and then if you don't have them you're in for a universe of pain.

load more comments
view more: next ›