this post was submitted on 06 Jul 2024
946 points (99.4% liked)
Programmer Humor
19817 readers
63 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I love how the solution didn't involve changing the prefix to "mcaffee_". Now users don't know who to blame. Great. That's so nice of them.
Then
mcaffee_
would be appearing in unrelated sqlite-using applicationsOh, I thought that the temp files were named by the user. If that's not the case, that these are not databases created specifically by McAfee in the temp directory, then I'm not sure what the appropriate solution should be. Obscuring the file type and how the file is used from users is still a bad practice.
Why would sqlite put references to an unrelated product in their codebase?
The same reason that McAfee did?
McAfee wrote a program that used the Sqlite library for database storage.
When going about its data storage business for McAfee's program, the Sqlite library was storing files in C:\temp with prefixes like sqlite_3726371.
Users see that and get angry, and bug the Sqlite developers.
Now probably when initialising the Sqlite library McAfee could have given it the location of a directory to keep it's temp files. Then they could have been tucked away somewhere along with the rest of the McAfee code base and be more easily recognised as belonging to them, but they didn't.
So because of a bit of careless programming on McAfee's part, Sqlite developers were getting the heat because the files were easily recognisable as belonging to them.
Because the Sqlite developers don't have control of what McAfee was doing, the most expedient way to solve the problem was to obfuscate the name a bit.
Yeah, if it's purely a Sqlite implementation detail to create temp files, that's on them to own and fix. I thoroughly dislike that the files are obscured from users.
McAfee might be doing something weird with the database, for example not closing it properly.
McAfee didn't, sqlite produces that name on its own. Its McAfee that stored them weirdly
the solution is not on the mcafee side but on sqlite