Tuesday, March 1, 2011

How not to name a configuration setting

Recently while looking over some FAST for SharePoint labs one of the exercises had you edit a property called:

AllowNonCleanUpClaimsCacheForTestingOnly.

The production setting for this is “false”, which will make the system do cleanup of a claims cache.

But reading the name and what it actually does is very hard due to using both the words “Allow”, “Non” and “TestingOnly”. You have a positive word, a negative word and a specific case where the property is valid, all in the same name.

The proper name for this should in my opinion be:

CleanUpClaimsCache

where the production value should be “true”. With a comment to explain why you would set this to false, e.g. in a test scenario.