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

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.

主站蜘蛛池模板: 琼海市| 佛冈县| 阿拉尔市| 平武县| 栖霞市| 三台县| 桂阳县| 长海县| 体育| 平昌县| 舞阳县| 西藏| 天祝| 秭归县| 大悟县| 安国市| 北京市| 攀枝花市| 勃利县| 枞阳县| 屏东县| 南溪县| 洞口县| 余江县| 寻甸| 江油市| 太仆寺旗| 富阳市| 永修县| 大洼县| 黄平县| 银川市| 苍南县| 遵义县| 寿光市| 永新县| 柘荣县| 泾川县| 济宁市| 微山县| 淄博市|