Background:
There are a few threads on SO about how to choose names for variables and functions. It dawned up on me that there might be a use for a site where you could go and ask random people what name a particular function should have. You describe the behavior, and they come up with a name. The benefit of this, you get multiple pers...
Which conventions for naming variables and functions do you favor in R code?
As far as I can tell, there are several different conventions, all of which coexist in cacophonous harmony:
1. Use of period separator, e.g.
stock.prices <- c(12.01, 10.12)
col.names <- c('symbol','price')
Pros: Has historical precedence in the R...
I'm currently working on a site which went through god knows how many developers' hands. One of the things I don't like about it is the way every table in the database has the prefix "tbl_" and every field "fld_".
I've started work on a new feature and I'm faced with the following problem: should my new tables continue with the old conv...
eclipse supports naming conventions for fields, parameters and local variables. For each variable type it is possible to configure a list of prefix or suffix or both. eclipse respects this configuration when generating methods or getters/setters.
is there a similar configuration option in netbeans? is there another way to achieve the sam...
The convention is that you use your company's domain. That is quite simple but what if it is something like www.mycompany.co.uk.
Now this wouldn't be a problem if it were www.mycompany.com. That is fairly simple com.mycompany.Class
What are we meant to do with the first?
uk.co.mycompany.Class OR co.uk.mycompany.Class? Or something els...
I usually name by classes in the Business project as Manager.cs, like BaseManager.cs, CommentsManager.cs, ProfileManager.cs, etc...
How do you name your classes in the DataAccess project? Do you call it CommentsDA, CommentsDB, or what?
Just curious...BTW, I'm using .NET C#.
...
The code in question is the code contained within the 2nd foreach loop, the purpose of which is to prevent exact duplicate latitude and longitudes.
foreach($aUsers as $k => $v)
{
// generate address
$aAddress = array();
if(!empty($v['city_location']))
$aAddress[] = $v['city_loc...
Microsoft is pretty clear that .NET "identifiers" or "parameters" should not contain abbreviations. Straight from the horse's mouth:
To avoid confusion and guarantee cross-language interoperation, follow these rules regarding the use of abbreviations:
Do not use abbreviations or contractions as parts of identifier names. For ...
As a non-lisper coming to clojure how should I best understand the naming convention where vars get a name like *var-name*?
This appears to be a lisp convention indicating a global variable. But in clojure such vars appear in namespaces as far as I can tell.
I would really appreciate a brief explanation of what I should expect when an...
Introduction
Hello folks, I recently learned to program in C! (This was a huge step for me, since C++ was the first language, I had contact with and scared me off for nearly 10 years.) Coming from a mostly OO background (Java + C#), this was a very nice paradigm shift.
I love C. It's such a beautiful language. What surprised me the mos...
According to this stack overflow answer, the "_t" postfix on type names is reserved in C. When using typedef to create a new opaque type, I'm used to having some sort of indication in the name that this is a type. Normally I would go with something like hashmap_t but now I need something else.
Is there any standard naming scheme for typ...
I am writing a library, so, I want its functions to be named as clearly and cleverly as possible. Currently, I use the following principles:
Self-explanatory names: a
function getName() will tell the
developer what it returns as well as
setAddress(), isMale(), etc.
Short: a function name must be as
short as possible so that it's
simple...
What is the proper naming convention in C# for the following user related properties?
Social Security Number: SSN or Ssn?
Date of birth: DOB or Dob?
...
Just curious what people would name the file that contains the generic interface IRepository<T>.
IRepositoryT.cs?
Update
One minor point to add. Normally, when you change the name of a class file, Visual Studio asks if you want to do a rename on the class as well. In the case of IRepository<T>, no matter what I name the file (IReposit...
I have been working at a few different companies now and every one has different rules about how to name classes and packages. They each have different package layouts and workflow between classes. Through these experiences I have picked up an understanding of how to layout out a project; however, I would like a more concrete definition ...
I want to use the correct term to make my API as intuitive as possible, so when a parameter is expected to be a full path and filename (ex "C:\Users\Max\Documents\MyDocument.txt") what is the correct term?
filename - that would just be MyDocument.txt, right?
path - that would just be C:\Users\Max\Documents, right?
What should I use ...
Possible Duplicate:
Giving a property the same name as its class
In working on a solution where I was struggling to "add" properties to a sealed class, someone pointed out that my naming of a property with the same name as a type was asking for trouble.
Here's a snippet of my code:
class BackupFileInfo : IEquatable<BackupFileI...
Hi,
I've always wondered what are the pros and the cons of these ID naming styles in SQL:
CREATE TABLE cache (
id INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
CREATE TABLE cache (
cid INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
CREATE TABLE cache (
cache_id INT AUTO_INCREMENT,
PRIMARY KEY(id)
);
Why some developers use "id" in each table, som...
When I'm programming, I often find myself writing functions that -should- (to be proper english) contain apostrophes (too bad C started everyone thinking that an apostrophe was an appropriate delimiter). For example: get_user's_group() -> get_users_group() . What do you guys do with that forced-bad-english ambiguous english? Just igno...
Hello,
In java we have a wonderful tool name CheckStyle that reinforce all our corporate naming convention. Wonderful tool. I would like to do the same with our XSD and WSDL.
Is there any tools that I could use to reinforce and make sure all coder/analyst will respect convention like:
all Operation must start with getXX of setXX o...