Live data from Hacker News

How SQLite is tested

sqlite.org

61–70 of 87 posts

Re: How SQLite is tested

#62

Over a decade ago, the maintainer of SQLite gave a talk at OSCON about their testing practices. One concept that stood out to me was the power of checklists, the same tool pilots rely on before every flight. He also mentioned Doctors Without Borders, who weren't seeing the outcomes they expected when it came to saving lives. One surprising reason? The medical teams often didn't speak the same language or even know ea…

On the other hand, I think this narrative also causes a lot of useless red tape. There might be some survivorship bias here. Aviation, Doctors Without Borders, and SQLite have good checklists. Checklists are simple, so it's easy to think "oh I could do that too". But you never hear about the probably endless companies and organizations that employ worthless checklists that do nothing but waste people's time. I wish t…

> But you never hear about the probably endless companies and organizations that employ worthless checklists that do nothing but waste people's time.

Most if not all the bad checklist I have encountered are all for the same reason, they were not tested or poorly written, and most of the time both.

Not tested in terms the checklist was written by somebody who doesn't actually know how to do the whole project. Unlike Professionals like Doctor ands Pilot where they are well trained and the check list are well understood to be a reminder. The rational behind it were taught and even if not professionals will question if something they dont understands while most other in there field could immediately give a detail answer.

Another example would be HR writing an on-boarding checklist. 99% of the time I have seen those check list are intended to make HR's life easier. Not the candidate or applicants.

Checklist is also a clear and distilled form of writing. And as the saying goes I dont have time to write you a short letter, but I have time for a long one. Writing short points with clarity takes a long time. And not a skill set everyone process. Nor do they have the time to do it when it is not part of their job or KPI.

Re: How SQLite is tested

#63
post #62

Earlier quoted context omitted.

On the other hand, I think this narrative also causes a lot of useless red tape. There might be some survivorship bias here. Aviation, Doctors Without Borders, and SQLite have good checklists. Checklists are simple, so it's easy to think "oh I could do that too". But you never hear about the probably endless companies and organizations that employ worthless checklists that do nothing but waste people's time. I wish t…

> But you never hear about the probably endless companies and organizations that employ worthless checklists that do nothing but waste people's time. Most if not all the bad checklist I have encountered are all for the same reason, they were not tested or poorly written, and most of the time both. Not tested in terms the checklist was written by somebody who doesn't actually know how to do the whole project. Unlike P…

> Most if not all the bad checklist I have encountered are all for the same reason, they were not tested or poorly written, and most of the time both.

I'd argue this comes back to "written by people who do not have to follow them on a regular basis".

Re: How SQLite is tested

#64

> The TH3 test harness is a set of proprietary tests [...] > The dbsqlfuzz engine is a proprietary fuzz tester. It's interesting that an open-source (actually public domain) software uses some proprietary tests. It never occurred to me that this was a possibility, though in retrospective it's obviously possible as long as the tests are not part of the release. Could this be an alternative business model for "almost-o…

Many times these test suites are more valuable than code itself, particularly in legacy software. Trying to find and document thousands of edge cases a software like Excel must have is more difficult than implementing them.

Re: How SQLite is tested

#65

They need to do better testing to stop the whole database file getting corrupted, which happened a ton to me with SQLite.

I've never had SQLite corrupt a database file, and given how widely it's used literally everywhere without reports of corruption, and the incredibly extensive testing methodology they use to ensure that, your issues seem very unlikely to have been SQLite's fault.

Re: How SQLite is tested

#66

> The TH3 test harness is a set of proprietary tests [...] > The dbsqlfuzz engine is a proprietary fuzz tester. It's interesting that an open-source (actually public domain) software uses some proprietary tests. It never occurred to me that this was a possibility, though in retrospective it's obviously possible as long as the tests are not part of the release. Could this be an alternative business model for "almost-o…

> It never occurred to me that this was a possibility

Yes, it's viable. I do it for my companies projects in addition to dual-licensing under the GPL. See "The unit tests and Unicode data generators are not public. Access to them is granted exclusively to commercial licensees." [1].

[1] https://github.com/railgunlabs/unicorn?tab=readme-ov-file#li...

Re: How SQLite is tested

#67

Over a decade ago, the maintainer of SQLite gave a talk at OSCON about their testing practices. One concept that stood out to me was the power of checklists, the same tool pilots rely on before every flight. He also mentioned Doctors Without Borders, who weren't seeing the outcomes they expected when it came to saving lives. One surprising reason? The medical teams often didn't speak the same language or even know ea…

I highly recommend The Checklist Manifesto [1] for a excellent guide on how to construct good checklists. [1] https://atulgawande.com/book/the-checklist-manifesto/

Thought this would be a blog, disappointed to see it's a whole book. My suspicion is there is 5 good pages of material stretched out 20-50x.

Re: How SQLite is tested

#68
post #23

What is the story with Fossil? Is it used outside of Sqlite?

The story of Fossil: Something better than CVS was needed. (I'm not being critical of CVS. I had to use the VCSes that can before, and CVS was amazing compared to them.) Monochrome gave me the idea of doing a distributed VCS and storing content in SQLite, but Monochrome didn't support sync over HTTP, which I definitely wanted. Git had just appeared, and was really bad back in those early years. (It still isn't great,…

I love Fossil, I love SQLite, and I also like Althttpd.

https://sqlite.org/althttpd/doc/trunk/althttpd.md

Just like Fossil vs Git, SQLite vs $SomeRealSQLServer, I wish someday Althttpd would become a no-bullshit self-contained replacement for Nginx/Apache/whatever bloated HTTP servers. It has already proved its working by serving Fossil/SQLite, but configuration/features for serving actual web site is not yet "real production quality", at least that is how I feel.

Overall, what an amazing legacy this set of software has been to the world.

Re: How SQLite is tested

#69

Over a decade ago, the maintainer of SQLite gave a talk at OSCON about their testing practices. One concept that stood out to me was the power of checklists, the same tool pilots rely on before every flight. He also mentioned Doctors Without Borders, who weren't seeing the outcomes they expected when it came to saving lives. One surprising reason? The medical teams often didn't speak the same language or even know ea…

The thing that drives me absolutely mental about most developers I’ve worked with is just how much work they’ll do to avoid the easy thing, if the easy thing isn’t programmatic.

I have tests and CI and all that, sure. But I also have a deployment checklist in a markdown document that I walk through. I don’t preserve results or create a paper trail. I just walk the steps one by one. It’s just so little work that I really don’t get why I cannot convince anyone else to try.

Re: How SQLite is tested

#70
post #67

Earlier quoted context omitted.

I highly recommend The Checklist Manifesto [1] for a excellent guide on how to construct good checklists. [1] https://atulgawande.com/book/the-checklist-manifesto/

Thought this would be a blog, disappointed to see it's a whole book. My suspicion is there is 5 good pages of material stretched out 20-50x.

It's true that you can boil it down a lot. In fact, the book even has a checklist checklist that distills down the advice to one page. However it was overall a very quick read and the extra discussion really did further my understanding of the underlying principles that make a checklist good. I'd recommend reading the whole thing so that you actually make a useful checklist instead of a cargo-cult copy of an aviation checklist.
Post reply on HN