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

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.

主站蜘蛛池模板: 嘉黎县| 望江县| 平塘县| 华阴市| 河池市| 安宁市| 东港市| 灌阳县| 全南县| 丹凤县| 绍兴县| 浮山县| 连州市| 尉犁县| 台安县| 政和县| 桓仁| 株洲县| 富民县| 咸阳市| 安阳县| 皋兰县| 安多县| 曲水县| 盐源县| 林芝县| 衡南县| 东方市| 潜江市| 大名县| 库尔勒市| 彰化县| 安乡县| 双城市| 江城| 句容市| 如东县| 寿阳县| 泾阳县| 招远市| 嘉荫县|