
Show HN: Use DuckDuckGo for !bangs and Google for everything else - mcrittenden
http://www.duckduckgoog.com
======
jemfinch
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?

~~~
DanielStraight
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.

~~~
icebraining
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.

~~~
DanielStraight
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.

------
w1ntermute
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.

~~~
gphil
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.

~~~
w1ntermute
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.

~~~
tg3
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.

~~~
w1ntermute
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)".

------
Rudism
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?

~~~
chaud
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>

~~~
greglindahl
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>

~~~
chaud
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...](http://www.mmo-champion.com/content/2806-Mists-of-Pandaria-
Beta-Build-15762)

2) [http://www.wowhead.com/news=204099/mists-of-pandarias-
first-...](http://www.wowhead.com/news=204099/mists-of-pandarias-first-
legendary-available-for-every-class)

3) [http://wow.joystiq.com/2012/05/25/mists-of-pandaria-new-
wrat...](http://wow.joystiq.com/2012/05/25/mists-of-pandaria-new-wrathion-
voice-files-datamined/)

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...](https://duckduckgo.com/?q=php+dependency+injection+container+example+)

2)
[https://blekko.com/ws/php+dependency+injection+container+exa...](https://blekko.com/ws/php+dependency+injection+container+example)

3)
[https://www.google.com/#hl=en&safe=off&sclient=psy-a...](https://www.google.com/#hl=en&safe=off&sclient=psy-
ab&q=php+dependency+injection+container+example&fp=e58c1f154d1f56aa)

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

------
missing_cipher
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.

~~~
strangetimes
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.

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

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

------
stevewillows
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!

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

------
chimeracoder
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...)

~~~
mcrittenden
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?)

------
polyfractal
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.

~~~
mcrittenden
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>

------
avar
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.

~~~
mcrittenden
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.

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

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

------
roryokane
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?

------
danneu
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}".

~~~
mcrittenden
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...](http://blog.alfredapp.com/2011/04/14/alfred-productivity-tips-using-
custom-searches/)) so you can just use <http://www.duckduckgoog.com?q=SEARCH>
as the custom URL and replace SEARCH with the token that Alfred expects

~~~
danneu
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.

------
olalonde
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?

------
brackin
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.

~~~
mcrittenden
> 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.

------
mrschwabe
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.

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

------
rduchnik
I really like the search suggestions.

------
excuse-me
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

~~~
manojlds
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.

