Richard Hipp, SQLite, etc

Richard Hipp is the author of SQLite, as well as some other programs. I’ve discussed SQLite before. Recently, I’ve listed to several more podcasts:

Both worth listening to.

Richard simply writes most of what he needs himself, including his own editor, a SCM system, a web server, parser, diagram generator, etc.

The core of this philsolphy is “freedom,” as explained in the CoRecursive podcast:

Richard: Have you ever thought about the word freedom, what that means? Freedom means taking care of yourself. People go backpacking or stuff, they go on these long hikes, backpacking, where they carry everything they need on their back and they talk about how freeing that is because they are taking care of themselves. That’s what freedom means, and so, when you write the whole thing yourself, there’s a certain element of freedom in that, because you’re not tied to somebody else. You’re not dependent on different vendor providing you something. Suppose I had elected to go with Berkeley DB as the storage engine for SQLite version two. Well, at that time Berkeley DB was open source, but then later it was sold off to Oracle, and it became a duel source proprietary model and you can’t get hold of the source code to the later versions without paying license fees, yada, yada, yada, so, suddenly it becomes a problem. The parser generator in SQLite is one that I wrote myself years ago called Lemon, and because, rather than using Yak or Bison, I used my own, and you think, “Why did you do that?” Well, it turns out that when I needed some new language features that you couldn’t get out of Yacc or GNU Bison, because I owned the parser generator I could change it to do what I wanted when I needed a version control system for SQLite. It started out using CVS because, back in 2000, every project used CVS. That was the dominant version control system, but moving on into the mid-2000s, we needed something better and the whole idea of distributed version control had become a thing.

Adam: Your backpack example, I really like. One thing I get from it is that freedom involves discomfort or pain. You have to carry these things on your back.

Richard: It involves doing without. Here’s warning to all your listeners whenever a politician comes to you and says, “Oh, we’re going to take care of this problem for you.” What they’re really saying is, we’re going to take away some of your freedoms. The exercise for you, here, is to figure out what freedoms they’re going to take away in order to solve this problem, and they’re often well-disguised, but yeah, if you want to be free, that means doing things yourself.

And on the Changelog podcast:

Richard: You go out in the wilderness, and you’re on your own for five days, and people ask “Why do you do that?” And people say “Well, it’s the freedom. Think about this - freedom means taking care of yourself. That’s what people like about backpacking and wilderness adventures. They go out and they’re responsible for themselves, every aspect of their lives. They’re carrying their house on their back, and all of the food. That’s what they like. Freedom means taking care of yourself. And Fossil tries to promote that. It gives you the tools to make it easier for you to take care of yourself, because you can take this one standalone binary, plop it on a server, add a two-line CGI script, and suddenly you’ve got a complete developer website up and running. Can you do that with other systems? Absolutely, but there’s a lot more moving parts and a lot more you have to install and a lot more to maintain.

An interesting comment on what it took to get SQLite to the quality level it is at now:

Richard: At the machine code level. Yeah. Actually, MCDC’s a little stricter than that. Let’s not dwell on the details, but I had this idea, I’m going to write tests to bring SQLite up to the quality of 100% MCDC, and that took a year of 60 hour weeks. That was hard, hard work. I was putting in 12 hour days every single day. I was just getting so tired of this because with this sort of thing, it’s the old joke of, you get 95% of the functionality with the first 95% of your budget, and the last 5% on the second 95% of your budget. It’s kind of the same thing. It’s pretty easy to get up to 90 or 95% test coverage. Getting that last 5% is really, really hard and it took about a year for me to get there, but once we got to that point, we stopped getting bug reports from Android.