naming-conventions

Style and coding practice for a very weakly typed language

I am using a proprietary language called VGL which really does not type variables at all. For Example I could Declare variables as such: DECLARE thisvariable, thatvariable, anothervariable all three of the above variables can be used in any different way I choose, string, integer, character, float, Boolean etc... The product in it's n...

Are classes in Python in different files?

Much like Java (or php), I'm use to seperating the classes to files. Is it the same deal in Python? plus, how should I name the file? Lowercase like classname.py or the same like ClassName.py? Do I need to do something special if I want to create an object from this class or does the fact that it's in the same "project" (netbeans) mak...

Do vs. Run vs. Execute vs. Perform verbs

What list of verbs are you using for method names? What's your personal or team standard? I debate whether to use Do vs. Run vs. Execute vs. Perform and am wondering if any of these are no longer recommended or some that people just don't really use and I should just scratch them. Basically any one of those verbs mean the same thing.....

How do I name a variable with acronym?

For example in Java for Data Transfer Object I use as: ExampleDTO exampleDTO = new ExampleDTO(); So, if I am following PEP 8 (lower_case_with_underscores), what naming convention should I use for similar in Python? ...

What do you name the "other" kind of view-model in an MVVM project?

With MVVM, I think of a view-model as a class that provides all the data and commands that a view needs to bind to. But what happens when I have a database entity object, say a Customer, and I want to build a class that shapes or flattens the Customer class for use in a data grid. For example, maybe this special Customer object would ha...

How do you refer to the currently logged user in your code?

In other words - what would be a good name for a variable that references the currently logged user? I've come up with a few: logged_user visitor me I'm not convinced either of them is good enough though. ...

PostgreSQL naming conventions

Hi, is anywhere a detailed manual about PostgreSQL naming conventions? (table names vs. camel case, sequences-primary key-constraits etc.) thanx! ...

Best naming for a property?

Which of the following three options would you choose for a property name in C#, and why? YearToDateWages YTDWages YtdWages ...

Best naming for a column in a SQL Server table

Which of the following three options would you choose for a column name in a SQL Server table, and why? YearToDateWages YTDWages YtdWages Follow up: SSN Ssn SocialSecurityNumber ...

Maven: Unofficial artifact naming scheme?

I'm creating some Maven artifacts for various dependencies for our projects, and while I'm taking my best guess at group / artifact IDs, I'd like to add something to flag them as "unofficial" and created by us for compilation, so that should we find official sources for the same thing in the future there's no confusion and we can simply ...

Flex AS3: Is smaller varialble name is faster then longer names?

We are in process of optimization of Flex AS3 Application. One of my team member suggested us to make varible name length smaller to optimize the application performence. i.e. var IsRegionSelected:Boolean = false; //Slower var IsRS:Boolean = false; //faster Is it True? Please provide your views... ...

int i vs int index etc. Which one is better?

Possible Duplicates: Is a variable named i unacceptable? What is an ideal variable naming convention for loop variables? Coming from a C background I've always used int i for generic loop variables. Of course in big nested loops or other complex things I may use a descriptive name but which one had you rather see? int i; f...

Why are some constants prefixed with "k" in the Cocoa framework?

Possible Duplicates: What does the k prefix indicate in Apples APIs? Lower case k in Cocoa Why are some constants prefixed with "k" in the Cocoa framework? ...

What's SQL table name for table between 'Users' and 'UserTypes' ?

i have two tables in my database : Users : contain user information UserTypes : contain the names of user types ( student , teacher , specialist ) - I can't rename it to 'Types' as we have a table with this name relation between Users and UserTypes many to many .. so i'll create a table that have UserID(FK) with UserTypeID(FK) but I...

Generic type parameter naming convention for Java (with multiple chars)?

In some interfaces i wrote I'd like to name generic type parameter with more than one character to make the code more readable. Something like.... Map<Key,Value> Instead of this... Map<K,V> But when it comes to methods, the type-parameters look like java-classes which is also confusing. public void put(Key key, Value value) Thi...

What is your favorite convention for organizing a ASP.NET project?

Hello world. My team is starting a brand new ASP.NET solution which will probably become large. Inspired by ASP.NET MVC, we currently express all data access objects in a model project. We, however, do not have good conventions for organizing ASP.NET ascx's and aspx's. We have already reviewed DotNetNuke and want to avoid the com...

Where did the name `atoi` come from?

Ok I've been curious about this for a while. In the C language where did they come up with the name atoi for converting a string to an integer? The only thing I can think of is Array To Integer for an acronym but that doesn't really make sense. ...

What to name an array of flags?

I have a project where lots of the objects hold state by maintaining simple boolean flags. There are lots of these, so I maintain them within a uint32_t and use bit masking. There are now so many flags to keep track of, I've created an abstraction for them (just a class wrapping the uint32_t) with set(), clear(), etc. My question: Wha...

CSS Brace Styles

I'm unable to figure how the standard (or just popular) brace style names apply to CSS. Here're all the brace styles: /* one - pico? */ selector { property: value; property: value; } /* two - pico extra */ selector { property: value; /* Start Properties on Newline */ property: value; } /* three - horstmann? */ sel...

Intercept generation of event handlers in Visual Studio

I'm making a small Visual Studio addin that changes the default generated event handler names in VS from something like txtName_Click to something user defined. I've already done this for the WinForms and WebForms designer using IEventBindingService, but I want to do this in the C# code editor as well. When you type something like "txtNa...