naming-conventions

What are Clojure's Naming Conventions?

Deadly 提交于 2019-12-18 11:40:25
问题 Can anyone explain or point me to where I can find clojure's naming conventions for: File names Functions (From what I understand, function names are simply dash separated values) Variables 回答1: You might want to look at the Clojure library coding standards on the developer Wiki - this is probably the most comprehensive list that I've seen. To your specific points: File names are lowercase, and stored in a directory structure to match the namespace, and end in .clj e.g. "my/special/namespace

What does .dist used as an extension of some source code file mean?

為{幸葍}努か 提交于 2019-12-18 10:53:59
问题 Examples in the Zend tutorial: phpunit.xml.dist local.php.dist TestConfig.php.dist 回答1: .dist files are often configuration files which do not contain the real-world deploy-specific parameters (e.g. Database Passwords, etc.), and are there to help you get started with the application/framework faster. So, to get started with such frameworks, you should remove the .dist extension, and customize your configuration file with your personal parameters. One purpose I have seen in using .dist

What is a better name than Manager, Processor etc? [closed]

☆樱花仙子☆ 提交于 2019-12-18 10:53:27
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I am reading the book Clean Code http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 The author mentions that you should avoid words like Manager, Processor, Data or Info in the name of the class. I have used these everywhere. What are some better

Acronyms in Camel Back

佐手、 提交于 2019-12-18 10:39:22
问题 I often see Java class names like XmlReader instead of XMLReader My gut feeling is to completely upper case acronyms, but apparently many people think differently. Or maybe it's just because a lot of code generators are having trouble with acronyms... So i would like to hear the the public opinion. How do you capitalize your class names containing acronyms? 回答1: We use the camel case convention like Java and .NET do. Not for reasons of code generators, but for readability. Consider the case

Why is Java “String” type written in capital letter while “int” is not?

穿精又带淫゛_ 提交于 2019-12-18 10:34:30
问题 I am curious. Why do I have to type String myStr with a capital letter whereas I type int aNumba with a lower-case letter? 回答1: Because int is a primitive type, not a class, thus it is not directly comparable to String . The corresponding class type is Integer, spelled according to the class naming conventions. Similar pairs of primitive and class types are byte vs Byte short vs Short long vs Long float vs Float double vs Double boolean vs Boolean char vs Character 回答2: String itself is a

What naming convention do you use for the service layer in a Spring MVC application? [closed]

依然范特西╮ 提交于 2019-12-18 10:13:46
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm stuck with figuring out a good naming convention for the service layer in a spring application. For each class in the service

What is a proper naming convention for MySQL FKs?

百般思念 提交于 2019-12-18 09:57:25
问题 Being that they must be unique, what should I name FK's in a MySQL DB? 回答1: In MySQL, there is no need to give a symbolic name to foreign key constraints. If a name is not given, InnoDB creates a unique name automatically. In any case, this is the convention that I use: fk_[referencing table name]_[referenced table name]_[referencing field name] Example: CREATE TABLE users( user_id int, name varchar(100) ); CREATE TABLE messages( message_id int, user_id int ); ALTER TABLE messages ADD

What names do you find yourself prepending/appending to classes regularly? [closed]

柔情痞子 提交于 2019-12-18 09:54:31
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Which nouns do you find yourself putting regularly at the end of your classes? For example, I have a habit of sticking Info onto

Is the method naming for property getters/setters standardized in IL?

纵饮孤独 提交于 2019-12-18 05:48:25
问题 I have the following two methods that I am wondering if they are appropriate: public bool IsGetter(MethodInfo method) { return method.IsSpecialName && method.Name.StartsWith("get_", StringComparison.Ordinal); } public bool IsSetter(MethodInfo method) { return method.IsSpecialName && method.Name.StartsWith("set_", StringComparison.Ordinal); } While this code works, I'm hoping to avoid the portion that checks the StartsWith and programmatically get the naming convention. Basically, are there

What is the naming convention for Powershell functions with regard to upper/lower case usage?

依然范特西╮ 提交于 2019-12-18 05:43:50
问题 While I did find a lot of information on how to name Cmdlets and functions in the Cmdlet Development Guidelines I did not find any information on whether functions should be named in upper or in lower case . What is the convention here? (I do understand that Cmdlets themselves are generally named in upper case, even though they are not case-sensitive when it comes to executing.) 回答1: Naming convention can be tricky. While a fixed naming convention may provide aesthetics or simplified usage,