您现在的位置是:热点 >>正文
看不懂代码?AI给你做翻译,说人话的那种
热点088062人已围观
简介...
本文经AI新媒体量子位(公众号ID:QbitAI)授权转载,转载请联系出处。
GitHub Copilot,最近又出了个新功能。
这一看不次,它不再是帮你写代码了,而是充当一个“翻译官”:
用“人话”告诉你,这段代码到底写了啥。
瞧,只需要选中一段代码,然后点一下旁边的“Ask C懂代opilot”,就会快速得到代码的“人话版”解释:
示例中的代码片段是这样的:
if len(l)=0:
return None
else:
max码?_int=l[0]
for i in l:
if i>max_int
max_int=i
return max_int
Copilot对此进行“AI翻译”后,输出的内容是:
定义一个函数max_int(),它将一个列表作为输入。设置一个变量max_int=l[0],它包含列表中的第一个元给你素。设置一个for循环,迭代列表中的每个元素。如果元素大于max_int,便让max_int等于I。返回max_int。
这便是GitH做翻ub Copilot的最新功能——Explain Code。
之前Copilot是基于人类的注释生成代码,现在好了,它也学会了反向输出。
网友译,们的反应也是可想而知了:
但在“新奇”之后,这件事也引发了不小的讨论。
AI给代码做注释,有必要吗?
不仅是Copilot,“AI给代说人码做注释”这事最近在Reddit也比较火。
有位贴主上传了他用AI技术,给代码做注释的demo。
不同于Copilot的Explain C话的ode,这个AI不会非常详尽地去描述每行代码运行的过程。
而是概括性地去讲“这段代码是干嘛的”。
以下面这个代码片段为例:
在AI“解那种读”过后,它就会告诉你:
这段代码是用来从GitHub的Repo中收集数据。
会返回一个数据的矩阵。
再如下面这个代码片段:
AI给出的注释是:
函看不数运行的是梯度下降算法。
而后它还会对函数中的变量依次做解释。
看似不错的效果,但依旧还是引来了网友们激烈的讨论。
“乐观派”网友认为:
辅助懂代写注释和写测试比写代码的帮助大更多,而犯错可能更少。
但有人质疑这种AI的能力:
如果我函数写的特别乱、变量这名字乱糟糟的,它还能好使码?吗?
也有人认为,诸如此类的AI“没有什么用处”:
更形象一点的比喻,这种AI起到的作用,可能就是“复读机”……
那么对于“AI给打码写AI注释”这件事,你觉得是否有用呢?
Tags:
相关文章
标签: 创世纪计划 特朗普 人工智能
热点云梦级11月25日云梦级消息,美国白宫于当地时间 11 月 24 日发布声明表示,总统特朗普签署了一项行政命令,启动一项旨在利用人工智能变革科学研究方式、加速科学发现的全新国家计划“创世纪计划”(Ge...
【热点】
阅读更多eBay携手ChatGPT开启智能电商新时代,购物体验将全面升级!
热点在刚刚结束的第三季度财报电话会议上,电商巨头 eBay 宣布与人工智能公司 ChatGPT 达成战略合作。此次合作的核心目标是构建一个 “统一智能体电商平台”,通过将自家开发的 AI 购物助手与 Ch...
【热点】
阅读更多谷歌 AI 编码应用 Opal 登陆全球15国:全民“零代码”开发时代开启!
热点谷歌公司今日宣布,其由人工智能驱动的零代码应用编码工具 Opal 已将其访问权限扩展至全球 15个 新的国家和地区。此举旨在将这款革命性的工具带给更广泛的全球创作者,让他们无需编写任何代码即可将创意转...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.lauben.com/de/?s=谷歌maps群发程序|软件【tg:seogoogle987】,bbV
- https://www.mdbg.net/chinese/dictionary?page=worddict&wdrst=0&wdqb=谷歌maps群发程序|软件【tg:seogoogle987】,QUa
- https://www.yidian51.com/taobao/谷歌maps群发程序|软件【tg:seogoogle987】,QSI
- https://jihoon471.cafe24.com/product/search.html?banner_action=&keyword=谷歌maps群发程序|软件【tg:seogoogle987】86c
- https://www.vivaraise.fr/catalogsearch/result/?q=谷歌maps群发程序|软件【tg:seogoogle987】,ycs
- https://www.roberthalf.com/us/en/jobs/all/谷歌maps群发程序|软件【tg:seogoogle987】TDQ
- https://www.reallywildbirdfood.co.uk/store/search?q=谷歌maps群发程序|软件【tg:seogoogle987】,ssU
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=谷歌maps群发程序|软件【tg:seogoogle987】,0BF
- https://www.mintos.org/?s=谷歌maps群发程序|软件【tg:seogoogle987】,50g
- https://www.klatreverden.no/search?q=谷歌maps群发程序|软件【tg:seogoogle987】,iTh
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌maps群发程序|软件【tg:seogoogle987】,cMZ
- https://www.kyuhoshi.com/?s=谷歌maps群发程序|软件【tg:seogoogle987】,qGp
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:谷歌maps群发程序|软件【tg:seogoogle987】,ZtG
- https://www.symatoys.com/search.html?ID=UyMD6aO58bPrJvQAB1I0N69KzJBZeNPC&keyword=谷歌maps群发程序|软件【tg:seogoogle987】,TX3
- https://www.laoairlines.com/?action=QUERY&s=谷歌maps群发程序|软件【tg:seogoogle987】,Iz4
- https://www.remit.co.jp/en/?s=谷歌maps群发程序|软件【tg:seogoogle987】,xCV
- https://www.nytimes.com/search?dropmab=true&query=谷歌maps群发程序|软件【tg:seogoogle987】,fcr
- https://www.lgnewsroom.com/search/谷歌maps群发程序|软件【tg:seogoogle987】,I5h
- https://www.kubb-tool.bfs.admin.ch/en/search?action=CHECK&q=谷歌maps群发程序|软件【tg:seogoogle987】,pIU
- https://www.skicheck.at/en/?action=CHECK&s=谷歌maps群发程序|软件【tg:seogoogle987】,Bsc
- https://www.roblox.com/discover/?cat=107&Keyword=谷歌maps群发程序|软件【tg:seogoogle987】,13a
- https://www.kingston.gov.uk/site-search/results/?q=谷歌maps群发程序|软件【tg:seogoogle987】,bui
- https://www.l-and-b.jp/?page=1&s=谷歌maps群发程序|软件【tg:seogoogle987】,oYg
- https://www.miamiopenmri.com/?action=CHECK&s=谷歌maps群发程序|软件【tg:seogoogle987】,poc
- https://hsmoa.com/search?query=谷歌maps群发程序|软件【tg:seogoogle987】sqy
- https://www.youm7.com/Home/Search?allwords=谷歌maps群发程序|软件【tg:seogoogle987】,7PJ
- https://www.tailoy.com.pe/catalogsearch/result/?q=谷歌maps群发程序|软件【tg:seogoogle987】,TSW
- https://www.losgatoschamber.com/list/search?action=SEARCH&q=谷歌maps群发程序|软件【tg:seogoogle987】,6wV
- https://www.selfsufficientish.com/main/?s=谷歌maps群发程序|软件【tg:seogoogle987】,DsR
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=谷歌maps群发程序|软件【tg:seogoogle987】,YJS
- https://www.jusoen.com/addreng.asp?p1=谷歌maps群发程序|软件【tg:seogoogle987】ldf
- https://www.wilsonart.com/catalogsearch/result/?action=CHECK&q=谷歌maps群发程序|软件【tg:seogoogle987】,5r6
- https://www.ons.gov.uk/search?q=谷歌maps群发程序|软件【tg:seogoogle987】,44j
- https://www.solerpalau.com/en-en/catalogsearch/result/?q=谷歌maps群发程序|软件【tg:seogoogle987】,7wk
- https://www.sbaad.no/search/谷歌maps群发程序|软件【tg:seogoogle987】,330
- https://www.pierreherme.com/catalogsearch/result/?q=谷歌maps群发程序|软件【tg:seogoogle987】,4ry
- https://www.lenovo.com/gb/en/search?action=SEARCH&text=谷歌maps群发程序|软件【tg:seogoogle987】,4vA
- https://www.seforall.org/search?keywords=谷歌maps群发程序|软件【tg:seogoogle987】,g4l
- https://www.welshmountainzoo.org/shop/index.php?routeproduct/search&tag=谷歌maps群发程序|软件【tg:seogoogle987】,XmO
- https://www.wheels24.gr/?action=CHECK&s=谷歌maps群发程序|软件【tg:seogoogle987】,0J4
- https://www.xbiao.com/search/index?tpf&wd=谷歌maps群发程序|软件【tg:seogoogle987】,dRd
- https://www.swecobelgium.be/?page=9&s=谷歌maps群发程序|软件【tg:seogoogle987】,JlG
- https://www.unclefossil.com/search/谷歌maps群发程序|软件【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.rotherham.gov.uk/site-search/results/?q=谷歌maps群发程序|软件【tg:seogoogle987】,j7m
- https://www.tullygroup.us/?ID=hbkq8jFjrQlVRrwzEmvoUJJAY4e1Lfo5&s=谷歌maps群发程序|软件【tg:seogoogle987】,niX
- https://www.southmeadows.co.uk/2019/07/?s=谷歌maps群发程序|软件【tg:seogoogle987】,Hb0
- https://www.whirlpool.com.hk/chinese/catalogsearch/result?cat=30&q=谷歌maps群发程序|软件【tg:seogoogle987】,gfM
- https://www.wellbees.com/index.php/catalogsearch/result/index/?q=谷歌maps群发程序|软件【tg:seogoogle987】,klj
- https://www.televes.com/es/catalogsearch/result/?q=谷歌maps群发程序|软件【tg:seogoogle987】,NNQ
- https://www.navylookout.com/?ID=nSBR6Ivdu6lZg1yr2SDs30Lo5sTs76yJ&s=谷歌maps群发程序|软件【tg:seogoogle987】,7iv