Questions tagged [naming]

A general purpose tag to cover anything concerning naming, be it files, programming constructs, data etc.

A general purpose tag to cover anything concerning naming, be it files, programming constructs, data etc.

1723 questions
0
votes
2 answers

shared/exclusive lock where the shared work should only be done once?

I have a problem where I have a kind of shared/exclusive situation except that what the shared part needn't really be shared: I'll try to explain. The exclusive part is easy: if the exclusive lock is held, noone else is allowed to progress until the…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337
0
votes
2 answers

Good practice on R variable naming: Division operator in variable names

In R, I want to name a variable something equivalent to AUC/D, as the variable is defined as the ratio between AUC and D. I obviously want to, if possible, to avoid / and %. What would be a short, legal and easy to read division-operator to use in…
Soren Havelund Welling
  • 1,823
  • 1
  • 16
  • 23
0
votes
3 answers

JSON Structure Types Naming Conventions

I'm seeing JSON presented in a couple of different formats/styles, and I'm wondering if there are any standard names for these different formats/styles. My searches haven't turned up any info - I'd appreciate anything anyone could share. Format…
Jeff Levine
  • 2,083
  • 9
  • 30
  • 38
0
votes
1 answer

How widespread are Actionscript3 naming conventions?

In 90% of the example projects I see for ActionScript / Flex I notice the following two coding conventions: 1) private member variables with getters/setters start with an underscore as in "_credentials" and 2) interfaces start with the letter "I"…
Dave
  • 21,524
  • 28
  • 141
  • 221
0
votes
1 answer

Get() and Dataframes with R

This might be a dumb question, but I can't seem to find a solution. I have the following lines of code name1 <- paste("pred.return.Tr", trainInt, ".Te", testInt, sep = "") assign(name1, as.data.frame(matrix(, dim(dfVar[1])-NullR, 3, TRUE))) So now…
0
votes
1 answer

how to test a angular service which named as 'sample.Svc' in my modules using mocha+chai

My service file service.js angular.module('services', []) .service('sample.Svc', ['$window', 'modalSvc', function($window, modalSvc){ this.showDialog = function(message, title){ console.log(" in here"); if(title){ …
Hemakumar
  • 639
  • 9
  • 24
0
votes
3 answers

Should an array name and index be used for naming JavaScript objects?

I was surprised that this works in JavaScript. My questions is, is this good practice? var contact = []; contact[0] = {}; contact[0].name = "Peter Parker"; console.log(contact[0].name);
Jason210
  • 2,990
  • 2
  • 17
  • 18
0
votes
2 answers

What is the counterpart of a "consumer" called?

By "consumer," I mean a class/system that calls or uses another through its interface or API. What's the name for the other class/system, the one that gets called? In a network context, a consumer is called a "client" and its counterpart is a…
gesgsklw
  • 741
  • 1
  • 7
  • 13
0
votes
0 answers

Giving an ios app a long title(name) - auto break

I would like to know how do I name my iOS app in such a way that it will auto break when its long. This is how I would like the name to be displayed..for android it auto breaks, but not such with iOS version: This is the problem I have regarding…
0
votes
1 answer

Intermitent Naming Conflict

I call for collective wisdom on this one. I am having the following extremely weird bug. I have a model named File.php. I have used it in several places in my app. But now it doesn't seem to work. In this case, it works in my Template.php: …
0
votes
1 answer

Is it bad naming convention to have a model named "model"?

Specifically in Ruby on Rails. I have a model and controller dedicated to 3D models and unfortunately "model" was the best name I could come up with. I'm not sure if this is a subjective question so forgive me if it is.
0
votes
1 answer

Renaming or setting object names dynamically in JavaScript

I'm fairly new to JavaScript I setup below to use keys and values for different items I need to work. All the values will be the same using a variable to distinguish each item (which will just be it, but I would like to identify each item…
Andrew L.
  • 260
  • 2
  • 14
0
votes
3 answers

Why does Java allow the name of the class to be same as that of a class it imports?

I have the following code : class Exception { public static void main(String args[]) { int x = 10; int y = 0; int result; try{ result = x / y; } catch(ArithmeticException e){ …
kauray
  • 739
  • 2
  • 12
  • 28
0
votes
3 answers

Is it acceptable to have types with the same name, in different namespaces?

I see 7 types all called Error within the same codebase. Is this acceptable? My instinct says that having types with the same name in different domain contexts is OK, but it makes ambiguities increasingly likely when dealing with the "mother…
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
0
votes
4 answers

How do you call a string that matches /^\w+$/?

Strings that match /^\w+$/ are quite common. For example many authentication systems use that pattern to validate usernames. I'm wondering if a term exists that identifies this kind of strings. I've been thinking of the term "alphanumeric" but is a…
Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201