Questions tagged [naming-conventions]

Do not use this tag to ask what you should name something. Naming conventions refer to general rules governing names assigned to programming constructs such as variables and methods. These conventions facilitate readability, and thus improved maintainability of code by enforcing naming consistency across disparate modules.

Naming conventions refer to general rules governing names assigned to programming constructs such as variables and methods. These conventions facilitate readability, and thus improved maintainability of code by enforcing naming consistency across disparate modules.

Examples

4026 questions
3
votes
1 answer

Rest API bulk naming convention

Are there any known best practices for web service REST API bulk naming? Some suggestions for user resource : /api/users-bulk /api/bulk/users /api/users/bulk /api/users/_bulk
chupee120
  • 123
  • 1
  • 8
3
votes
1 answer

Gradle project naming conventions

Maven artifactId should have lowercase letters. Guide to naming conventions says: artifactId is the name of the jar without version. If you created it then you can choose whatever name you want with lowercase letters and no strange symbols. Has…
haba713
  • 2,465
  • 1
  • 24
  • 45
3
votes
1 answer

python3 module import/naming dilemma

I just finished a small all-python3 gpio module for use with Linux gpiolib. I've toyed with two different ways of naming and importing things in the client: 1 gpio.py class GPIOInput(object): ... class GPIOEvent(object): ... class…
Travis Griggs
  • 21,522
  • 19
  • 91
  • 167
3
votes
3 answers

Problem binding a bean property to an element in JSF

I have an input (JSF) that should be bound to a property in my bean. This property represents another bean and has an auxiliar method that checks if it's null (I use this method a lot). The problem is that the binding is failing to get the proper…
3
votes
4 answers

ruby / rails boolean method naming conventions

I have a short question on ruby / rails method naming conventions or good practice. Consider the following methods: # some methods performing some sort of 'action' def action; end def action!; end # some methods checking if performing 'action' is…
Dennis
  • 2,223
  • 3
  • 27
  • 36
3
votes
1 answer

Percentage stored as a fraction of 1: What is this called?

I have a column in a database table called CONDITION_PERCENT. It has values like: 1 0.1 0.01 Which are meant to represent: 100% 10% 1% I suspect that referring to these values as percentages might be incorrect. Calling them percentages…
User1974
  • 276
  • 1
  • 17
  • 63
3
votes
3 answers

Did Ruby deprecate the wrong File exists method?

The docs of File.exist? says: Return true if the named file exists. Note that last word used; "exists". This is correct. "File exist" without the ending s is not correct. The method File.exists? exists, but they deprecated this method. I am…
Martin Andersson
  • 18,072
  • 9
  • 87
  • 115
3
votes
2 answers

What is the meaning of the '^' prefix in TensorFlow GraphDef input names?

Some TensorFlow saved models contain a '^' in front of an input name. Do these names have a specific meaning? How are they different from regular inputs? For example: node { name: "init" op: "NoOp" input: "^Variable/Assign" input:…
3
votes
1 answer

What is the naming convention W3C uses for html attributes?

Looking at html, there is a bunch of built-in attributes on tags: I am trying to work out what HTML "on spec" attributes are named. Note: I am not looking for an opinion - I want to determine/breakdown exactly what the W3C opinion is. This is so I…
Ashley Coolman
  • 11,095
  • 5
  • 59
  • 81
3
votes
2 answers

Naming types and instances

I'm trying to clean up the code of a game I'm creating. From the beginning, I have put relevant functions inside a covering object. For example, the initialize function can be accessed at Init.initialize(). However, for this and other objects, I'd…
pimvdb
  • 151,816
  • 78
  • 307
  • 352
3
votes
4 answers

Starting a C# class name with a lower-case letter

I'd like some best-practice advice regarding naming a C# class that interacts with an iSeries web service. I'm thinking either iSeriesServiceProxy or ISeriesServiceProxy, but each have their (probably obvious) problems. The former violates "Class…
Richard
  • 43
  • 1
  • 5
3
votes
1 answer

Bem naming underscore, hyphen or camelcase in element names

I have an element call "user nav" Currently I have .header__user-nav With a modifier .header__user-nav--active Is it better to use single underscores for element names .header__user_nav--active or hyphens .header__user-nav--active or…
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
3
votes
2 answers

Are there any Objective-C / Cocoa naming conventions for properties that are acronyms?

I have an object that models an online resource. Therefore, my object has to store the URL of the resource it belongs to. How would I name the getter and setter? MyObject *myObject = [[MyObject alloc] init]; // Set values [myObject…
t6d
  • 2,595
  • 3
  • 26
  • 42
3
votes
3 answers

What is a correct naming convention for Java method returning collection of elements?

I have a class Person and a method returning Collection. Is there a naming convention for this in Java? Should I name it findPersons or rather findPeople? Which version is preferable when we have name with irregular plural name in English?
Piotr Pradzynski
  • 4,190
  • 5
  • 23
  • 43
3
votes
2 answers

Mapping properties of C# ASPNET WebApi objects to Angular 2,

I reprogrammed the Angular 2 heroes tutorial so that is runs within an ASP.NET webapplication with a Web API and communicates with that Web API instead of the in-memory web API. Everything works well. Only one question remains: In the service…