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 thread.
View all comments
49 points
*

Forgive my ignorance. SQLite is a database software. Why would McAffee create lots of database files?

[Edit:] I’m not asking why a program needs to store data. I’m asking why that necessitates many files. One database file (or one per table) should be enough, right?

permalink
report
reply
65 points

Many programs use SQLite internally and McAfee decided to store the database files in C:/Temp

permalink
report
parent
reply
2 points

No, these are sqlite temp files, not the database files. McAfee had no control over the temp files.

permalink
report
parent
reply
53 points

Sqlite is a great embedded database.
If you are storing lots and lots of information in a JSON file, CSV file, or coming up with your own serialisation… Chances are, sqlite is going to do it better.
I know loads of android apps use sqlite for storage. I’ve also managed to open quite a few programmes “proprietary” file format in sqlite.

permalink
report
parent
reply
64 points
*

A yes, the two genders of binary file formats: renamed sqlite file and renamed zip folder.

permalink
report
parent
reply
10 points

Don’t forget renamed and compressed xml + zip

permalink
report
parent
reply
1 point

Aren’t sqilte files themselves (like most other things) just fancy text files?

permalink
report
parent
reply
18 points

The program needs to store multiple temporary files (one per virus definition update, or scan results or whatever purpose).

It looks like they simply picked sqlite as a format because the data has a structured format and that way they leverage databases robustness, easiness to read and query the data.

The comment appears to be from 2006. Sqlite mightve had some limitations then that necessitated creating a new (temporary) database file as a subset of larger database for performance reasons or to allow multiple processes to read/write them and then consolidate data back into the single database.

permalink
report
parent
reply
9 points

Virus definitions?

permalink
report
parent
reply
2 points

Does sqlite create a file for every page in the table or what?

permalink
report
parent
reply
43 points

No, but developers are free to implement things in whatever crazy way they can dream up.

permalink
report
parent
reply
4 points

Nobody ever accused McTrellix of being efficient software 😆

permalink
report
parent
reply
5 points

Al sorts of applications would enjoy a database to log all sorts of stuff, store results, capture events, etc.

SQLite is great because it doesn’t necessitate another infra dependency as it is stored to file

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

Community stats

  • 9.5K

    Monthly active users

  • 861

    Posts

  • 33K

    Comments