Hacker News new | ask | show | jobs
by cosmie 2863 days ago
Ditto! For anyone who isn't familiar with SQLite's testing procedures, read this[1] fascinating page.

The SQLite project has a mind boggling 711 times more test code than SQLite itself has. Put another way, only 0.1% of the project's code is SQLite itself. The other 99.9% consists of tests for that 0.1%.

[1] https://www.sqlite.org/testing.html

3 comments

In a similar vein, I rarely (if ever) seen a library that handles dynamic memory allocation more robustly than SQLite. This page is a glory to behold: https://www.sqlite.org/malloc.html
That page is inspiring, for a commodity, open source and old software project everything is very clearly defined and the language is very definitive which I hope is indicative of the actual library quality (I’ve never used SQLite).
Oh that is a fun read! I hadn't seen that before.
While in complete agreement with you on how amazing SQLite's engineering practices are, your math is off by an order of magnitude.

1/711 = 0.00140646976

0.00140646976 ~= 0.14%, not 0.01%.

I'll go put on my "pedant" hat now.

Thanks for catching that!

Although it was more a typo than a math error (as the 99.9% figure was correct). I'll chalk it up to posting when I should be sleeping (4:30am local time).

Good thing too, since it's in just about everything: https://www.sqlite.org/mostdeployed.html
I find it fun to look around whatever room/bus/park that I'm in and try to count the instances of Sqlite.
Is it like curl in that regard?