当前位置:网站首页>AI 从代码中自动生成注释文档
AI 从代码中自动生成注释文档
2022-07-06 17:36:00 【小盒子的技术分享】
程序员最讨厌的两件事:
自己写注释 别人不写注释
Mintlify 的插件终于可以把我们从痛苦的死循环中解救出来了。
Mintlify 利用 AI 技术从代码中自动生成注释文档
注意 it's free
但谁知道呢,也许过一阵子就像 github 的 Copilot 一样开始收费了也说不定。
来个Demo
比如我这段简单的二分查找 程序片段:
分别看下 Mintlify 为它生成的注释,注意:它可以生成多语言的,有英文的也有中文的
上面这些都是自动生成的,从结果看是基于程序进行的翻译,比较罗嗦,但还算准确。
应用
好啦,那剩下的事情就是把你写完的程序一键生成注释,然后一份带有良好(啰嗦)注释的代码就编写完成了,如果你的团队统计代码和注释行数(哪个团队这么SB,告诉我,避个坑),那么又愉快地完成了KPI。
开个玩笑 ,良好的代码注释,不但有利于别人阅读,更有利于维护,有时候时间长了,我们自己都不知道写的是什么玩意,我有时候看到一大段程序没有注释还写的特别绕的时候就开始骂娘了:“这TM写的什么玩意儿”,讽刺的是,有些时候,那程序是我自己写的。哈哈。
都说优秀的代码可以做到自解释,不用写注释也看得懂,对,那是优秀的代码,在你还不能写成那样的代码之前,写注释吧孩子,先保证你不会被团队的同学骂娘再说。
提示
如安装插件或使用过程中遇到网络问题,请通过科学上网自行解决。如这玩意(https://www.mintlify.com/)开始收费了,当我没说。
本文由 mdnice 多平台发布
边栏推荐
- 力扣1037. 有效的回旋镖
- go-zero微服务实战系列(九、极致优化秒杀性能)
- Telerik UI 2022 R2 SP1 Retail-Not Crack
- NEON优化:性能优化常见问题QA
- Oracle: Practice of CDB restricting PDB resources
- Taro2.* 小程序配置分享微信朋友圈
- In rails, when the resource creation operation fails and render: new is called, why must the URL be changed to the index URL of the resource?
- THREE.AxesHelper is not a constructor
- MySQL script batch queries all tables containing specified field types in the database
- C language - array
猜你喜欢

Part V: STM32 system timer and general timer programming

c语言—数组

资产安全问题或制约加密行业发展 风控+合规成为平台破局关键

Dynamic planning idea "from getting started to giving up"
![[batch dos-cmd command - summary and summary] - jump, cycle, condition commands (goto, errorlevel, if, for [read, segment, extract string]), CMD command error summary, CMD error](/img/a5/41d4cbc070d421093323dc189a05cf.png)
[batch dos-cmd command - summary and summary] - jump, cycle, condition commands (goto, errorlevel, if, for [read, segment, extract string]), CMD command error summary, CMD error

405 method not allowed appears when the third party jumps to the website

Send template message via wechat official account

boot - prometheus-push gateway 使用
![[batch dos-cmd command - summary and summary] - string search, search, and filter commands (find, findstr), and the difference and discrimination between find and findstr](/img/4a/0dcc28f76ce99982f930c21d0d76c3.png)
[batch dos-cmd command - summary and summary] - string search, search, and filter commands (find, findstr), and the difference and discrimination between find and findstr

云呐|工单管理软件,工单管理软件APP
随机推荐
THREE. AxesHelper is not a constructor
深度学习框架TF安装
Return to blowing marshland -- travel notes of zhailidong, founder of duanzhitang
Realize incremental data synchronization between MySQL and ES
JTAG debugging experience of arm bare board debugging
windows安装mysql8(5分钟)
JTAG principle of arm bare board debugging
Let's see through the network i/o model from beginning to end
实现mysql与ES的增量数据同步
Lldp compatible CDP function configuration
What are the differences between Oracle Linux and CentOS?
LLDP兼容CDP功能配置
「笔记」折半搜索(Meet in the Middle)
Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
Niuke cold training camp 6B (Freund has no green name level)
力扣1037. 有效的回旋镖
Byte P7 professional level explanation: common tools and test methods for interface testing, Freeman
taro3.*中使用 dva 入门级别的哦
ESP Arduino (IV) PWM waveform control output
Neon Optimization: an optimization case of log10 function




