
Deep API Learning - tonybeltramelli
http://arxiv.org/abs/1605.08535
======
omarforgotpwd
You may hate the tech industry for recklessly destroying other people's jobs,
but just know that we're working hard to build a next generation AI that will
destroy our jobs too.

~~~
thomasahle
Good thing is, that once they fully destroy our job, we will have achieved the
singularity, and all jobs will be destroyed. Ergo, our jobs will be the last
to be destroyed ;-)

~~~
amelius
Most likely, big corporations will reap the benefits of AI for quite a while
before the AI will escape and take over the world. Those CEOs and perhaps a
handful of supporting personnel will get paid long after programmers have lost
their jobs.

Turns out that there wasn't so much room on the shoulders of giants after all.

~~~
visarga
Probably many unemployed will start farming to earn a living, if they have
access to land. That's what's left when all the jobs are gone - the earth will
hire you to farm it.

Otherwise, unemployed people would have to depend upon state welfare, and that
is unreliable. We'll see lots of innovation in the field of self sustainable
living.

~~~
morgante
I don't understand this attitude at all.

People don't magically turn to farming when they lose their jobs. It requires
land, skill, and capital.

When we reach mass unemployment, we'll either have to provide for everyone or
have a revolution.

~~~
tashi
There's also a more dystopian option (see Neuromancer or Elysium for
examples): as the rich get richer they get more isolated from, and less
empathetic towards, the poor. They control the information and the advanced
military technology making a revolution impossible to organize, let alone win.
They have long and prosperous lives on or above all the good land while
everyone else is left behind in cities of rubble to fight over scraps.

To me, this seems like the default future if we don't actively prevent it.

------
vessenes
I just tried this, and it is surprisingly not bad functioning as a sort of
oracle / suggester. I keep a notes.txt file with thoughts questions, ideas,
etc. in most projects, and I would like this hooked up to it in vim, with a
given line opening up the results window on the right as I moved to it.

I tried "draw a 3d cube", apparently it doesn't have any 3d java libraries
baked in, but it did give me a bunch of 2d APIs, and then "plot a math
function", giving me some trig functions directly and some plotting functions.

That would probably have saved me 80% of my time looking stuff up, especially
in such a large search space

~~~
karmacondon
This is a good idea for a product. I guess it's kind of like a super grep

~~~
vessenes
Yes. It could be an API that stackoverflow licenses and puts on their question
page.

------
kilotaras
Here's a direct link to demo[1]. Looks like it received a hug of death.

[1] [http://bda-codehow.cloudapp.net:88/](http://bda-codehow.cloudapp.net:88/)

------
npalli
> The results show that our approach generates _largely_ accurate API
> sequences

OK then, humans still needed. Best case, it seems AI will take up what one
would consider interesting work (algorithms, thinking) and humans will end up
doing grunt work -- testing out bugs, cleaning up data, formatting data,
explaining to other humans etc.

Realistically though, this just creates two API's (instead of one) for humans
to master, the original API and the 99% accurate machine API and knowing where
the gap/bugs are.

~~~
reality_hacker
> humans will end up doing grunt work

labeling training examples for deep learning

------
simongray
This is a pretty cool research area, but isn't this implementation basically
just a Javadoc search engine? A basic keyword search of the javadoc
descriptions would return similar results in most cases, wouldn't it?

~~~
nl
Section 5.2 compares it to search techniques. It's a bit more than twice as
good as the next best method.

~~~
daveguy
The technique is a bit more complex than simple text search. It uses actual
click-through data to determine quality of the search result as it applies to
the query about an API. The SWIM (synthesizing what I mean) paper can be found
here:

[https://arxiv.org/abs/1511.08497](https://arxiv.org/abs/1511.08497)

Also of note from section 5.2: SWIM uses Bing clickthrough data to build the
model.

Using a better (or simply more used) search engine like google search would
likely improve the SWIM results.

EDIT: The method they use to compare the methods is BLEU which stands for Bi-
Lingual Evaluation Understudy and was developed for automated machine
translation evaluation. Apparently CS authors no longer bother with expanding
acronyms the first time they are used. Paper is here:

[http://www.aclweb.org/anthology/P02-1040.pdf](http://www.aclweb.org/anthology/P02-1040.pdf)

EDIT2: Also, for the BLEU comparison they compare the computer generated API
sequence to a human-written API sequence. However, they give no details on who
or how the human-written sequence is developed. Are the researchers coming up
with their own API sequence? Are they using mechanical turk? Interns? There
could be _significant_ bias depending on how these human-written sequences are
generated.

~~~
zodiac
> Apparently CS authors no longer bother with expanding acronyms the first
> time they are used.

What does CS stand for? :p

But yeah, I might expect BLEU to be unexpanded in an NLP paper maybe, but not
here

~~~
daveguy
> What does CS stand for?

Haha. Well played. :) I just think it's good practice in general, no matter
how common, to use the full name when the acronym is introduced. Especially if
it is a method used in the paper.

------
petra
Does any of the advanced machine learning and information retrieval gets
implemented in tools useful for searching API's and source code ? or is Google
keeping all the cool tech to itself ?

------
daef
.oO( we're good at writing code, but bad when it comes to reasoning about
code, so why not write code to solve that problem... )

~~~
BillinghamJ
If we struggle to reason about code we've written, perhaps we weren't so good
at writing code?

~~~
vog
Not quite. It also means that our languages are inadequate for the task.

As a rough analogy, consider how ancient philosophers tried to reason about
natural language explainations (as a vehicle to reason about the world). This
led to the development of formal languages, especially in mathematics, but
also e.g. in laws (both have lots of clearly defined terms in them that try to
make up for the ambiguities of natural language).

This is exactly what I like about languages like Haskell, where you can reason
realtively easily about code (although it's far from perfect). Or OCaml, where
in addition you can reason about the performance (although not perfectly, due
to garbage collection etc.). Or Rust, where in addition the compiler helps you
to reason clearly about memory usage and aliasing.

This is all far from perfect, but my point is that improving languages (and
actually _using_ these good languages!) is as important as writing good code
in the first place.

~~~
nothrabannosir
Sorry, accidental down vote. Great point.

