Open Source Spotlight: curl with Daniel Stenberg

Featured today is Daniel Stenberg, creator of the curl command. Daniel lives in Stockholm, Sweden with his wife and two kids.

Having seen such phenomenal success already, what is your vision for curl, going forward?

My grand vision for curl isn't really scribbled down somewhere. It's remained the same for a long time: to provide a free, open tool and library for Internet data transfers, which are rock solid and provide all features necessary for current and future users.  

To deliver on this, we need to keep up with Internet protocol trends, changes and updates to best practices, operating system developments, and new user expectations and demands—without giving up on existing users.

We need to stay focused. Turn down crazy feature-creeping ideas, yet add things that are good and sensible. We need to keep our ears to the ground and listen to users and adapt—we are far from done.  

I want curl to remain the 'Internet protocol swiss army knife' that is the obvious first-choice go-to tool and library for users and developers.

Also, I personally want to contribute towards the protocols that curl speaks and understands. This will help develop them in sensibly.  

Of course, I also want to make sure that I get my work on curl funded to keep me (and others) working on it as much as possible, and not just during spare time—like I did for the first twenty years.    

What kept you motivated to work on this for 25 years? What keeps your passion alive?

It's hard to answer. I have a desire to deliver a good tool that works and does what users want from it. It's very motivational when users appreciate the fruit of all my labour, and this becomes a positive spiral.

I think writing code is fun and I love toying with Internet protocols. And a strong sense of responsibility for what I've once shipped.

Now, I know that curl runs in maybe ten billion installations and it also makes me feel a responsibility to a world already full of curl. I need to make sure it runs fine, does the right things—and does it securely and safely. The number of instances and devices curl runs in is truly mind-boggling!    

What makes curl so powerful and popular that no other project has been able to dethrone it?

I don't think any single part of curl in itself is magic or very special. I think curl has reached its success and this level of usage due to several cooperating independent factors.

First, open source—if curl wouldn't have been openly licensed from the beginning, I would never have gotten all the help from contributors, and it would never have taken off. curl's success is the combined effort of a huge community.

Second, endurance—curl wasn't written to succeed within a particular time frame. This was never even a goal! We created it to solve a problem and we have kept on building and improving it bit by bit for a long time. It wasn't "successful" to any particular degree for many years in the beginning. Still, we endured. We kept going. And we still do.

Third, portability—curl has run in some seventy(!) different operating systems and on virtually all possible 32 bit or more CPU architectures. Wherever there's just a half-decent OS with a network stack, you can get curl running. And the libcurl API works the same on all of them!  

Fourth, API—thanks to the way we created the API, which was more or less by chance and good luck, applications don't need to know a lot about the particular protocols they use. Curl still gives applications flexibility and customization—and we've managed to practically remodel the internals several times over the years while maintaining the API. Further, we decided early to not interfere, understand or try to parse the contents transferred, which has helped us to keep a narrow and contained scope and focus.

Then, stability—since the beginning, we've put emphasis and efforts in ensuring that curl and libcurl are solid. Surely we keep fixing bugs, and while new ones creep in all the time, general perception and experience for users is still—and always should be—that curl is dependable.  

And lastly, timing—I didn't know the web would explode and that everything would end up getting done over HTTP. curl shipped and grew in exactly the right time, and could surf on the huge Internet boom wave.    

Were there any low-points or roadblocks? Did you ever think of stepping away from the project?

There have been small low-points and dips, but I can't recall any major obstacles or real periods of any serious blockage.

As I think everyone who works with something creative such as software development knows, the level of motivation and enthusiasm you feel varies over time. There are times when coding on curl isn't as fun as otherwise. That's just natural, and I know these periods sometimes come. I can then just wait them out, perhaps work more on other projects, or just spend more time with my family or something, as I know I will bounce back. I always do. I have never considered stepping away!    

Since your introduction to computers in 1985, development tools have evolved beyond imagination. How has this impacted your productivity?

Static code analyzers, source scanners, run-time debuggers, and compilers are much better. They can detect more problems, point out mistakes better, and find errors for us, saving countless amounts of time and energy otherwise spent on debugging.  

Test infrastructure for things like CI and continuous fuzzing has really enabled us (and everyone else) to ship much better and more reliable products in releases, as we can now test and verify much more and better than we did in the past.  

git has been very helpful. We developed curl on CVS for many years but switching to git (which we did rather late, not until 2010) really enhanced our productivity.  github taking over as the default source code hub from the previous emperor, Sourceforge, has made development easier, thanks to the fork/PR way of working and the fact that just about everybody these days now has a github account. The bar for starting to contribute to a project that is hosted on github is amazingly low.    

Earlier, you used to code 'alone and in the dark'. Now, you regularly live stream on Twitch. Why? How does this help you?

I still do most of my coding alone, as I work full time from home. The "in the dark" part came from the fact that up until February 2019, curl was still a spare time project for me, so the vast majority of all curl coding I did was done late at night.

Now, I work for WolfSSL doing curl work and curl support, so I do much more curl development in actual daylight now!

I do occasional live stream coding sessions where I work on curl and related things because I enjoy it, see it as a way to share knowledge, and try to engage more people into maybe contributing and helping out in the curl project.

It is also a way to interact with people, which I sometimes feel a need for when I haven't been out of the house for a bit too long! =)  

It is also a challenge to make an interesting live-stream while doing real development and debugging. It is hard to keep talking about what I do and why and I find it is much harder to really think and debug problems with a live audience.    

You’ve mentioned you aren’t used to attention, but you are now a tech celebrity, delivering presentations to large global audiences. What helped you transform?

I don't feel like a celebrity at all. But sure, I do a fair amount of presentations these days and I like it. It's a neat way to break off the everyday work-life cycle, and an escape to get out of the house and meet people!  

I've done presentations on and off for decades, but it was during the time we worked on specifying the HTTP/2 protocol that my talk frequency really started to increase.

During 2014/2015 I started to get invited to do talks about HTTP/2. Around that time, I wrote a document called 'http2 explained', that I published online for free (downloaded several hundred thousand times), and I got invited to talk even more.

More HTTP/2 talks lead to more curl talks as well. I'm still not as good a presenter as I'd like to be, but I've come to accept that the best way to get better is to practice. I hope one day I'll do really good presentations, and until then, I hope to continue to do at least interesting and educational talks.

In 2019, I've done almost two talks per month on average, primarily on about HTTP/3 or curl or similar, in half a dozen countries.

My advice is to start doing talks in smaller meetups, and to pick subjects that you really love or have intimate knowledge of. Then, do it again—even if you think you failed the first time. Then do it again.    

What advice would you give to your fellow open source developers?

In general, I'm not sure if what I've managed to do and achieve with curl makes me a particularly good or clever advisor on these topics.

I did what I thought was right at the time, and succeeded thanks to not giving up. But I've also kicked off and maintained several other open source projects that haven't been able to reach the same user popularity. It requires a fair amount of luck and timing that is really hard to predict.

For those who work on a project, who still wait for that moment of 'success': hold out and keep up. If you do the right thing, you just need to have patience and keep at it.

For those wanting to get (more) into open source, my advice is always to first scratch your own itches. Get involved in a project/tool that you use or like, so that it feels meaningful already from day one (that could then, of course, also be a project you start yourself). Start by getting a feel for the community and way of trade, and once you see how it works, help out by answering questions, reproduce bug reports, fix spelling mistakes in the documentation, etc.—until you feel the time is ripe to fix actual bugs or add new features.

For everyone: open source is a development process that flourishes when more people are involved, so always keep in mind that broadening the developer team should be a priority. Be friendly. Describe how to get started in the project. Helping someone else fix a bug is better than fixing it yourself. This way, you can also help debug if any issues arise later!

Which are the people / projects / books / habits that changed your life (and how)?

I seek inspiration from people who manage and run large living open source projects without going all snarky or negative. True leaders.

I want to learn to be focused and find lessons from people who can crank out quality code at high speed. Good developers.  

I hope to figure out how to inspire people, make my talks educational, write documentation better, or review code more accurately. Inspirational communicators.

I prefer to not name or even think of names, as the ones I look at for the moment tend to vary over time, and single individuals rarely possess all those qualities. The older I grow, the more I realize how much more I have yet to learn and master.  No other project has changed my life as much as curl has.