1 Apr

How we're trying to help programmers

DuckDuckGo is fortunate to have a great community of developers who write, review and fix code in our open source repositories every day. For several years now we've relied on volunteers whatever their level — beginner to expert — but who can they rely on when they get stuck? Recently we've been trying to increase our programming Instant Answers for just this purpose.

When programmers are "in the zone", they need fast access to things like code examples, syntax help, and answers to technical questions. To provide this, we now have programming Instant Answers in the following categories:

Function & command lookup

Often we get held up in a project and need to quickly find the syntax or description for a particular command or function. Thanks to open APIs for many languages this is a relatively easy thing to incorporate into an Instant Answer, for example:

nodejs crypto

Screenshot of DuckDuckGo's function lookup for NodeJS

Package & library lookup

As well as built-in functions, most languages have third-party libraries and packages to extend their capabilities. Again, open APIs for package repositories mean we can offer this to our users, either showing details for a particular package or a list of relevant packages, for example:

rubygems cucumber

Screenshot of DuckDuckGo's package lookup for Ruby

Tutorials & Q&A

Sometimes we just want the answer to a particular problem or error message, for which there's a wealth of information on Q&A and tutorial sites. One such is Stack Overflow which powers one of our popular Instant Answers, and we also have more specific answers for certain technical topics, for example:

matrix latex document

Screenshot of DuckDuckGo's TeX answers

Cheat sheets

Cheat sheets were introduced fairly recently but have become popular due to their ease of creation (just a single JSON file) and the fact they can be applied to pretty much any topic. We have many for programming tools and languages, for example:

mysql cheatsheet

Screenshot of DuckDuckGo's MySQL cheat sheet

Programmers are often delighted when they discover these answers, but there's still more to do! To improve our coverage even more, we're currently focusing on completing this table of programming Instant Answers. Whatever coding help a user is looking for, we aim to provide what they're searching for instantly and put a smile on developers's faces.

Please join us in filling in the gaps by creating or simply suggesting sources for the missing Instant Answers. In particular, when an open API exists for a language it's usually straightforward to reuse that data as a "Spice" Instant Answer. Programmers like you will be very grateful!

4 Tweet

This blog has been archived

Thank you for reading and contributing lively discussion to our blog! Read more posts about online privacy on our new blog at spreadprivacy.com.


posted by MichelPoisson • 2 years and 9 months ago Link

What a great idea. I've immediately switched my default back to DuckDuckGo.

I can see it works lovely if I give a bare function name e.g.
However, if I provide the module as well, the answer isn't quite so "instant" i.e.

Well done, and good luck in the future!


posted by <hidden> • 2 years and 11 months ago Link

how much storage and cpu are you offering us to implement these things?

posted by <hidden> • 3 years and 15 days ago Link

Thanks for the question.

For people using these Instant Answers, they are generated on our servers with a small amount of JavaScript for displaying, so CPU usage and caching storage should be not much more than regular DuckDuckGo search result pages.

For developers creating these Instant Answers, we've worked with Codio to offer all contributors free access to their service which is an online development environment. Because of this, developers don't need to install a server or framework - it's all handled in the Codio web app.

posted by tagawa Staff • 3 years and 12 days ago Link