10

Looking at some camera metadata on Windows File Properties there are (along with a few more) two Properties named Focal length and 35mm focal length.

I'm developing software that will make use of these two Properties. So far I have created a Property named FocalLength for the first, but I cannot seem to find a proper name for the other one.

I have thought of _35MmFocalLength or ThirtyFiveMmFocalLength, but I think there might be a better suggestion.

Any ideas?

yannis
  • 39,647

2 Answers2

5

Well, (in my opinion) you're tripping over two basic programming naming conventions:

  1. You shouldn't start variable names with numbers, and my opinion on this is that variable names shouldn't have numbers at all.
  2. The _variable name should be reserved for private variables.

There are many many, MANY standards. If you're using Visual Studio you should consider using the StyleCop Addon. It will keep you straight for code quality and conventions.

As for the name of your variable, I suggest FocalLengthThirtyFiveMillimeter

I don't like using abberviations in my variable names but that's personal.

5

Following two suggestions:

  • Swap names and use FocalLength35Millimeter (Note of not using the abbreviation, to allow better readability)
  • Be more techy and use EquivalentTo35MmFocalLength
Marcel
  • 3,152