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

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.

主站蜘蛛池模板: 类乌齐县| 图木舒克市| 濮阳市| 林甸县| 华安县| 阿荣旗| 嘉义市| 于田县| 田阳县| 大庆市| 建水县| 文水县| 苍溪县| 库尔勒市| 延安市| 喀喇沁旗| 曲水县| 梁山县| 甘谷县| 闵行区| 金昌市| 晋州市| 邵阳县| 新乐市| 读书| 鲁山县| 曲麻莱县| 正镶白旗| 奉节县| 延川县| 比如县| 武宣县| 蒙自县| 咸丰县| 正阳县| 河南省| 灯塔市| 广灵县| 东辽县| 华阴市| 钦州市|