this post was submitted on 07 Mar 2024
654 points (95.4% liked)

Programmer Humor

19694 readers
141 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
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 12 points 8 months ago* (last edited 8 months ago) (1 children)

I'm terrified by this binary config file. Why?! Was he writing C and said "fuck it, memcpy"?

Edit: I suppose it would be more like "fuck it, fprintf(f, (char*)my_config_object, sizeof(my_config_object))"

[โ€“] [email protected] 1 points 8 months ago

I mean, python has pickle and people use that to store config. It's a weird practice, and totally unsafe, but it works well enough. This wouldn't be that different.