encountered a method to determine whether the "payment account is the same as the beneficiary account", the result I see a name like this:Checkisorderingacccollaccsame (...)It's hard to understand, I'll change it right away:Isorderingaccountsameascollectionaccount (...)It's a bit long, but it's very easy to read, and it always happens to be less. 7. If you are designing a business system, it is best not to use technical terminology to name I have worked with the company has developed such a
Manual): The following naming conventions should be followed as far as possible during development with thinkphp:
class files are suffixed with . class.php (this refers to the class library file used internally by thinkphp, which does not represent the externally loaded clas
The first time to learn Java directly started a small project, so Java's basic skills are not very solid. However, code naming rules are often a big problem when it comes to engaging in larger projects. Reasonable rules of the naming rule, one appears to be forced on the grid, and a convenient check, see the name to know what type, use is correct, etc., and finally can be used for reference by others, impro
A framework written using PHP must have its own specifications, thinkphp and vice versa. Here are The naming conventions that should be followed as much as possible using thinkphp: class 2 files are suffixed with . class.php (This is the thinkphp A class library file used internally, which does not represent an exte
abbreviation for TXTThe object abbreviation is objCount abbreviation for CNTNumber is abbreviated to NUM, and so on.Leading suffix underlineA leading underscore: represents a non-public.One suffix underscore: avoid keyword collisions.Two leading underscores: used when naming a class property that causes a name conflict.Two leading and suffix underscores: "Magic" (with special-purpose diagrams) objects or a
method variablesAlthough many people argue that class member variables already start with M, it is customary for all variables to be defined in the form of a lowercase machine's underline link, such as: $game _repository, $table _config, $return _data.Incidentally, the better variable naming method:1. The member variable starts with m, such as: $mTable, $MURL2. The static variable starts with s, such as: $
first parameter of a class method.
If a function's parameter name conflicts with reserved keywords, it is usually better to use a suffix underline than to use abbreviations or strange spellings.
5) Constants:
The constant name is all letters capitalized, and each word is connected by an underscore, such as max_overflow,total.
6) exception
Because exceptions are also a class,
abbreviation is FNText abbreviation for TXTThe object abbreviation is objCount abbreviation for CNTNumber is abbreviated to NUM, and so on.Leading suffix underlineA leading underscore: represents a non-public.One suffix underscore: avoid keyword collisions.Two leading underscores: used when naming a class property that causes a name conflict.Two leading and suffix underscores: "Magic" (with special-purpose
This journal is a summary of a reading material. File: Https://class.stanford.edu/c4x/Engineering/CS-144/asset/Naming.pdf (also available from Baidu cloud disk Download: http://pan.baidu.com/s/1hqf6KIw). Summarized as follows:
The name should reflect the purpose of the code author.
This saves unnecessary annotations such as int t; Time since born in days can be changed to int dayssinceborn;) and make the code easier to read. easy to read and easy to discuss with each other, th
Program naming rulesTip: The module designer determines the module naming conventions for the software (such as classes, functions, variables, etc.) to ensure that the style of the module design document is consistent with the style of the code. You can extract or reference (if present) from the programming specifications of the organization.Naming rules1. Packag
Google-styleguid
naming
TipModule_name, Package_name, ClassName, Method_name, Exceptionname, Function_name, Global_var_name, Instance_var_name, Function_parameter_name, Local_var_name. names that should be avoided
1. Single character name, except for counters and iterators.
2. The hyphen (-) in the Package/module name (-)
3. A name that begins and ends with a double underline (python retention, for example, __init__)
1. Project NameAll lowercase, such as: test2. Package NameAll lowercase, such as: Com.tju.lirui.test2. Class nameCapitalize the first letter of each word, such as: HelloWorld3. Variable name1, static variables: All uppercase, the words with the underscore "_" separate, such as: Boolean_flag2, ordinary variables: First letter lowercase, the beginning of each word capitalized, such as: Wordtype4. Name of function1. In the function name, the first letter
example:function abbreviation is FNText abbreviation for TXTThe object abbreviation is objCount abbreviation for CNTNumber is abbreviated to NUM, and so on.Leading suffix underlineA leading underscore: represents a non-public.One suffix underscore: avoid keyword collisions.Two leading underscores: used when naming a class property that causes a name conflict.Two leading and suffix underscores: "Magic" (wit
abbreviation for TXTThe object abbreviation is objCount abbreviation for CNTNumber is abbreviated to NUM, and so on.Leading suffix underlineA leading underscore: represents a non-public.One suffix underscore: avoid keyword collisions.Two leading underscores: used when naming a class property that causes a name conflict.Two leading and suffix underscores: "Magic" (with special-purpose diagrams) objects or a
A framework written using PHP must have its own specifications, thinkphp and vice versa. Here are The naming conventions that should be followed as much as possible using thinkphp:
2 .class.php thinkphp internal use of the class library file, does not represent the externally loaded class library file), using
C # code writing rules:1. use the interface as much as possible, and then use the class to implement the interface to improve program flexibility. 2. Do not exceed 80 characters in one line3. Try not to manually change the computer-generated code4. Write comments on key statements5. Suggest that local variables are declared at the nearest place to use it6. Do not use Goto series statements unless you are using it when jumping out of a deep loop7. Avoi
C # code writing rules:1. use the interface as much as possible, and then use the class to implement the interface to improve program flexibility. 2. Do not exceed 80 characters in one line3. Try not to manually change the computer-generated code4. Write comments on key statements5. Suggest that local variables are declared at the nearest place to use it6. Do not use Goto series statements unless you are using it when jumping out of a deep loop7. Avoi
abbreviation is FNText abbreviation for TXTThe object abbreviation is objCount abbreviation for CNTNumber is abbreviated to NUM, and so on.Leading suffix underlineA leading underscore: represents a non-public.One suffix underscore: avoid keyword collisions.Two leading underscores: used when naming a class property that causes a name conflict.Two leading and suffix underscores: "Magic" (with special-purpose
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.