naming-conventions

Why is the hyphen conventional in symbol names in LISP?

*爱你&永不变心* 提交于 2019-12-09 10:20:09
问题 What's the reason of this recommendation? Why not keeping consistent with other programming languages which use underscore instead? 回答1: I think that LISP uses the hyphen for two reasons: "history" and "because you can". History LISP is an old language, and in the early days typing an underscore could be challenging. For example, the first terminal I used for LISP was an ASR-33 teletype. On some hosts and teletype models, the key sequence for the underscore character would be interpreted as a

Is there a naming convention for HTML form fields for good auto completion across all modern browsers?

帅比萌擦擦* 提交于 2019-12-09 09:05:25
问题 Is there a naming convention for form fields? For what fields do Chrome, IE, Firefox look for? I mean, one for all, or at least most of the modern browsers. I stumbled upon: http://wonderfullyflawed.com/2009/02/17/rails-forms-microformat http://acidmartin.wordpress.com/2008/10/28/using-ecml-11-to-make-website-forms-compatible-with-google-toobar-autofill-and-wand/ -> talking about http://www.ietf.org/rfc/rfc3106.txt Names of HTML form naming conventions Form field names used by personal data

Name of C/C++ stdlib naming convention?

倾然丶 夕夏残阳落幕 提交于 2019-12-09 07:34:54
问题 I wonder if the naming convention used in C/C++ standard libraries has a name, or at least a cheat-sheet where I can lookup the rules. E.g. push_back -- underscore used setstate -- but not used here! string::npos -- when to use abbreviations? fprintf ... Does the naming convention used in the C/C++ standard libraries have a specific name? 回答1: C/C++ uses the famous make-stuff-up-as-we-go-along naming convention. In general, the only consistent things you can say about the C/C++ standard

Simple rules for naming methods, compatible with ARC naming conventions

余生长醉 提交于 2019-12-09 07:20:00
问题 I have difficulties understanding naming conventions of ARC. I have always coded with ARC, and I guess this is the reason. 1. Class methods What name should I choose for the following method? What are the differences, concerning memory management, between theses two names? This name: + (MyObject *)newObjectFrom:(MyObject *)anObject withOptions:(NSDictionary*)options { MyObject * newObject = [anObject copy] ; [newObject modifyWith:options] ; return newObject ; } or this name ? + (MyObject *

Name convention on Java Swing components(prefix)

女生的网名这么多〃 提交于 2019-12-09 05:49:49
问题 An question that was brought to my mind when programming with Swing in Java was, is it a recommendation or an "official"/most used naming convention(prefix) on Swing components. Such as(even though other may prefer other naming conventions this is what I am currently using): txt for JTextField btn for JButton lbl for JLabel pnl for JPanel But then my list ends.. I think such prefixes enhance the readability in my code so, but I do not have any names for components such as JComboBox, JList,

ReSharper complains about uppercase “ID” in member “EntityID”

喜欢而已 提交于 2019-12-09 05:04:07
问题 I have a property "EntityID" in a class. Resharper (5.1) says Name 'EntityID' does not match rule 'Methods, properties and events'. Suggested name is 'EntityId'. But IMHO according to the naming conventions in the Design Guidelines for Class Library Developers. 'EntityID' should be perfectly fine: Do not use acronyms that are not generally accepted in the computing field. Where appropriate, use well-known acronyms to replace lengthy phrase names. For example, use UI for User Interface and

Java convention on reference to methods and variables

旧街凉风 提交于 2019-12-09 03:38:59
问题 Section 10.2 of Java conventions recommends using class names instead of objects to use static variables or methods, i.e. MyClass.variable1 or MyClass.methodName1() instead of MyClass Obj1 = new MyClass(); Obj1.variable1; Obj1.methodName1(); There is no explanation of the rationale behind this, although I suspect this has something to do with memory use. It would be great if someone could explain this. 回答1: I guess you mean "for static methods and variables". There is no difference regarding

Controller actions naming convention

点点圈 提交于 2019-12-08 17:20:49
问题 As naming convention says, WebApi controller actions name should be Get(), Put(). Post() etc. But tell me if I have a controller as CustomerController , now I want to have two actions inside of it. One is GetCustomerById(int id) and another one is GetCustomerByAge(int age) . Here both the actions accept one parameter as int. So, if I want to make the url user friendly like "api/customer/" also I want to follow the actions naming convention like only Get(int id)/Get(int age) , how will I do it

Should I use (otherwise optimal) class names that conflict with the .NET BCL's names?

白昼怎懂夜的黑 提交于 2019-12-08 16:54:06
问题 This situation probably is not entirely uncommon to some of you: you have some functionality to put in a class but the perfect name (*) for that class is taken by one of the classes in the System namespace or other namespace/class that's not yours but you're using / import ing. (*) By perfect I mean small, concise and clear names. For instance I have an Utils class that has a Diagnostics (mostly debug utils) class and a Drawing class. I could: have a DrawingUtils class and a DiagnosticsUtils

Java conventions for accessible data. (Public accessors & Getters/Naming)

↘锁芯ラ 提交于 2019-12-08 15:50:23
问题 Through the Java API you see numerous occurrences of conflicting naming and practices which are really confusing to me. For example: The String class has a private variable (Integer) by the name of count which keeps track of the size of the string, however this is returned by a getter by the name of length() . If you move over to any type of arrays, instead of having a getter method for length, they just pass the variable through with a public accessor, and it can be obtained through