views:

148

answers:

1

On episode #162 of Hanselminutes they were talking about PowerShell, but more importantly around 04:50 they mentioned that PowerShell used something called The Common Engineering Criteria to have a standard on which words to use when developing new modules for it.

I cannot find any concrete dictionary on recommended words through this page.

Does anyone know a good resource for standardized keywords to use when developing .NET (C# in this case)? I'm talking nouns and verbs.

One good point they brought up in the podcast was that you could almost alway guess what the object and methods is named.

This to avoid not knowing which one of these to select:

object.GetInfo();
object.FetchInfo();
object.CreateInfo();
object.RetrieveInfo();

UPDATE: I found a good start, a list of standardized verbs used in PowerShell, but they looks like the standards used in the .NET Framework.

+3  A: 

I would check out Microsoft's Guidelines for Names:

Naming guidelines provide guidance on selecting appropriate identifiers for the elements that make up class libraries including assemblies, namespaces, types, members, and parameters. Choosing identifiers that conform to these guidelines improves the usability of your library and encourages users to trust that your library will not require learning a new set of conventions.

Most of interest to you would most likely be the section titled Names of Type Members:

Names of Methods

Do give methods names that are verbs or verb phrases.

Typically methods act on data, so using a verb to describe the action of the method makes it easier for developers to understand what the method does. When defining the action performed by the method, be careful to select a name that provides clarity from the developer's perspective. Do not select a verb that describes how the method does what it does; in other words, do not use implementation details for your method name.

Beyond that its really up to you. You have a lot a freedom here but a good rule of thumb is to mimic the style of the names that you find in the .NET framework so that your types and members "feel at home".

Andrew Hare
Close enough, but not really what I was looking for.
Seb Nilsson