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

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.

主站蜘蛛池模板: 永定县| 汝南县| 三江| 闵行区| 安宁市| 定西市| 会昌县| 嫩江县| 赫章县| 富锦市| 新蔡县| 龙里县| 抚宁县| 乌恰县| 昂仁县| 晋州市| 大洼县| 北辰区| 达拉特旗| 乡宁县| 榆中县| 荣成市| 娱乐| 建昌县| 日土县| 新蔡县| 沙河市| 南康市| 新河县| 文安县| 上犹县| 章丘市| 淮北市| 扎兰屯市| 清镇市| 乾安县| 安溪县| 寻乌县| 温州市| 武义县| 长宁区|