Guidance in naming awkward objects?

Posted by GlenH7 on Programmers See other posts from Programmers or by GlenH7
Published on 2012-12-19T16:01:28Z Indexed on 2012/12/19 17:13 UTC
Read the original article Hit count: 411

Filed under:
|

I'm modeling a chemical system, and I'm having problems with naming my objects within an enum.

I'm not sure if I should use:

  • the atomic formula
  • the chemical name
  • an abbreviated chemical name.

For example, sulfuric acid is H2SO4 and hydrochloric acid is HCl.

With those two, I would probably just use the atomic formula as they are reasonably common.

However, I have others like sodium hexafluorosilicate which is Na2SiF6.

In that example, the atomic formula isn't as obvious (to me) but the chemical name is hideously long: myEnum.SodiumHexaFluoroSilicate. I'm not sure how I would be able to safely come up with an abbreviated chemical name that would have a consistent naming pattern.

From a maintenance point of view, which of the options would you prefer to see and why?


Audience for the code will be just programmers, not chemists. If that guides the particulars: I'm using C#; I'm starting with 10 - 20 compounds and would have at most 100 compounds. The enum is to facilitate common calculations - the equation is the same for all compounds but you insert a property of the compound to complete the equation.

© Programmers or respective owner

Related posts about naming

Related posts about complexity