DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Become a Better Programmer by Mastering Google

Sam Atkinson user avatar by
Sam Atkinson
·
Jan. 29, 16 · Opinion
Like (45)
Save
Tweet
Share
18.76K Views

Join the DZone community and get the full member experience.

Join For Free

Modern programming is now often equated to being really good at Google.  If you're trying to achieve something in code, 99% of the time it's likely that someone else has already done it and posted it up on Stack Overflow or Github.  No longer is there a need for a stack of textbooks at a developers desk; instead, we just need to type it into the search box and hope it shows up in the first 9 results.

What a lot of people don't realise is that Google has a lot of powerful tricks hidden up it's sleeve.  As much as we have become obssesed with the power of keyboard shortcuts for speed and agility in coding, there are a selection of commands which can take your Google-fu to the next level.  Here are some of those commands and how they can be best used by a developer.

Exact Phrase Search

If you wrap part or all of your search with quotation marks, Google will search for the exact phrase entered, unlike normal where it searches for the words individually.  This is my most common go-to power function on Google.

As a developer, this can be really useful when searching for exception strings.  You know you want that exact exception without variance, so this can cut out the cruft in the results.

Example

"Failed to parse configuration at: logging.appenders.[0]" mvn assembly plugin

The exact exception text is in the quotations, but I've then thrown in some extra terms that are relevant to help focus.  

Exclude Term

There can be a lot of overlap in our little world of programming. Projects with similar names and overloaded terms can make it very frustrating when combing through search results.  It's really easy to exclude a word from search results though; simply add a "-" before a word.

Example

Spark Java -Apache

Annoyingly in Java there is sparkjava and Apache Spark.  If searching for the former, you can remove all Apache based results with ease.

Related Terms

Want to know what the alternatives are to a technology?  The related keyword has your back.  It expects a URL and will return websites which have a similar content.  In practice, I've found it useful for bringing up alternative technologies or frameworks, or finding things which are additive and compatible.

Example

related:mongodb.org

Image title

We now have a list of similar and alternative NoSQL databases to MongoDB.

FileType

Did you know you can mandate the type of file you want to search for in Google?  This can be really useful when looking for printable cheatsheets as you can specify PDF files, although this can be applicable to a host of searches.

Example

IntelliJ shortcuts filetype:PDF

Image title

Search Within a Site

I often find that the search on a website or forum is terrible.  Fortunately, Google can rescue the situation.  It's possible to specify Google specifically search a site or subdomain.  

Example

intellij shortcuts site:stackoverflow.com

Bonus Feature! Directly Search a Website From Chrome

Chrome has support for custom search engines. This is immensely powerful, particularly if you're always searching on a particular site such as StackOverflow.  


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

Image title

In the box that comes up, scroll to the bottom of "Other Search Engines".  Let's say we want to add support for Stack Overflow. In the first field, we'll put "Stack Overflow" as that's the name of the engine. In the second we need a shortcut; when enabled, we'll type this into the address bar to say that is the engine we want to use.  I'll use "so" for this purpose.  We then need a URL, where we replace the search term with %s. If we do a sample search on StackOverflow and check out the URL we can see where to replace the term with %s:

Image title

We replace my term with %s to give us http://www.stackoverflow.com/search?q=%s. Put this into the third field.  Click done, and your engine is live.

In the address bar, type "so" then space.  Chrome should then tell you you're searching Stack Overflow.Image title

Pop any questions or queries into the comments, or follow me directly on Twitter via @SambaHK.

Google (verb) Programmer (hardware)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • DevOps for Developers: Continuous Integration, GitHub Actions, and Sonar Cloud
  • DevOps vs Agile: Which Approach Will Win the Battle for Efficiency?
  • Solving the Kubernetes Security Puzzle
  • Tracking Software Architecture Decisions

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: