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

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.

主站蜘蛛池模板: 大同市| 东莞市| 凤山市| 罗定市| 柳河县| 禄劝| 清镇市| 横峰县| 西林县| 五河县| 西乌| 南陵县| 敦煌市| 盐城市| 观塘区| 湘乡市| 和龙市| 雷波县| 阿克| 古交市| 邳州市| 大渡口区| 宁晋县| 德保县| 惠来县| 电白县| 海原县| 昌吉市| 和硕县| 互助| 南投县| 辽中县| 东港市| 凌海市| 叶城县| 仁化县| 新安县| 合肥市| 兖州市| 集安市| 板桥市|