946
submitted 4 months ago* (last edited 4 months ago) by ABasilPlant@lemmy.world to c/programmer_humor@programming.dev

via: @memes@wetdry.world

https://wetdry.world/@memes/112717700557038278

the sqlite codebase is a gem.

tldr; mcaffee made a shit ton of sqlite files in the temp folder causing people to call the sqlite devs phone angrily. now they name all files etilqs to prevent this.

Text from the screenshot:

2006-10-31: The default prefix used to be "sqlite_". But then Mcafee started using SQLite in their anti-virus product and it started putting files with the "sqlite" name in the c:/temp folder. This annoyed many windows users. Those users would then do a Google search for "sqlite", find the telephone numbers of the developers and call to wake them up at night and complain. For this reason, the default name prefix is changed to be "sqlite" spelled backwards. So the temp files are still identified, but anybody smart enough to figure out the code is also likely smart enough to know that calling the developer will not help get rid of the file.

Code found at: https://github.com/sqlite/sqlite/blob/master/src/os.h#L65 (The line numbers in the screenshot and the code don't match up)

you are viewing a single comment's thread
view the rest of the comments
[-] livingcoder@programming.dev 27 points 4 months ago

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.

[-] camr_on@lemmy.world 72 points 4 months ago* (last edited 4 months ago)

Then mcaffee_ would be appearing in unrelated sqlite-using applications

[-] livingcoder@programming.dev 5 points 4 months ago

Oh, 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.

[-] Daxtron2@startrek.website 38 points 4 months ago

Why would sqlite put references to an unrelated product in their codebase?

[-] Hawke@lemmy.world -2 points 4 months ago

The same reason that McAfee did?

[-] dgriffith@aussie.zone 30 points 4 months ago

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.

[-] livingcoder@programming.dev 1 points 4 months ago

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.

[-] dan@upvote.au 1 points 4 months ago

McAfee might be doing something weird with the database, for example not closing it properly.

[-] Daxtron2@startrek.website 5 points 4 months ago

McAfee didn't, sqlite produces that name on its own. Its McAfee that stored them weirdly

[-] SwordInStone@lemmy.world 2 points 4 months ago

the solution is not on the mcafee side but on sqlite

this post was submitted on 06 Jul 2024
946 points (99.4% liked)

Programmer Humor

19735 readers
733 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