9
голосов
7ответов
4355 просмотров

Best practices for naming user controls?

I've created quite a few user controls to encapsulate GUI functionality used in multiple places in my app. I've noticed I usually have a tendency to describe the function of the control and tack "Control" on the end of the name, but not always. I'd like to standardize the naming and wanted to kno...

1
голосов
3ответов
439 просмотров

Linq2sql naming convention

I have just started using Linq2sql, it generates all of the Classes after my tables which is awesome. my problem is that i have a lot of objects that have the same name as my tables. this is forcing my to fully namespace everything which i don’t really like as i think it makes my code look messy...

0
голосов
1ответов
112 просмотров

Column name "descriptor" -> 'MyDAL.CompanyTable.Descriptor' hides inherited member

I wanted to take advantage of SubSonic's default behavior to find the first non-key string column to use as the object description. Usually I just name that column description and then [bracket] it in t/sql. This time I decided to name the column "Descriptor". That leads to this warning: W...

6
голосов
4ответов
536 просмотров

Saxon Genitive in Naming Conventions?

What do you call your functions when names that contain a saxon genitive like "Verify Task's Priority" and "Change Argument's Priority" or "Increase Action's Delay"? Do you drop the apostrophe? verifyTasksPriority(), changeArgumentsPriority(), increaseActionsDelay() Do you drop both the apostro...

4
голосов
6ответов
179 просмотров

How to deal with changing feature and product names in source code?

What is a good strategy for dealing with changing product and feature names in source code. Here's the situation I find myself in over and over again (most of you can relate?)... Product name starts off as "DaBomb" Major features are "Exploder", "Lantern" and "Flag". Time passes, and the Featu...

5
голосов
2ответов
1097 просмотров

How do I configure NHibernate (or Fluent NHib) to add a table name prefix to all table names?

In the current application I'm developing I'm using Fluent NHibernate to configure NHibernate for use as an ORM. I want to be able to add a prefix to all the table names used in the application, so that if I use a database that is already servicing another application, there are no naming confli...

1
голосов
2ответов
449 просмотров

How should you implement Serialization? (interface/convention wise)

I implement an xml serialization based on Marc's answer. Should this be part of the class itself, ie Apple.Serialize/Deserialize? Although Deserialize would be static in that case, as you might not have an instance to call it on. Or should I have another class for Serialize/Deserialize? If so,...

2
голосов
7ответов
424 просмотров

C# formatting Conventions

In a book I been reading they use a capital letter for public methods and properties. I know there are some other conventions like you put "_" in front of private variables. For me I don't like that way and like this way better but just wondering about stuff in the method. So public void MyMet...

1
голосов
3ответов
108 просмотров

Help with naming my admin related controllers

I can't come up with a nice name for my admin related controllers. I have a UserController that is used for the site (non-admin related actions). Now I created an ADMIN section that has the following url format: www.example.com/admin/{controller}/{action}/{id} My controller folder is layed ou...

1
голосов
3ответов
2243 просмотров

Excel-VBA: Variable Names, Hungarian Notation and Variable Naming Best Practices

When I program in Excel-VBA I use Hungarian notation. Worksheet variables start with ws, workbook variables start wb, etc. When I use integers, I always use longs, because in the past I have exceeded the maximum value of an integer, and it takes a while to find the bug - it is easier to just mak...

2
голосов
2ответов
694 просмотров

NHibernate Naming Conventions - Eliminate Keyword Conflicts

How do I escape keyword conflicts when NHibernate generates my column names using FluentNHibernate? NHibernate generated this for me and "Key" is a conflict. create table Setting ( Key NVARCHAR(MAX) not null, Value NVARCHAR(MAX) null, primary key (Key) )

1
голосов
4ответов
153 просмотров

Is it a bad idea to add a period to a .Net solution file?

If I was using a "Partitioned Single Solution" strategy to build my .Net projects and solutions, could anyone comment on, or share any experiences about why it would be a bad idea to include dot notation in my solution names as such...     master.sln     master.sub.sln ...also let me know if yo...

4
голосов
3ответов
2911 просмотров

Guide to Win32 API Data Type Naming Conventions

I'm new to programming with the Win32 API, and I'm still getting used to the prefix / suffix data type naming conventions. While Google and a little common sense will normally explain what the prefix is referring to, it would be nice if there was one (relatively) concise guide to explain them. ...

3
голосов
8ответов
695 просмотров

Naming guidelines with C#

I have this class: class DoSomething { private int timesDone; ... } Which is the right way to named variable 'timesDone'? Sometimes I see named as m_timesDone. Is this correct? Where I can find information about naming guidelines? Thank you!

93
голосов
2ответов
18185 просмотров

Naming Conventions For Partial Class Files

I'm generating the bulk of my ASP.NET MVC scaffolding code. All generated files are partial classes which use standard naming conventions. For example, my employee controller file is named EmployeeController.cs. If I wish to extend the EmployeeController with custom, non-generated logic, I creat...

2
голосов
3ответов
775 просмотров

What are all the most common method/variable/class names that you use?

Most common method/variable/class names that you use often and that explain you intent clearly and precisely.Is there any pattern you follow to figure that out.

0
голосов
3ответов
224 просмотров

Which word do you use to describe a JSON-like object?

I have a naming issue. If I read an object x from some JSON I can call my variable xJson (or some variation). However sometimes it is possible that the data could have come from a number of different sources amongst which JSON is not special (e.g. XMLRPC, programmatically constructed from Maps,L...

1
голосов
5ответов
270 просмотров

How to define a good convention for css?

I am now in charge of refactoring HTML and CSS for the site of my company. As I have seen the current CSS code, it is following naming convention for IDs and Classes (camel Notation). But, last week I did the demo to everyone in the office; then one guy expressed an idea about using underscore or...

13
голосов
3ответов
8443 просмотров

Naming conventions for Rails migrations

Is there a best practice naming convention for Rails migrations, particularly when editing a model? e.g. if I'm adding a column bar to the Foo model, should I name it edit_foo or add_bar_to_foo I'm assuming if I'm editing mutliple models then I should create multiple migrations, but what if I'm...

22
голосов
10ответов
7958 просмотров

Is there an official name for the many-to-many relationship table in a database schema?

Most of the projects I've worked on have required many-to-many relationships in the database schema. For example, you might have the concept of Users and Groups, and the database might contain a table User, a table Group, and a table UserGroup to relate the two. I'm interested in the conceptual...

1
голосов
1ответов
65 просмотров

Naming of Lifecycle Functions

Does anyone have suggests for life-cycle names. Lifecyle functions are those that control the creation and termination of software engineering constructs. Examples: new / delete init / finish create / destroy connect / disconnect constructor / destructor Consider in the following scenario...

1
голосов
4ответов
748 просмотров

Naming an event: describe what just happened or describe what is about to happen? And why?

Note: I'm not talking about the names of event handlers. I'm talking about the names of the events themselves. I tend to name events such that they describe what happened just before the event was raised. Adjectives tend to dominate this convention (CLICKED, SAVED, CHANGED, LOADED, etc). Some...

13
голосов
6ответов
4108 просмотров

What variable name do you use for file descriptors?

A pretty silly trivial question. The canonical example is f = open('filename'), but f is not very descriptive. After not looking at code in a while, you can forget whether it means "file" or "function f(x)" or "fourier transform results" or something else. EIBTI. In Python, file is already t...

244
голосов
11ответов
68694 просмотров

Should a "static final Logger" be declared in UPPER-CASE?

In Java, static final variables are constants and the convention is that they should be in upper-case. However, I have seen that most people declare loggers in lower-case which comes up as a violation in PMD. e.g: private static final Logger logger = Logger.getLogger(MyClass.class); Just sea...

274
голосов
9ответов
144200 просмотров

Enum Naming Convention - Plural

I'm asking this question despite having read similar but not exactly what I want at C# naming convention for enum and matching property I found I have a tendency to name enums in plural and then 'use' them as singular, example: public enum EntityTypes { Type1, Type2 } public class SomeClass ...

14
голосов
1ответов
4105 просмотров

Are there CSS class naming standards for web applications?

There is quite a bit of information on the intertubes going over some fundamental css naming conventions. However, most of these conventions are from designer's point of view. I'm going after conventions from a web application developer's point of view. As a web application grows, and UJS (uno...

5
голосов
2ответов
1221 просмотров

Making good column names R

I read a table from Microsoft Access using RODBC. Some of the variables had a name with a space in it. R has no problem with it but I do. I cannot find out how to specify the space names(alltime) [1] "ID" "LVL7" "Ref Pv No" "Ref Pv Name" "DOS" "Pt Last Name"...

2
голосов
6ответов
420 просмотров

Opinions on using My as a class name prefix

Personally, I've never liked the MyObject naming of classes. I would guess that the status quo would agree but I'd like to see the other side of the argument and if there's any validity to it.

3
голосов
5ответов
1187 просмотров

configuration filename convention

Is there a general naming conventions for configuration files for a simple python program? Thanks, Udi

17
голосов
3ответов
15665 просмотров

What does the postfix "_t" stand for in C?

Possible Duplicate: What does a type followed by _t (underscore-t) represent? While typing in my IDE (Xcode), autocomplete pops up already-defined words when I'm partway thru entering some variable name. I occasionally see names that have '_t' at the end of them. What naming conventio...