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
21
votes
4 answers

Is there a .NET function to validate a class name?

I am using CodeDom to generate dynamic code based on user values. One of those values controls what the name of the class I'm generating is. I know I could sterilize the name based on language rules about valid class names using regular expressions,…
Zach
  • 2,145
  • 3
  • 17
  • 32
21
votes
2 answers

Android activity naming

I'm running into more and more naming clashes between Android activities and other classes. I was wondering if you could tell me how you avoid these. Sadly, my particular naming problems are not covered in the related questions on SO. First…
futlib
  • 8,258
  • 13
  • 40
  • 55
20
votes
1 answer

What special characters are allowed in T-SQL column name?

I would like to know what special characters are allowed to be used in column name in T-SQL, MSSQL. So I know I can use letters and numbers, but are the other characters that are available without using brackets [] to refer to this column?
Tom Smykowski
  • 25,487
  • 54
  • 159
  • 236
20
votes
5 answers

LINQ: Why is it called "Comprehension Syntax"

Why is the following LINQ syntax (sometimes called "query" syntax) called "comprehension" syntax? What's being comprehended (surely that's wrong)? Or, what is comprehensively represented (maybe I'm on the right track, now)?
lance
  • 16,092
  • 19
  • 77
  • 136
20
votes
9 answers

How many bits is a WORD and is that constant over different architectures?

Is a machine WORD always the same or does it depend on the machine architecture? And is the meaning of the word WORD context sensitive or generally applicable?
prinzdezibel
  • 11,029
  • 17
  • 55
  • 62
20
votes
7 answers

Does a method name starting with "Does" look good?

Is it a good practice to start a method name with "Does" (in C#)? It looks a little bit weird to me, so I would like to get your opinion. I am writing a method which check if an account exists or not, should the signature be "bool…
Martin
  • 39,309
  • 62
  • 192
  • 278
20
votes
4 answers

Is the XML declaration node mandatory?

I had a discussion with a colleague of mine about the XML declaration node (I'm talking about this => ). I believe that for something to be called "valid XML", it requires a XML declaration node. My colleague…
ereOn
  • 53,676
  • 39
  • 161
  • 238
20
votes
12 answers

Will bad things happen to me if I name my arrays, collections, lists, enumerables, etc. just the plural of what they contain?

I have always thought it was "best practice" to be explicit in naming my collection variables. So, if I had a collection of Car objects, I would typically name a Car[] carArray and a List carList. And then 99% of the time, I end up just doing…
devuxer
  • 41,681
  • 47
  • 180
  • 292
19
votes
2 answers

Naming Generic DataContracts in WCF

I am using a Generic Class as a Response Data Contract. All is good and this is streamlining the design of my WCF service significantly. Each request is given a standard response object with the following signature: Status (Enum) Message…
Andrew Harry
  • 13,773
  • 18
  • 67
  • 102
19
votes
1 answer

What are the most restrictive aws resource name limitations (e.g. characters and length)?

Different resources in aws, such as S3 buckets, lambdas and roles, have different maximum lengths and different character sets which they accept. Is there a very restrictive resource name, which, if you follow it, you will also be obeying the…
Jordan Morris
  • 2,101
  • 2
  • 24
  • 41
19
votes
1 answer

Why "rv" in Flask testing tutorial?

I am reading Flask's tutorial about testing. There's such code there: rv = self.app.get('/') assert 'No entries here so far' in rv.data My question is: why is there a variable called rv? What does this abbreviation mean? I've been looking for it in…
m4tx
  • 4,139
  • 5
  • 37
  • 61
18
votes
1 answer

Elvis operator etymology

According to Wikipedia, the binary operator ?: is colloquially referred to as the Elvis operator due to its resemblance to an emoticon. My question is: Does the name have anything to do with Elvis Presley? How exactly does it resemble Elvis?
ebvtrnog
  • 4,167
  • 4
  • 31
  • 59
18
votes
3 answers

What are Best Practices for Maven Modules Naming?

Assuming that we have a project named project and modules module1 and module2, earlier I tend to use the following naming strategy: -- project -- projectModule1 -- projectModule2 Now I use another: -- project -- project-module1 --…
Maksim Sorokin
  • 2,334
  • 3
  • 34
  • 61
18
votes
1 answer

Why people don't use uppercase in the name of header files in C++?

I was wondering why people don't use uppercase in name of header files. I see many header files with name only in lowercase. But I thought it would be more easy to read if they write them with uppercase, say "BaseClass.h", "SubClass.h", instead of…
zj_yyzr
  • 383
  • 1
  • 2
  • 10
18
votes
3 answers

naming BEM sub blocks

I'm using a BEM approach to writing html + css. With this syntax: Blocks: block_name Elements: block_name__element_name Modifiers: block_name__element_name--modifier I get confused when I have a block within another block. For instance, in a…
jeremyhoover
  • 183
  • 1
  • 1
  • 6