FYI.

This story is over 5 years old.

Tech

A Search Engine for Programming Language Syntax Is a Pretty Good Idea

Coding very often means Googling.

The current search engine for programming language syntax is Google. Knowing how to search for information is a key skill in knowing how to program at all. You can know all of the algorithms and a half-dozen programming languages inside-out, but you will nonetheless be searching for how to do something at some point, whether it's related to some brand-new or super-obscure functionality or to how to translate some feature or another in one programming language to another language.

Advertisement

In other words, knowing how to program has a lot to do with knowing how to access information—an acute awareness of how and when to learn.

This learning might occur in hyperdrive if you're the sort of programmer that's either obsessively learning new things just for the sake of it—which is a whole lot of programmers—and-or has to learn new things to apply them to a new project or task. For a recent project, for example, I needed to use a machine learning framework that's implemented in a kind of obscure language called Lua, which is like a super-lightweight version of Python. I watched a couple of videos, but mostly I was inferring syntax from other Lua code and Googling things like "Lua for loop break."

A computer engineering student at Queen's University in Ontario named Anthony Nguyen has released what he hopes will replace Google for the syntax searching needs of software developers. It's called SyntaxDB, which Nguyen hopes will, "one day become the world's fastest programming reference."

I did some cursory searching and the SyntaxDB interface is pretty nice. Searching, say, "Java iterator" gives a few results for Java control flow structures and a sidebar menu for further exploration within the Java language. Those results are all internal to SyntaxDB and lead to reference materials written exclusively for the database. It's more like a multi-language quick reference manual than a search engine.

Advertisement

As for those results, I didn't actually get a page for Java iterators, which seems bad and also seems like a limitation of relying on in-house content rather than trying to exploit the bottomless stockpiles of programming language documentation that already exist on the internet. Just writing your own reference materials seems easier in the short-term, but maybe not all that sustainable.

The big advantage of SyntaxDB that I can see is in the brevity of the documentation. An entry on for-loops isn't going to give you every detail, or most any details at all, just what one looks like and its basic usage. And that's often all you're looking for—what a known concept or feature looks like in an unfamiliar programming language.

SyntaxDB has an integration with the general internet search engine DuckDuckGo that seems more useful than using SyntaxDB directly. Here, you can enter a syntax search term in the normal search bar and DuckDuckGo will give you the quick and dirty SyntaxDB documentation, if it exists, along with the usual list of internet search results. If it doesn't exist, DuckDuckGo will find the next best thing.

Will I use it? Mayyyybe. I'm already pretty good at cultivating quick and dirty answers from complicated documentation, and, like a lot of people that write code, I also often enough turn to the the vast stockpile of ad hoc documentation found in the programmer Q&A forums of StackOverflow. That's something Google can give me that I'm not sure could ever be replicated by SyntaxDB.