编程语言与软件工程2016arxiv.org
深度 API 学习
Deep API Learning
进阶 · 约 45 分钟读完前置知识:深度学习基础、RNN/序列模型、API 使用经验
导读
这篇论文(Deep API Learning)研究如何利用深度学习根据自然语言描述自动生成 API 调用序列,帮助开发者从海量 API 中快速找到合适的调用方法。作者训练模型将查询(如“画一个三维立方体”)映射为对应的 API 序列,并声称生成的序列大体准确。
HN 关注点:是因为它展示了用 AI 自动生成代码/API 调用的早期尝试,引发了关于 AI 是否会取代程序员、以及机器生成 API 的可靠性问题的讨论。
HN 评论精选
这几条评论里:质疑 1 补充 1 亲历 1
亲历亲测有效:作为 API 查询建议工具能大幅节省查文档时间
我刚试了一下,它作为一种“神谕/建议器”出奇地好用。我在大多数项目里都维护一个 notes.txt 记录想法和问题,希望能把它接进 vim,光标移到某一行时在右侧窗口打开结果。我试了“画一个 3D 立方体”,它似乎没内置 3D Java 库,但给了一堆 2D API;再试“绘制数学函数”,直接给出了三角函数和绘图函数。这大概能省掉我 80% 查文档的时间,尤其是在这么大的搜索空间里。
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
质疑质疑:机器生成的 API 并不取代人类,反而多出一套需要掌握和排查的系统
“结果表明我们的方法生成的 API 序列大体准确”——好吧,看来人类还是需要的。最好情况下,AI 会接管那些被认为有趣的工作(算法、思考),而人类最终去做杂活:测试 bug、清洗数据、整理格式、向其他人解释等等。现实点说,这只是让人类多掌握一个 API:原本的 API,加上一个 99% 准确的机器 API,还得知道两者之间的差距和 bug 在哪。
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.
补充补充资料:提供在线 demo 链接,但已被访问量挤爆
这是 demo 的直链[1],看起来它已经被流量冲垮了(hug of death)。[1] http://bda-codehow.cloudapp.net:88/
kilotaras查看英文原文
Here's a direct link to demo[1]. Looks like it received a hug of death. [1] http://bda-codehow.cloudapp.net:88/
调侃:开发者正在亲手造出取代自己的 AI
你也许会痛恨科技行业肆意毁掉别人的工作,但要知道,我们也在努力打造一个同样会毁掉我们自己工作的下一代 AI。
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.
相关资源
从这篇论文所有 HN 讨论帖的全部评论里整理出来的链接。
- 评论区提到的论文
历次讨论
- 2016Hacker News 讨论帖188 分 · 35 评
同领域还值得读
Google 的软件工程(2017)
Software Engineering at Google (2017)
介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…
编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选Peter Naur:编程作为理论构建 (1985)
Peter Naur – Programming as Theory Building (1985)
Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…
编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选SciPy 1.0:Python 科学计算的基础算法
SciPy 1.0: fundamental algorithms for scientific computing in Python
这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…
编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选Lisp 的历史(1979)
History of Lisp (1979)
这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…
编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选使用 NumPy 进行数组编程
Array Programming with NumPy
这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。
编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选