官术网_书友最值得收藏!

Naming the program elements

Meaningful and descriptive element naming can greatly improve the source code's readability. It allows easy comprehension of the logical flow of the program. It is amazing how software developers still give names to program elements that are too short or not descriptive enough, such as giving a variable a letter name or using acronyms for variable naming. 

Generic or elusive names for elements lead to ambiguity. For example, having a method name as Extract() or Calculate() at first glance results in subjective interpretations. The same is applicable to using vague names for variables. For example:

int x2;

string xxya;

While program element naming in itself is an art, names are to be selected to define the purposes as well as succinctly describe the elements and ensure that the chosen names comply with the standards and rules of the programming language being used.

More information on acceptable naming guidelines and conventions is available at: https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines.

主站蜘蛛池模板: 丰台区| 武邑县| 江永县| 海口市| 辛集市| 伊吾县| 房产| 吉隆县| 威远县| 连云港市| 上犹县| 博客| 兴义市| 荆门市| 辽阳县| 措美县| 龙海市| 咸阳市| 七台河市| 北京市| 荥阳市| 桃园县| 蕉岭县| 渝北区| 如东县| 漾濞| 上高县| 麟游县| 大庆市| 开平市| 宜川县| 呼和浩特市| 胶南市| 雷波县| 鄯善县| 肃南| 马边| 天峻县| 宝应县| 新闻| 奈曼旗|