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

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.

主站蜘蛛池模板: 密山市| 资中县| 营山县| 亳州市| 渝中区| 阿拉善左旗| 金堂县| 离岛区| 双城市| 松江区| 宜兰市| 全州县| 射洪县| 南陵县| 漳平市| 静安区| 吉木萨尔县| 赣州市| 含山县| 长汀县| 漠河县| 东至县| 邹平县| 合山市| 宜城市| 泸水县| 丰台区| 马尔康县| 沈丘县| 灌云县| 昌吉市| 威远县| 阿克苏市| 无棣县| 洞头县| 龙川县| 南木林县| 鄢陵县| 拜泉县| 云浮市| 临沭县|