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 (unobtrusive javascript) is used throughout th...
I'm asking this question despite having read similar but not exactly what I want at http://stackoverflow.com/questions/495051/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 {...
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 search googleor SO for "static final logger" ...
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 taken by a function.
What else do you use...
What naming convention should I follow for class members? Right now, I’m prefixing all fields with an underscore, and using the regular name for the accessor method, e.g.: int _age and int age() { return _age; }
Any preferred approaches?
...
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 competent peers have recently exposed me ...
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:
myObjectPtr = myObjectCreate();
myObje...
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 name of the UserGroup table in that examp...
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 making multiple modifications to a single...
We are running a database system which is basically working as a pipeline flow architecture, i.e. we have lot of incoming data, process this using a variety of in-house knowledge data, and then we produce output data.
Right now everything is intermingled, which makes it difficult to know what is autogenerated and what is not etc. We ar...
Here's the scenario.
A long while back, the Powers That Be decided that a particular module should be called Widget Authorizations. As such, a whole lot of stuff was named after that:
Database tables - AuthorizationTypes, AuthorizationFlows, etc.
Database columns - Authorization_Id, Authorized_User, etc.
Classes - AuthorizationBroker,...
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 dash between the names that contain more ...
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,Lists & primitives ... etc).
In this situ...
Hey,
how do you name your groovy scripts? Does it depends on the enviroment? Do you name groovy classes diffent to groovy scripts?
Example:
convert_csv_to_xml.groovy
ConvertCSVtoXML.groovy
...
What do you think?
...
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 create a second partial class file named Employ...
Hello!
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!
...
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. Does anyone know of a resource like this?
...
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 you think it's a good idea? Please note that...
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 out like:
/controllers/
/controllers/admin/...
Hi
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 MyMethod()
{
}
public string MyProperty {g...