In my project currently we are using All caps as naming convention for constants. I would like to change it and I'm OK with Pascal Casing but my team lead has a strong argument that it will not visibly distinguish constant from Properties and other Types.
Please help me with any other suggestions.
RESULT
As @Paolo Tedesco and most of t...
For example, I might have an partial something like:
<div>
<%= f.label :some_field %><br/>
<%= f.text_field :some_field %>
</div>
which works for edit AND new actions. I also will have one like:
<div>
<%=h some_field %>
</div>
for the show action. So you would think that all your partials go under one directory like shared or...
As stated in the framework design guidelines and the WWW in general, the current guideline is to name your constants like this
LastTemplateIndex
as opposed to
LAST_TEMPLATE_INDEX
With the PascalCasing approach, how do you differentiate between a Property and a Constant.
ErrorCodes.ServerDown is fine. But what about private constants wi...
Hi!
I would like to ask some kind of permission (I hope that doesn't sound strange) from the people who have influence on the naming conventions in modern languages like F#, Scala, etc.
My problem is - I just can't read camelCased code and wish I could write underscored_names at least in my internal implementations (not in API interfac...
So I know the convention for naming M-M relationship tables in SQL is to have something like so:
For tables User and Data the relationship table would be called
UserData
User_Data
or something similar (from here)
What happens then if you need to have multiple relationships between User and Data, representing each in its own t...
Hi, here's the quick version of the situation:
We are developing some C# App and the team decided this Naming convention:
We have for example an entity called User which is stored in the DB, we have the old master/slave pages to manage the User catallog. We are using a sort of MVC pattern, so for the master we have this controller call...
How do you name different classes / interfaces you create?
Sometimes I don't have implementation information to add to the implementation name - like interface FileHandler and class SqlFileHandler.
hen this happens I usually name the interface in the "normal" name, like Truck and name the actual class TruckClass.
How do you name inter...
Hi,
I'm pretty new to Python, and I want to develop my first serious open source project. I want to ask what is the common coding style for python projects. I'll put also what I'm doing right now.
1.- What is the most widely used column width? (the eternal question)
I'm currently sticking to 80 columns (and it's a pain!)
2.- What quot...
I'm developing a CMS that required i18n support. The translation strings are stored as an array in a language file (ie, en.php). Are there any naming conventions for this..
How can I improve on the sample language file below...
// General
'general.title' => 'CMS - USA / English',
'general.save' => 'Save',
'general.choose_category' ...
I'm building a ASP.Net MVC site, which has some small islands of non MVC code. Is this best called ASP.Net Classic, or Legacy ASP.Net?
Is there some better name two distinguish the two?
...
In light of this question I thought it'd be really neat to have a similar question about C#/.Net.
So, what is the most awkward or misleading method name of the .Net and/or C# API?
...
In my search I found mostly arguments for whether to use plurality in database naming conventions, and ways to handle it in either case. I have decided I prefer plural table names, so I don't want to argue that.
I need to represent an animal's species and genus and so on in a database. The plural and singular form for 'species' are the ...
What is a widely accepted naming convention for .NET/C#/WPF projects?
...
If you have a namespace that contains a property in ClassA and a class that has the name of that Property somewhere else in your project and both are in the same namespace this won't cause conflicts will it?
So lets say I have a class named Car
namespace Dealer
{
class Vehicle
{
// the main class that defines vehicle, so ...
I'm trying to put together a really simple module with one .py source file in it, and have already run into a roadblock. I was going to call it scons-config but import scons-config doesn't work in Python. I found this SO question and looked at PEP8 style guide but am kind of bewildered, it doesn't talk about two-word-name conventions.
W...
Possible Duplicates:
Using Base in a Class Name
C# Class naming convention: Is it BaseClass or ClassBase or AbstractClass
Naming Conventions for Abstract Classes
What is the better way to name base abstract classes? I still can't decide where to put 'Base' word. Should it be 'BaseMyClass' or 'MyClassBase'?
How do you name...
This is a language-agnostic question - unless you count English as a language.
I've got this list of items which can have very long names.
For aesthetic purposes, these names must be made shorter in some cases, adding dots (...) to indicate that the name is longer. So for example, if article.name returns this:
lorem ipsum dolor sit am...
The title says it all. I've recently inherited an application that is written by different people at different times and looking for guidance on how to standardize.
...
It seems to me that it is rendundant information as the usage of the class will make it apparent that it is an exception. Furthermore, in PHP, the class must extend the Exception class so it will be apparent that it is an exception when looking at the class on its own.
Despite this, developers usually apply the suffix 'Exception'. Why i...
I run into this frequently enough that I thought I'd see what others had to say about it.
Using the StyleCop conventions, I find that I often have a property name that is hard to make different than the class name it is accessing. For example:
public class ProjectManager
{
// Stuff here
}
public class OtherClass
{
private Pro...