

Duckie: Rubber Ducking as a service - fesuffolk
http://duckie.me/

======
splitbrain
It provided me with a really good solution to my problems:

Can you describe the problem in a paragraph? Please use small sentences, I'm
only a duck.

> My colleagues are dumb!

>> Is your colleagues the thing that has the problem?

> yes

>> Can you explain what your colleagues does?

> They do very very dumb things.

>> Do you fully understand how it does what it does? Could you split your
colleagues into smaller chunks?

> split them into chunks? Cheers duck, I think I have it now! _grabs axe_

~~~
goldenkey
There's not that much humor on HN so thank you for making me laugh out loud.
On a serious note, to actually infer the type of object, would we need Natural
Language Processing or something deeper like an actual AI. Would machine
learning suffice (clearly would take a lot of memory). Whats the best approach
to the simple task of inferring the object type granular enough to appropriate
the situation?

~~~
undecisive
One of the constraints we gave ourselves was that we wanted a fully in-browser
solution, and transparently secure - no server-side backend, therefore no data
protection issues.

With that in mind, any training we did would have to be done by us. This
limits our rubber ducking to exploits within our areas of expertise, but does
mean that any memory / cpu consumption occurs on the client machine. It is
potentially limited, but it is not a drain on our resources.

Secondly, this was very much a toy made for the fun of it, so our "brain" is
entirely hard coded. The language processing is very static, and very simple -
so it converts "my problem" into "your problem" so that it can ask suitable
questions while faking some intelligence, and there is a state machine that
would allow us to make the wizard more flexible based on certain inputs.

So to answer your question specifically, if following the previous
conventions, I would have tried to find some kind of word mapping to find
categories from words in the sentence. For example, the question "I can't seem
to get my stitching to look neat" or "my crochet hook keeps getting stuck" \-
it would notice the words "stitching" and "crochet" and decide the questions
are related to haberdashery, so ask general questions from that domain (e.g.
"can you unpick a little way and try again?", "are you keeping a consistent
pressure on your thread / wool?")

Of course, this isn't perfect. A couple of people have noted that the duck can
encourage you to hack people up (we discourage this course of action and offer
no warrantee for any advice the duck appears to present, especially to anyone
psychotically inclined). But inter-personal issues are one realm in which this
dumb regex-matching falls down frequently - it's very hard to work out that
the problem is actually a person, without asking the user directly. That said,
this is something that the state machine allows.

Sorry if this isn't a very good answer. I've seen tools like
[https://github.com/harthur/brain](https://github.com/harthur/brain) or
[https://github.com/NaturalNode/natural](https://github.com/NaturalNode/natural)
and would love to attempt something with that in the future, but yes - my
guess is that it would be slow to train, hard for us to cover all bases, and
may not fit into the memory of the client's computer. Alternatively, one thing
that we considered and ultimately rejected (mostly on UX grounds) was allowing
users to send us their conversations so that we could improve them - again, a
manual process, but one that possibly could be automated with a proper AI
library and a pre-generated 'brain'!

What can I say? That's what v2 is for :)

~~~
goldenkey
Thanks for your response. I actually didn't realize the duck had that much
logic built into it, so my question was more tending towards what could be
done. Now that I think of it, the English language is so large that any kind
of client side brain would be massive. Still though, I've seen multi meg JS so
a fully in browser solution is not totally abated. Good luck with v2!

------
bitJericho
I felt like I was getting so close...

\--- >Can you describe the problem in a paragraph? Please use small sentences,
I'm only a duck.

I must know the meaning of life

>Is your meaning of life the thing that has the problem?

Yes

>Can you explain what your meaning of life does?

It provides a reason for one's existence.

>So does it do just one thing? Any chance that your meaning of life, or parts
of it, can be isolated and test seperately?

Perhaps if we knew all of or part of the answer, each part could be tested.

>What parts of your meaning of life are you certain work, and where are your
'unknowns'?

Well many people find meaning in their relationships, work, or education. None
of these are universal though.

>Is your meaning of life being compiled? Can you restart the compiler?

The universe cannot be restarted or recompiled.

>Is something similar to your meaning of life being used elsewhere? Could
common elements be shared?

Well we know of many physical laws. Perhaps those laws can be adapted in some
way.

>How is your meaning of life modified?

We do not know if it is constant or ephemeral because we do not know the
answer.

>Could your meaning of life, or variables within it, be somehow overwritten or
overridden?

Perhaps they could by a supreme being.

>Is everything in your meaning of life your code? Could you replace
uncertainties with debugging statements?

We do not know how to overwrite the code of the universe.

>Why do you need your meaning of life?

To give life direction

>Do you fully understand how it does what it does? Could you split your
meaning of life into smaller chunks?

It doesn't appear to solve the problem.

>Sorry, my super-duck-powers have failed. Have you tried google or stack
overflow?

------
mmahemoff
An open, and subsequently abandoned, textarea on StackOverflow has rubber
ducked me on more than one occasion.

~~~
fesuffolk
It was inspired by a mixture of turning it off and on again and that sharp
intake of breath before 'nevermind'.

------
jbert
I have a pet theory as to why rubberducking works. Basically I think it uses
some additional brain machinery to check the metadata on our facts - i.e. how
reliable are each of the 'facts' we are using in our reasoning.

I tried to go into it in more detail here:
[http://www.berthels.co.uk/2013/03/29/how-do-you-know-what-
yo...](http://www.berthels.co.uk/2013/03/29/how-do-you-know-what-you-know/)

------
billytrend
Tried to make something like this a while ago[1] but the Eliza idea is a good
one. Must be our agricultural East Anglian sense of humour. Wonder how many
other farmyard animals could be turned into software as a service?

[1]
[https://news.ycombinator.com/item?id=7720153](https://news.ycombinator.com/item?id=7720153)

~~~
undecisive
Well, if we're doing farmyard animals, fesuffolk can I suggest "Gets my
goat!"... which, obviously, bleats out programming antipatterns? I'm sure we
can modulate the JS text-to-speech appropriately...

------
qeorge
This is great! Would you prefer to have the domain RubberDuckers.com for this
project?

My biz partner and I had a similar idea but never launched it! We still have
the domain though, and you are welcome to it. I'm so glad that you made this!

------
duckieman
It really seemed like I was getting somewhere, but then it failed. Oh well.

[http://i.imgur.com/TJiUdWT.png](http://i.imgur.com/TJiUdWT.png)

------
yincrash
My attempt at ducking the inability to eat a pizza.[1]

[1][https://mediacru.sh/9MluzWBYV3f3](https://mediacru.sh/9MluzWBYV3f3)

~~~
undecisive
I'm gonna call that a success! Did you ever get to the bottom of your pizza-
eating trauma?

------
drtse4
More info here:
[https://en.wikipedia.org/wiki/Rubber_duck_debugging](https://en.wikipedia.org/wiki/Rubber_duck_debugging)

~~~
undecisive
Do you think it would be rude of us to add duckie.me to the list of external
links? :)

~~~
drtse4
There is a link to
[http://www.rubberduckdebugging.com/](http://www.rubberduckdebugging.com/), i
don't see why duckie shouldn't be there too.

------
fesuffolk
Source at
[https://github.com/atleastimtrying/rubber_duck](https://github.com/atleastimtrying/rubber_duck)

------
fesuffolk
[http://www.fesuffolk.co.uk/talks/40](http://www.fesuffolk.co.uk/talks/40)

