加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 如何读取代码没有任何斗争

发布时间:2020-12-16 03:01:06 所属栏目:百科 来源:网络整理
导读:我是专业发展的新人.我的意思是我只有5个月的专业发展经验.在此之前,我已经自己或在大学学习了.所以我正在查询问题,在这里找到一个关于代码质量的问题.我自己也有一个问题.如何增加我的代码理解/阅读能力?还会提高我将编写的代码质量吗?有比匈牙利语更好的
我是专业发展的新人.我的意思是我只有5个月的专业发展经验.在此之前,我已经自己或在大学学习了.所以我正在查询问题,在这里找到一个关于代码质量的问题.我自己也有一个问题.如何增加我的代码理解/阅读能力?还会提高我将编写的代码质量吗?有比匈牙利语更好的代码符号吗?有没有什么真正好书的C设计模式(或语言不重要?)?
谢谢你提前回答这些问题,并帮助我改进:)

附: – 我也忘了告诉你,我正在开发C和C#语言.

解决方法

我找到的唯一方法是更好地阅读其他人的代码,这是阅读其他人的代码,当你发现一种方法或语言结构,你不明白看起来玩,直到你明白了什么上.

匈牙利的符号是可怕的,很少有人今天使用它,这更是程序员中的一个笑话.

事实上,匈牙利语表示法是一个笑话,本身就是:

“The term Hungarian notation is
memorable for many people because the
strings of unpronounceable consonants
vaguely resemble the consonant-rich
orthography of some Eastern European
languages.”

从How To Write Unmaintainable Code

“Hungarian Notation is the tactical
nuclear weapon of source code
obfuscation techniques; use it! Due to
the sheer volume of source code
contaminated by this idiom nothing can
kill a maintenance engineer faster
than a well planned Hungarian Notation
attack.”

而有史以来流行的线条在这件事上有几句话要说.

“Encoding the type of a function into
the name (so-called Hungarian
notation) is brain damaged—the
compiler knows the types anyway and
can check those,and it only confuses
the programmer.”

– 07001

编辑:

来自Tobias Langner的评论.

“因为匈牙利语匈牙利语和匈牙利语系统之间的区别见Joel on Software”.

Joel on Software有关于如何读取其他人的代码为Reading Code is Like Reading the Talmud的提示.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读