你对你的代码评论? [英] Do you comment your code?

查看:154
本文介绍了你对你的代码评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常评论ifs,并写入人类语言的意思,如检查它是A还是B。

I usually comment "ifs" and write in "human language" what it means, like "checks if it's A or B".

初级程序员,读取代码读取它的意义首先,然后分析语句(也为我在检查旧代码时)

I find it's better for junior programmers that read the code to read what it means first and then analyse the statement (also for me when I'm checking old code)

你做什么?其他情况怎么办?优点?

What do you do? What about other scenarios? Pros? Cons?

推荐答案

Jeff有关于主题的真棒帖子。帖子中的链接和某些博客反应也值得一读。

Jeff has an awesome post about the subject. Links in the post and some of the blog reactions are also worth reading.

这篇关于你对你的代码评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆