How to drive Google like the Lamborghini it is

Harry Turnbull
Makers
Published in
3 min readMay 10, 2020

--

Photo by David von Diemar on Unsplash

You’re probably familiar with Google, and other search engines, and have used these powerful tools to look for probably literally anything you want to find out, even just to check how to spell something (I checked how to spell Lamborghini just now).

But there’s a lot more that Google and other search engines can do, especially when it comes to using them to solve programming problems.

Good search engine technique is like driving a Lambo: it’s possible to get somewhere just in first gear, but it’s much faster to use all the gears.

So let’s start our engines!

(Our search engines that is.)

Prepare the Query

Getting the query right is very important to your googling success.

Photo by Christian Wiediger on Unsplash

Do you even need to google

Read the error message! It may suggest something to try that might fix the error, or you might know how to fix it yourself.

Remove anything overly specific to your problem

A search isn’t likely to return many useful results if your query contains anything that is specific to your situation. For example if an error message contains a path with directories specific to your system, it would be best to take those out of the query.

Showing /home/harry/projects/instagram-challenge/app/views/posts/show.html.erb where line #15 raised:undefined method 'like_path' for #<#<Class:0x00007f5b80899a08>

Here, the useful information undefined method `like_path', and the fact that this is Ruby on Rails project.

The path is specific to my project, so it won’t be found out there on the internet, as would the memory location for this object.

Use quoted strings for exact match

As error messages are very precise you can wrap them in quotes to get exact matches in a search. This will help you find a page with the same error, and hopefully they’ve found a solution.

Exclude words that aren’t helpful

Putting a “-” before a word in a search query will exclude that from results. I can’t think of an example, but I’m sure I’ve made searches that have had results cluttered with things I didn’t want.

Select the Results

You’ve made your query and now have results, but what to do with them?

Use dark mode for the best google experience.

Read the preview

The result preview can give you an insight as to whether the result may be useful to you. The site name may also indicate something (look for those stack-overflow links!).

Open a few

After you’ve made your query, you might head to the first result. Don’t be so hasty though, each of the results are likely to have use. I like to open the first three to five results in new tabs (preserving the original search in a tab so I can go back to it if none of the results are helpful).

Get context

Before leaping to the answers on a stack overflow post, or a deep down part of some documentation, have a look at the question posed, or the summary of the documentation section.

This will help you get a bit of context, for example if the original poster’s question is similar or relevant to your own

Avoid copy paste

Any solution you find is unlikely to be exactly what you need. There will often be extra bits attached to any code examples that are specific to the example problem which you wouldn’t necessarily need. Read the code, understand what its doing, and use it to write your own solution.

Get Googling!

Now you know how, start revving that engine!

Thanks for reading!

--

--

Improviser with Gamez Improv, Improbotics, The Nursery Theatre and Hoopla Impro. Learning to program properly with Makers Academy.