Programming today depends a lot on how good you are at Google. 99 percent of the code you want to implement is code someone else has already implemented and left on Stack Overflow or Github. Developers no longer need stacks of textbooks on their desks: instead, we just type our query into the search box and hope it shows up among the nine results on the first page.

What many, many people don’t realize is that Google plays a very important role here. Just as we’ve become obsessed with using keyboard shortcuts to improve coding speed and agility, there are a number of command options that can take your Google Assistant to the next level. Here’s how developers can best use some of these commands.

Exact phrase search

If you enclose some or all of your searches in quotation marks, Google will do a precise search for typed phrases, rather than the way it normally does for words alone. This is the go-to power I use most often on Google.

This is really useful for developers searching for exception strings. If you’re sure you want an accurate exception with no variance, this can weed out the nasty bits of the result.

For example,

Failedtoparseconfigurationat:logging.appenders.[0]mvnassemblyplugin

The contents in parentheses are the specific exception text, followed by the relevant specific criteria THAT I throw to help with the precise search.

Out of condition

There’s a lot of overlap in our little programming world. Items with similar names and repeated terminology can make combing through search results very frustrating. However, it’s easy to exclude some search results: just add a “-” symbol before the word.

For example,

SparkJava-Apache

One of the annoying things in Java is sparkJava and Apache Spark. If you only want to search for the former, you can easily delete all apache-based results with “-apache.”

The relevant conditions

Want to know what the alternative to a particular technology is? Then you need the support of relevant keywords. Give a URL, and it will return sites with similar content. In practice, I’ve found it useful when looking for alternative technologies, alternative frameworks, or finding something additional and compatible.

For example,

related:mongodb.org

  


We now have many NoSQL databases that are similar and alternative to MongoDB.

The file type

Did you know that you can force the types of files you want to search in Google? This is really useful when looking for printable memos because you can specify PDF files, although it can be used for a lot of searches.

For example,

IntelliJshortcutsfiletype:PDF

  


On-site search

I often find that searching for a website or a forum is scary. Fortunately, Google allows this to be avoided. You can specify a Google search for a site or a subdomain.

For example,

intellijshortcutssite:stackoverflow.com

Stretch! Search websites directly from Chrom

Chrome supports custom search engines. Very powerful, especially if you’re always searching for a site like StackOverflow.

First, right-click on the address bar, and then select Edit Search Engines.

  


In the dialog box that appears, scroll to the bottom of Other Search Engines. Suppose we want to add support for Stack Overflow. First, we’ll use “Stack Overflow” as the engine name. Second, we need a shortcut: when enabled, we type this into the address bar to make sure this is the engine we want to use. The shortcut I set is “so”. Then, we need a url where I will replace the search criteria with %s. If we do a sample search with Stack Overflow and check the URL, we can see where to replace the condition with %s:

  


Are replaced with % s conditions, is http://www.stackoverflow.com/search?q=%s. And then step three. Click Finish and your engine is set up.

Type “so” in the address bar, then press the space bar. Chrome will automatically tell you that you can search Stack Overflow.

  


If you have any questions or questions, please leave a comment.