At work, we are having 'arguments' about naming styles / conventions. Imagine having a service called UserSettingsService. This has 2 methods, one to get the user settings and one to save. Would you name the method to include what it does exactly, like .getUserSettings(), or just get()?

One argument is that the UserSettings part is implied in the service name. The other argument is that a full method name of getUserSettings() is unambiguos. Is there any 'correct' way to do this?

1 Answer 1


The usual convention is not to repeat the class name in the method

ie Customer.CustomerName == bad

In your case, UserSettingsService sounds like a repository, which only contains user settings. So I would have methods like:

UserSettingsRepository.GetById(string id)

etc etc

If you have more than one type of settings you might include the type:


Or you might have a 'resource':



Another method of resolving 'arguments' about naming conventions is to organize a Definitive Resolution in Naming Conventions Session. These session should take place in a pub. In order to propose or object to a naming standard you must first take a drink. Traditionally the oldest member of the team starts the meeting by proposing Hungarian Notation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.