DEV Community

Cover image for Search for Answers like a Pro
Pablo Oliva
Pablo Oliva

Posted on • Updated on

Search for Answers like a Pro

TLDR; use this extension to get better search results.

The Backstory

Google and the other search engines typically do a good job, in varying degrees, of providing you with relevant search results. What I found myself doing recently was unconsciously filtering these results. I was picking out the domains that I have come to know that provide higher quality technical content. This was possible and an automatic behavior of mine after several years of working with the same languages and frameworks and getting to know the community very well.

This automatic but manual filter that I apply to search engine results helps me get answers quicker and in turn, improve my performance. After realizing this behavior of mine, two additional questions crossed my mind. First, I questioned why I was doing this "manually" and as any good developer would do, wondered how I could automate or improve this process further. Second, I thought about how I could I share my knowledge with the community to help more junior developers gain the same advantage I had acquired purely from spending more time in the mix.

The Solution

To tackle the first question of how to improve the process, my first thought was I could easily append some search syntax to the query to limit my searches to a list of accepted domains. This functionality could potentially be added to the omnibar with a browser extension. After exploring the idea further, I thought that it would be even better if we could customize a search engine to get the results we need. It turns out, that is exactly what Google offers, a Programmable Search Engine that allows you to include and exclude sites from a search.

You can configure multiple Google custom search engines with a Google account. Google also provides you with a related generic URL that you can pass a custom-search-engine-id and query to, that then provides you with a result page of filtered results based on the sites that you have included or excluded for that custom search engine. This made creating a browser extension that links a search from the omnibar to these results easy. That is how Slice Custom Search came to life.

Instructions are available for how to set up the Google Programmable Search Engine and the Firefox extension in the GitHub repo. If enough interest exists, I can also work on overcoming the challenges of the Manifest v3 that Google controversially requires, so that a Chrome extension also becomes available.

Creating the extension and enabling the functionality to search a sub-set of quality domains was not enough though. I still had a second question pending: how to share the domains that were higher quality? This was answered by the ability of Google's Programmable Search Engine to accept a tab delimited list of domains used to configure the custom search engine. This makes it super easy for us to come up with community curated lists that we can share. I have provided an initial set of lists for TypeScript, JavaScript, RxJS and Angular, also available in the repo. I encourage others to submit pull requests for new lists or improvements to the existing lists.

Final Thoughts

If you are like me, constantly needing to refresh myself on a particular programming detail, then I hope this extension along with Google's help, helps you as much as it does me.

As a final note, it would be nice if other search engines provided this type of customization of search results. My opinion is that Google has too much influence in our field and more options would be welcome.

Photo by Hadija Saidi on Unsplash

Top comments (0)