naming-conventions

What's the convention for using an asterisk at the end of a function name in Clojure and other Lisp dialects?

拜拜、爱过 提交于 2019-12-20 09:15:11
问题 Note that I'm not talking about ear muffs in symbol names, an issue that is discussed at Conventions, Style, and Usage for Clojure Constants? and How is the `*var-name*` naming-convention used in clojure?. I'm talking strictly about instances where there is some function named foo that then calls a function foo*. 回答1: In Clojure it basically means "foo* is like foo, but somehow different, and you probably want foo". In other words, it means that the author of that code couldn't come up with a

What should I name my PHP class file? [closed]

假如想象 提交于 2019-12-20 08:56:27
问题 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 have seen many different naming schemes and extensions used for PHP files that are basically just classes. Some examples: myClass

.NET naming convention for “ID” (anything identification: Capitalization)

佐手、 提交于 2019-12-20 08:53:32
问题 I am in the process of unifying these inconsistent naming conventions and this one problem has been a bit driving me crazy lately. In the code base I am working with has no convention regarding "ID"; "ID", "Id" and even "iD" are used inconsistently. ****Question**: In .NET, how do you guys capitalize "ID"? For an example, nodeID, nodeId? FolderID or FolderId? ****Edit**: How about plural cases? then should I do "NodeIDs" or "NodeIds"? Thanks 回答1: Capitalization is for 2 letters acronyms . UI,

determining which verb to use for method names in Java

会有一股神秘感。 提交于 2019-12-20 08:48:06
问题 I understand that naming conventions are important for a number of reasons, most having to do with making your code more readable and easier to integrate into larger projects, etc. In Java, most conventions require that method names be in lowerCamelCase begin with a verb. My question is: how do I choose the verb to begin the method name? To make this question less vague, I'm often in the situation where my first choice for a method name is a noun describing the output. In these cases, I'm

How to name factory like methods?

风流意气都作罢 提交于 2019-12-20 08:22:02
问题 I guess that most factory-like methods start with create . But why are they called "create"? Why not "make", "produce", "build", "generate" or something else? Is it only a matter of taste? A convention? Or is there a special meaning in "create"? createURI(...) makeURI(...) produceURI(...) buildURI(...) generateURI(...) Which one would you choose in general and why? 回答1: Some random thoughts: 'Create' fits the feature better than most other words. The next best word I can think of off the top

How to name Dockerfiles

自作多情 提交于 2019-12-20 08:15:11
问题 I'm unsure of how to name Dockerfiles. Many on GitHub use Dockerfile without a file extension. Do I give them a name and extension; if so what? Or do I just call them Dockerfile ? 回答1: Don't change the name of the dockerfile if you want to use the autobuilder at hub.docker.com. Don't use an extension for docker files, leave it null. The filename should just be: (no extension at all) Dockerfile however, you can do like below too... dev.Dockerfile , uat.Dockerfile , prod.Dockerfile etc. On VS

How to lower case objects in Oracle database?

强颜欢笑 提交于 2019-12-20 07:58:20
问题 Is there any way to name my Tables,Columns in the Oracle DB in lower case letters? I search a lot and some recommendations say i should use double quotes in the creation like this : CREATE TABLE "test" (a number); The problem here is : It forces me to decorate all my tables with double quotes through querying ! If i write : SELECT * FROM test ; I will get syntax error. I want to name all my tables , fields as lower case because i will use this in my model through ORM (Entity Framework) which

Is there a naming convention for git repositories?

北城余情 提交于 2019-12-20 07:56:54
问题 For example, I have a RESTful service called Purchase Service. Should I name my repository: purchaserestservice purchase-rest-service purchase_rest_service or something else? What's the convention? How about in Github? Should public repositories follow some standard? 回答1: I'd go for purchase-rest-service . Reasons: What is "pur chase rests ervice"? Long, concatenated words are hard to understand. I know, I'm German.

Java naming conventions

試著忘記壹切 提交于 2019-12-20 04:08:35
问题 My full variable name is Unique Code, however I want this variable to be "ucode"-ish. So what would be correct concidering Java naming conventions? ucode uCode UCode 回答1: See the coding conventions. For variables, camel case is recommended. Re. the naming, I would have thought uniqueCode would be the most logical choice (I'm aware that wasn't in your list of choices). Any uCode variant looks like an abbreviation of unicode to me, and I would regard it as misleading. The above isn't an

Why do Cocoa-Touch class ivars have leading underscore character?

痞子三分冷 提交于 2019-12-20 02:54:47
问题 Is there some purpose for this convention? 回答1: Apple likes to use underscores to mean "private", according to the Coding Guidelines for Cocoa: Avoid the use of the underscore character as a prefix meaning private, especially in methods. Apple reserves the use of this convention. Use by third parties could result in name-space collisions; they might unwittingly override an existing private method with one of their own, with disastrous consequences. Method names beginning with underscores are