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
1464
votes
12 answers

Naming Classes - How to avoid calling everything a "Manager"?

A long time ago I have read an article (I believe a blog entry) which put me on the "right" track on naming objects: Be very very scrupulous about naming things in your program. For example if my application was (as a typical business app) handling…
froh42
  • 5,190
  • 6
  • 30
  • 42
622
votes
4 answers

What does the @ symbol before a variable name mean in C#?

I understand that the @ symbol can be used before a string literal to change how the compiler parses the string. But what does it mean when a variable name is prefixed with the @ symbol?
Greg
  • 10,360
  • 6
  • 44
  • 67
450
votes
6 answers

What is the difference between a shim and a polyfill?

Both seem to be used in web development circles, see e.g. HTML5 Cross Browser Polyfills, which says: So here we're collecting all the shims, fallbacks, and polyfills... Or, there's the es5-shim project. In my current project we're using a number…
Domenic
  • 110,262
  • 41
  • 219
  • 271
347
votes
5 answers

Which characters are illegal within a branch name?

Which characters are illegal within a branch name?
lunohodov
  • 5,179
  • 2
  • 25
  • 17
336
votes
9 answers

What's the use/meaning of the @ character in variable names in C#?

I discovered that you can start your variable name with a '@' character in C#. In my C# project I was using a web service (I added a web reference to my project) that was written in Java. One of the interface objects defined in the WSDL had a…
Remko Jansen
  • 4,649
  • 4
  • 30
  • 39
308
votes
6 answers

.c vs .cc vs. .cpp vs .hpp vs .h vs .cxx

Possible Duplicates: *.h or *.hpp for your class definitions Correct C++ code file extension? .cc vs .cpp I used to think that it used to be that: .h files are header files for C and C++, and usually only contain declarations. .c files are C…
user541686
  • 205,094
  • 128
  • 528
  • 886
259
votes
2 answers

What is the etymology of 'slug' in a URL?

Is "URL slug" a completely arbitrary word? Or does it stand for something? I used the word in a conversation with someone and when they asked me why it's called that I realized I didn't know. I know what it means of course. The Stack Overflow tag…
Matthew
  • 15,282
  • 27
  • 88
  • 123
245
votes
7 answers

Android - Package Name convention

For the "Hello World" example in android.com, the package name is "package com.example.helloandroid;" Is there any guideline/standard to name this package? (references would be nice)
Charles Yeung
  • 38,347
  • 30
  • 90
  • 130
192
votes
7 answers

Is it ok to use dashes in Python files when trying to import them?

Basically when I have a python file like: python-code.py and use: import (python-code) the interpreter gives me syntax error. Any ideas on how to fix it? Are dashes illegal in python file names?
Joan Venge
  • 315,713
  • 212
  • 479
  • 689
170
votes
7 answers

Does the use of the "Async" suffix in a method name depend on whether the 'async' modifier is used?

What is the convention for suffixing method names with "Async"? Should the "Async" suffix be appended only to a method that is declared with the async modifier? public async Task ConnectAsync() Or is it enough that the method just returns…
kasperhj
  • 10,052
  • 21
  • 63
  • 106
147
votes
33 answers

What is the opposite of 'parse'?

I have a function, parseQuery, that parses a SQL query into an abstract representation of that query. I'm about to write a function that takes an abstract representation of a query and returns a SQL query string. What should I call the second…
Simon
  • 25,468
  • 44
  • 152
  • 266
130
votes
6 answers

What are the different kinds of cases?

I'm interested in the different kinds of identifier cases, and what people call them. Do you know of any additions to this list, or other alternative names? myIdentifier : Camel case (e.g. in java variable names) MyIdentifier : Capital camel case…
Austin Cory Bart
  • 2,159
  • 2
  • 19
  • 32
105
votes
1 answer

Python "private" function coding convention

When writing a python module and functions in it, I have some "public" functions that are supposed to be exposed to outsiders, but some other "private" functions that are only supposed to be seen and used locally and internally. I understand in…
Kaifei
  • 1,568
  • 2
  • 13
  • 16
103
votes
6 answers

What's the best approach to naming classes?

Coming up with good, precise names for classes is notoriously difficult. Done right, it makes code more self-documenting and provides a vocabulary for reasoning about code at a higher level of abstraction. Classes which implement a particular…
Henry
  • 1,459
  • 2
  • 11
  • 17
94
votes
6 answers

What is SUT and where did it come from?

I see many people talking about the term SUT, but do not understand why they use that term. SUT is what you want to test? Where does this term come from and what does it mean? For example in this test, what is my SUT? [TestMethod] public void…
Acaz Souza
  • 8,311
  • 11
  • 54
  • 97
1
2 3
99 100