From: Sam Duncan Date: 2012-04-19T14:55:32+09:00 Subject: Re: When are numbers NOT Magic? Example. On 19/04/12 17:30, Greg Willits wrote: > > Setup: a bunch of floating point values displayed on a web page. > Essentially a dashboard of a bunch of measured things. Each number has a > distinct engineering-based relevance to the precision which is > displayed. ... > What say ye? Do these require constants? Are they magic numbers? > Hard to know without knowing what the software does, but ... If the software has hardware attached that could potentially have a higher or lower precision in terms of the specific metric it/ they measure(s), you have a place to configure it outside of the code based on the attached hardware. This makes the software more flexible; for users as well as developers. Also, seeing it named in the code makes it clear which constant will affect which display. Perhaps that is irrelevant. Hard to say =] Sam