naming-conventions

How do I name an interface when the base word starts with an I?

I want to create an interface for "Items". Typicaly I would name an interface by adding and "I" prefix to a base word. But in this case my base word already starts with an I. Here are a couple ideas I've had IItem: Two I's Iitem : Vary the case ItemInterface: Skip the I prefix and write out Interface What looks the best? Has anyone e...

Function Names for sending and receiving RPCs?

I'm using twisted. I have my protocols set up so that, to send an RPC, I do protocol.send("update_status", data). To document which RPCs I've implemented, I make a separate function call for each one, so in this case I'd call REQUEST_UPDATE_STATUS(data) to send that RPC. When a protocol receives an RPC, a function gets called based on it...

The list of common GUI elements.

I need a glossary with graphical examples of elements accompanied by their (I hope) standardized names. Is there some centralized resource or every framework/platform out there has it's own naming conventions? ...

Use of the suffix “Type” when naming domain objects

I sometimes see domain objects or enums named with a suffix of "Type", such as 'ItemType' or 'PermissionType'. The word is so general and non-specific, I wonder if it is being used more often that it should be. Are class names like these often produced due to a lack of effort to come up with a more meaningful signifier, or is "Type...

How to name sql table and its category in sql server?

I have table called Services and I want to make another table that have the Categories of services ( One-to-Many ) What's the best approach i can use to naming it is it one of the following ? ServiceCategoreis ServicesCategoreis Serviecs_Categories CategoriesOfServices ...

Is naming variables after their type a bad practice?

I'm programming C++ using the underscore naming style (as opposed to camel case) which is also used by the STL and boost. However, since both types and variables/functions are named all lower case, a member variable declaration as follows will lead to compiler errors (or at least trouble): position position; A member variable named po...

File naming conventions

Hi, Please help me for the naming of the class file that defines the property of each value (Entity class). Example: for a dataset file we will use the name like this: dsxxx. But i don't know what will for entity class Please help me for that. thanks in advance. ...

When using a form designer, should labels be named?

In IDEs like QtCreator or with Visual C#'s form designer, I'd like to hear whether labels "should" be named or just left with the default naming scheme from the form designer. If the object is not going to be touched in code and only serves as non-changing textual information, does the object need to be part of some naming scheme? If I h...

C# Numeric Data Type Naming

Looking at the C# numeric data types, I noticed that most of the types have a signed and unsigned version. I noticed that whereas the "default" integer, short and long are signed, and have their unsigned counterpart as uint, ushort and ulong; the "default" byte is instead unsigned - and have a signed counterpart in sbyte. Just out of cu...

IsEnabled or Enabled?

Throughout Silverlight and WPF properties that are boolean values are prefixed with Is (almost all), for example: IsEnabled IsTabStop IsHitTestVisible In all other Microsoft frameworks (winforms, BCL, ASP.NET) Is is not used. What prompted their team to move away from the original naming convention - is it an evolution or a mis...

Naming convention for database change scripts?

I plan on using a "base script" for my initial database version 1.0.0 but after that I will require change scripts which "upgrade" the database to newer versions. I'm not sure how to name these scripts in my repository. I was envisioning something along the lines of: Baseline-6.0.0.sql Patch-6.0.1.sql Patch-6.0.2.sql Patch-6.1.0.sql ...

How to dynamically give customized text/naming conventions to dynamically generated labels/checkboxes?

I am trying to give names to my dynamically generated checkboxes through a for loop an algorithm. Coming up with the algorithm was pretty simple but I am unable to give them name/checkbox text. The best I could come up with was a similar checkbox text for everything that was generated. Is there a way to name them? Below is the code I ca...

What's a good alternative, general name to the HibernateUtil class?

Hi, I have a HibernateUtil class which is the standard by the book (Hibernate in action) class. It gets a session, flushes and closes it. begins,commits and rollbacks transactions and build the sessionFactory. Currently, by mistake, this is called HibernateSessionFactory in our package. I want to refactor it to a more appropriate name bu...

Module name redefines built-in

I'm making a game in Python, and it makes sense to have one of my modules named 'map'. My preferred way of importing is to do this: from mygame import map As pylint is telling me, however, this is redefining a built-in. What's the common way of dealing with this? Here are the choices I can come up with: 1) Ignore the pylint warnin...

Project naming for C# version

I am translating a C++ project to C#. Say the original C++ project name is called Company.Project.SubProject. What is a good name for C# version? Please advise, thanks. EDIT: Since if both C++ and C# projects are all called Company.Project.SubProject, it would be a bit confusing to distinguish them in TFS or so. ...

Trailing underscores for member variables in C++

I've seen people use a trailing underscore for member variables in classes, for instance in the renowned C++ FAQ Lite. I think that it's purpose is not to mark variables as members, that's what "m_" is for. It's actual purpose is to make it possible to have an accessor method named like the field, like this: class Foo { public: bar...

What's the significance of TLD-first domain-like identifiers?

"TLD-first domain-like identifiers" is a mouthful but that's all I can come up with. I've seen these used in various places over the years and wondered what the history/reason behind this convention is, since you might be forgiven in thinking that there is one true way to mention a domain. I don't use Java but I recall from poking arou...

Is there something like Lint or Perl::Critic for shell scripts?

Are there any shell (specifically bash or ksh) checkers that test shell scripts for style, best practices, naming conventions, etc? (Something like Lint for C, or Perl::Critic for Perl.) I know with ksh you can do syntax checking by running ksh -n script.ksh but I was hoping for something more than just sytax checking - something that ...

Do you use tense when naming methods of boolean return type?

So, when you are writing a boolean method, do you use tense, like "has" or "was", in your return method naming, or do you solely use "is"? The following is a Java method I recently wrote, very simply .. boolean recovered = false; public boolean wasRecovered() { return recovered; } In this case, recovered is a state that may or ...

What is the convention for table and column names in HSQLDB when using grails?

If I have a FooBar entity with a fizzBuzz field, what will the resulting table and column names be in HSQL? Would they be FOO_BAR and FIZZ_BUZZ? Or FooBar and fizzBuzz? Or . . . ...