Tuesday, November 17, 2015

Personal searches from the address bar in Firefox and Chrome

Most modern browsers allow you to invoke the default search engine directly from the Address bar (aka the awesome bar or the omnibox), but did you know that you can easily access other search engines from the very same box? Assigning a keyword for alternate searches will allow you to invoke that search directly from the Address bar by typing the keyword, followed by a space and then the search query.

When paired with a shortcut to jump to the Address bar (e.g. Control + L), these keyword searches make for great workflow in the browser.

Adding new keyword search is easy: simply right-click on any search box and choose Add As Search Engine (Chrome) or Add a Keyword for this Search... (Firefox). Use the Keyword field to give the search a short handle that you can quickly type into the address bar to prefix your search.

How It Works

In both Chrome and Firefox, the URL field is the secret to making this work. The browser will automatically replace the "%s" string with the contents of your search query, meaning you can define a custom search for just about any URL.

To edit a keyword search, or to create your own from scratch, the process varies a little between the two broswers:

  • In Chrome, right-click the address bar and select Edit Search Engines...
  • In Firefox, the keyword searches are managed as bookmarks and can be created/edited from the manage bookmarks dialog.

My Searches

Full disclosure: the real reason I wrote this post is to document my keyword searches for future me. If you are a web developer or happen to use the same services as me, then maybe you can benefit from them too:

Site Keyword URL
Wikipedia wp http://en.wikipedia.org/w/index.php?title=Special:Search&search=%s
Delicious (links) d https://delicious.com/lmsurprenant/%s
Stack Overflow so http://stackoverflow.com/search?q=%s
Mozilla Developer Network mdn http://mdn.io/%s
Node Packaged Modules npm http://node-modules.com/search?q=%s
Evernote ever https://www.evernote.com/Home.action?offer=www_menu#n=056dfe4a-e94a-4d9f-8e49-cac92a0d21bb&ses=1&sh=5&sds=5&x=polygraphy&

Note that the Evernote one is custom. To create one for your own account, try the following:

  1. Log in
  2. Do a search
  3. Find and replace your query with "%s"

I don't understand why they make that so hard, but at least it seems to work (an improvement from a year ago):

Tuesday, August 11, 2015

Being a good Netizen

If your job involves working on a computer all day (especially if you are in the technology business), then you probably couldn't do your job without the world wide web.  Please consider it your duty to give back.

As knowledge workers, we are trained to pull information from across the web and combine it with our own knowledge and experiences.  On some problems, good information is easy to find.  On others, you need to invest significant effort to figure it out.  In the latter case, post your insights back to the web.

With social media (and modern software development), this is easier than ever.  Try to link your post to the most authoritative place for the subject at hand.  If you cannot post it in-context, then provide enough context so that someone reasonably familiar with the topic could understand what you are saying.

This will make the content searchable and it will help both you and others.  The harder it is to find good info, the more time you spend on research, the more obscure your insights, the more important it is to post.

It sounds obvious, but I'm amazed at the number of engineers I've worked with that will spend significant time figuring something out, and then simply move on to the next problem without committing their findings to the public record.  When I do that, I'm doomed to repeat the exercise all over.

Leave the web a little better than you found it.