Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Use DuckDuckGo for !bangs and Google for everything else (duckduckgoog.com)
95 points by mcrittenden on July 18, 2012 | hide | past | favorite | 63 comments



Every time I see someone laud ddg's !bang searches, I ask myself, "What makes managing your browser's configuration so damn hard?" I go to Chrome's "settings", I click "Manage Search Engines", and I update the keyword. Why is this so hard for some people?


I know that the !bang list is extensive. I know that most of the time using the full name of the site will work. Thus, I can reasonably guess how to directly search a site that I may not have even been to in years... or ever been to. If I want to know how much Wal-Mart is selling Bounty paper towels for, I can type "bounty paper towels !walmart" and I know it will work even though I may never have searched Wal-Mart's site before.

That's just one reason. Some more:

A single search interface. The Firefox search box lets you pick multiple search engines, but then a different one is selected each time. For me, DDG is always selected.

I can change my search target without retyping my query. I type my searches into Firefox's search box and I always type the !bang part at the end of the search. If I don't like the results at Amazon, I can go change "!amazon" to "!newegg" and quickly re-search another site. I also frequently use this to redirect failed mathematical queries to Google or Wolfram Alpha just by going and appending a "!g" or "!wa" on the search.

As someone else mentioned, portability. I don't need to ever configure another search engine list as long as I live. My list on my work computer install of Firefox is always up-to-date with my mobile and with my home Chrome install. If I get a new computer or switch to a new browser, it's already ready to go.

It updates itself. If a new site comes along (or I discover a site new to me), I'll have the search ready to go long before I ever thought to search it (or configure it) myself.


To be fair, you don't need to click around with Firefox's search bar. If you create a bookmark with a keyword, then typing the keyword on the main bar loads the website, and if you put an %s somewhere in that bookmark's url, you can then use it much like a bang, e.g.

    newegg ATI HD4200
That said, I can perfectly understand why you don't want to waste the time to set them up if someone has already done it for you.


And then you can't re-target (or fix a typo) in the same query in the same place, since the address bar will be replaced with the address of the loaded site. That's why I use the separate search bar.


I can change my search target without retyping my query. I agree with most of your post but this part doesn't seem like an advantage. If I have my own list of search engines in FF, I can just pick a new one from the drop-down without even typing the name of each engine.


Point taken, but as a counterpoint... if your list was as extensive as the DDG !bang list, finding the one you want would be a real pain.


You sound like one of the old Linux guys when somebody would say, "See? I can just click and change my resolution!" they'd go off about, "What's so hard about editing the X config file and finding the resolutions section and editing the right lines and then restarting X and ..."

Yes, I could spend my time adding custom searches to all of the browsers I use. Or I can just use DuckDuckGo and get most of the searches I want automatically and not spend any time at all.


Not to put too fine a point on it: in the olden days, you could change resolutions without either editing your Xconfig file or clicking anywhere, just by pressing Ctrl-Alt-(KP+/KP-). Most distributions disable that nowadays, because it tends to confuse people if they have a viewport larger than their screen.


I wonder if a lot of that is the death of CRTs, which didn't have a "native" resolution. That's the one thing I really miss about old gaming. Playing something at 640x480 and having it look good, and not be resampled. Might be why the current crop of pixel-art indie games annoys me too, come to think of it. The natural slight blur from CRT overscan is gone.


That's another Old Linux Guy-ism, thinking that there's even a distinction between "viewport" and "resolution". When non-OLGs talk about "changing resolution", the don't mean, well, anything about view ports, because nobody thinks about view ports.


When did being labeled an old linux guy become a pejorative? Asks the linux guy since 0.99pre...


Personally I'm with you, but one argument against us is that DDG !bangs work on any machine you're ever on, without having to set them up - which for some people is a big advantage.


When you tie a chrome browser to your google account, configuration gets shared across machines. I'm not sure how handy that is if you're often on machines you don't control, but for my use case (where I work with 3-4 different machines every day, but just those same machines) the shared state solves that problem.


Coming at it from the other direction: why should I have to spend my time configuring each search engine I want to use when I can just add DuckDuckGo and be done with it? The only material advantages to configuring the shortcuts in-browser are (a) you may want to use different shortcuts and (b) you may not want the ! prefix.


Chrome will automatically pick up the search box on any site you've been to and add it to its dictionary, no configuration required.


You can use keyword searches to get the !bang functionality directly in your browser for any search engine of your choice. There's no need to go through DuckDuckGo.


Except for that DuckDuckGo has hundreds of them already set up for you and the list is growing all the time: http://duckduckgo.com/bang.html. I suppose you could curate the list of queries you use for yourself, but I find it easier to just use theirs.


Chrome automatically fills the list for the sites I actually visit. By default the keyword is the domain name, but I can change that to whatever I want, rather than memorizing DDG's idiosyncratic abbreviations.


I suppose if you're that lazy, but I've been curating them over the years (they're now synced using Firefox Sync), and because they're custom, I've got much shorter keywords and greater customization. 'w <term>' searches Wikipedia for something, while 'hn' just loads http://hackerne.ws

I don't think there are more than one or two times a day that I actually type in a full URL.


Likewise, on DDG, !w <term> searches wikipedia for something, while !hn <term> searches hnsearch for something. And I never had to configure anything. The best part about DDG is what someone mentioned earlier in the thread, the fact that so many sites are already in the list. If I've never searched Stack Overflow before, I can !so just based on a guess, and most of the time it is right.


Those are just two examples that I gave. Two examples of customization that aren't available that I have are 'wf' set to search Wikipedia for <search term>+ " (film)" and 'wtv' set to search Wikipedia for <search term>+ " (TV series)".


Right, but DDG provides a TON of them so you don't have to add them all manually. For example, I only need to search imdb like once ever 6 months or so, and I don't want to have to think about if I've already set up a browser search for it and go to the trouble of setting it up if not.


Then use a browser that supports open search, type "imdb <tab>" in your address bar and whatever you want to search for, no need to use "bang-notation". I rarely find websites that does not support this kind of feature. In order for it to work you have to have visited the website one time first, but after that it's pretty straight forward.


It appears that Chrome doesn't support open search and I'd prefer not to switch browsers just for this one small feature.

Edit: I stand corrected.



I've switched full time to DDG for a couple months now, and have rarely ever used !g to Google results because I was unsatisfied with the DDG results. I'm curious what the criticisms of DDG's search results are. It's clear to me that many people prefer Google over DDG, but it's unclear why. What is the standard that the search results are being held up to?


When I search for something on DDG, I generally find one or two good results somewhere in the first set and all the rest are spammy/junk sites that repost content from other larger sites or just poor quality results.

DDG also doesn't understand context or acronyms, like MoP. I work for a gaming site, so my example is gaming related.

Google knows when I search for "mop legendary" I am looking for information relating to a legendary item in the Mists of Pandaria expansion for World of Warcraft. DDG doesn't make that connection of MoP -> Mists of Pandaria. I do get some amusing results like this though: http://www.buy.com/th/swiss-legend-diamond-mop.html


Tough one. blekko has a WoW slashtag, but it doesn't auto-boost for that query. You can invoke it by hand, though, how do you like this result?

https://blekko.com/ws/mop+legendary+%2B/wow


Less of the low quality sites, but I would expect one of these URLs to be on the first page:

1) http://www.mmo-champion.com/content/2806-Mists-of-Pandaria-B...

2) http://www.wowhead.com/news=204099/mists-of-pandarias-first-...

3) http://wow.joystiq.com/2012/05/25/mists-of-pandaria-new-wrat...

It does better (at least as far as the first result or two go) when you don't have to guess the acronym though:

1) https://blekko.com/ws/tier+14+sets+%2B%2Fwow

2) https://blekko.com/ws/challenge+mode+sets+%2B%2Fwow

For more standard searches it is okay, but DDG/Bing and Google are better. In these results I especially like potstuck and fabien potencier posts.

1) https://duckduckgo.com/?q=php+dependency+injection+container...

2) https://blekko.com/ws/php+dependency+injection+container+exa...

3) https://www.google.com/#hl=en&safe=off&sclient=psy-a...

It is nice to see alternatives developing though, should the day ever come that I want to leave Google behind!


I tend to still use !g for when i'm doing code / error searches, google just seems to give better results. There was some article a couple weeks ago about how often search engines "crawl" info, and google was still miles ahead of bing / ddg.


Besides the stuff mentioned by chaud, Google does a lot better for German terms as well.


Small suggestion: You should give focus to the text area when the user lands on the page, so I can instantly search and not have to reach for the mouse or tab.


I agree. If there is more than one field it can get annoying to have the wrong one automatically selected, but with only one field - for sure, save me the mouse click.


Yes. I was so excited to use this but my heart broke when I realized the search box wasn't auto-focused. That's a dealbreaker for me.


Fear not, I just pushed a fix for this. Let me know if you run into any more deal breakers!


Sweet! I'll be running all my searches through DuckDuckGoog from now on. Thanks so much!


Ah, great idea. I'll put that at the top of the todo list. Thanks for the feedback!


This is great! I've tried to adopt DDG but in the end I'm finding myself prefacing everything with !g -- to the point where I will type it for other engines.

Nice work!


Thanks! It's awesome to hear that this is useful for more people than just me.


Shouldn't this be really easy to create using a Chrome/Greasemonkey extension or something similar? I mean, all you have to do is automatically preface every query with "!g" (after passing through a regex to filter out the other !bang queries).

That way no tertiary server would be needed, which would probably improve the response times (and cost less...)


You're right, and it's something I thought about, but per-browser extensions are obviously more time intensive than a basic 30 minute web app. Plus, I'm not sure if Chrome's extension API supports messing with search queries or not and some quick Googling didn't turn anything up (does anyone know?)


Nifty idea. I'm having a hard time setting it as default search for Firefox though.

I followed the instructions to "Add a keyword for this search"...but I'm not really sure how to make it default? I don't see it anywhere under the searchbar dropdown ("Manage Search Extensions") and don't see anything under the general options.


Hmm, looks like setting a default in Firefox is more difficult than I thought. I'm a Chrome user, but I could have sworn when you added a custom search engine in FF then it showed up in the list from "Manage Search Engines" but it appears that's not the case now (maybe never was?), and that the recommended way is by using OpenSearch XML[1]. I'll get that in place and update when it's done. Thanks for the bug report!

1: http://davidwalsh.name/open-search


Update: XML for FF is in place, and I updated the instructions to reflect that. Thanks again.

http://www.duckduckgoog.com/browser


I wrote this a while ago (July last year) as http://goosegoosego.com whose source code is available at https://gist.github.com/1113894

You missed a spot in your handling of bang syntax, DuckDuckGo allows you to use either "\", "! " or "!ducky " to find the first result, you don't handle "\".

At the time I also sent Gabriel Weinberg an couple of E-Mails about it saying I'd love to have it be made redundant by DuckDuckGo itself, but it's not a feature he's interested in pursuing:

    > > > On Sat, Jul 30, 2011 at 6:41 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
    > > > I implemented a wrapper around DuckDuckGo and Google and stuck it on
    > > > goosegoosego.com
    > > >
    > > > I got tired of always prefixing my normal queries with "!g", and not
    > > > having "! " work the way I wanted.
    > > >
    > > On Sat, Jul 30, 2011 at 12:47, Gabriel Weinberg <yegg@duckduckgo.com> wrote:
    > > > Hah, nice :)
    > > > Gabriel, http://ye.gg/
    >
    > Needless to say I'd be delighted if some option to duckduckgo.com
    > would make this redundant.
    >
    > One flaw in it is that if you e.g. search for "!mysql" it'll redirect
    > to duck-duck-go, which'll do a "site:mysql.com" search an DDG.
    >
    > I'd like it to do a "site:" search on Google instead, but that would
    > require me to compile a list of all the bang operators that result in
    > site: queries, which would make the code a bit more complex than it
    > currently is.
    >
    > It would be great if you could pass some GET parameter to DDG to make
    > it emulate GooseGooseGo's behavior, e.g.:
    >
    >     http://duckduckgo.com/?dse=google&q=foobar
    >
    > dse = Default Search Engine.
    >
    > Then you could also make it prefer Bing, Yahoo etc.

    Duly noted, but not sure about doing that. Alternatively, you can
    use the 0-click api at http://api.duckduckgo.com/, which returns
    bang redirects and then you can just do a substitution if you see
    that.

    Gabriel, http://ye.gg/
So handling stuff like !mysql is certainly something you could expand upon if you want to make this more complete, I was just interested in making mine as minimal as possible, so it's a simple standalone script.

Also, to anyone using DuckDuckGoog or my GooseGooseGo you should be aware that you're trusting some (other) random dudes on the internet with your searches, I don't log anything with GooseGooseGo (no access or error logs), but you only have my word for that.

You can expose some sensitive information via your searches, and that's a reason why many people use DuckDuckGo in the first place even though their results aren't always up to par with Google's.


Neat! Thanks for the info/site/email thread.

> You missed a spot in your handling of bang syntax, DuckDuckGo allows you to use either "\", "! " or "!ducky " to find the first result, you don't handle "\".

I left this out on purpose since I don't really consider it part of "bang" syntax since it doesn't include ! ("bang") but I suppose I'm just splitting hairs at this point.

> Also, to anyone using DuckDuckGoog or my GooseGooseGo you should be aware that you're trusting some (other) random dudes on the internet with your searches, I don't log anything with GooseGooseGo (no access or error logs), but you only have my word for that.

Agreed, this is a concern. I posted a link to the GitHub repo for DuckDuckGoog in the site's footer but of course it's my word against the user's that that is the current code being used on the site and that I didn't add in any tracking code in the build process or anything.


From what I understand, all of this can be done entirely in javascript, mitigating any security issues of queries going over the wire.


I did post your GooseGooseGo link on HN at the time but it didn't get much traction :(

ref: http://news.ycombinator.com/item?id=2836779


God, do we really need a whole website for this? All it does is redirect to another site.


This looks interesting, but I find myself missing Google’s search suggestions. Does anyone know a way to enable them for this search engine? (I’m on Firefox.)

I see somebody hosts a “Duck Duck Go + Google Suggest” plugin and proxy server at http://nfriedly.com:81/. If there isn’t already a search plugin like I’m looking for, I think the easiest way to make it would be to just change the search URL (and name and icon) for that plugin. Does anyone know how to do that?


This would be a weird place to stop for someone trying to minimize their time executing searches and clicking.

Having to navigate to the browser to launch a search for MDN Arrays from Vim is suboptimal. Alfred (OSX) is the best solution I can come up with. "lucky <query>" pulls the browser up with its Google Feeling Lucky result. I've shortened it to just "l <query>". You can add custom searches with a syntax like "example.com/whatever/{query}".


The idea is to make it your browser's default search since lots of people (the majority?) search from the browser search bar or omnibar.

Edit: you could also add this to Alfred. Alfred supports custom searches ( http://blog.alfredapp.com/2011/04/14/alfred-productivity-tip...) so you can just use http://www.duckduckgoog.com?q=SEARCH as the custom URL and replace SEARCH with the token that Alfred expects


Right, I wasn't trying to rain on the submission.

But you bring up a good point -- DuckDuckGoog is still useful with Alfred since it saves you from having to manually create a bunch of custom searches.


I don't get what is so great about DuckDuckGo's bang syntax. Whenever I want to search Wikipedia, I simply go in Chrome's address bar and type "w<tab>".

Google is "g<tab>".

Hacker News is "h<tab>".

DuckDuckGo is "d<tab>".

This all works out of the box with no manual configuration given that you have used those search engines in the past. Is there something I am missing?


Great, exactly what I want, although it probably doesn't need to go through DDG it works perfectly fine. Google will let me load up the add as search engine dialogue but won't let me press okay to add it.


> Google will let me load up the add as search engine dialogue but won't let me press okay to add it.

That's probably because you need to change the keyword to something besides "duckduckgoog.com" since Chrome already auto-stored one with that keyword.


Awesome. I think this is the perfect solution for those users 'on the fence' about switching to DuckDuckGo. You can send them this link and say, look - its Google but now you get benefits of DDG too.


Why not type: ama <tab> = search amazon in chrome


I really like the search suggestions.


You mean other browsers don't allow you to create search shortcuts?

eg "a blah" for amazon, "w blah" for wikipedia "s blah" for stackoverflow?

- says a long time Opera users


Opera, as far as I know, was the first to support this. But this site is about using duckduckgo's !bang which is a readymade list for you.


I use that too in Opera. But it's set up for you and it's a huge list. Lazyness vs just-the-way-you-like-it


Firefox and Chrome both allow this as I've been using them for years.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: