Re: Guidelines/checklist for reviewing code



Thomas Koenig wrote:

On 2009-01-08, J. F. Cornwall <JCornwall@xxxxxxx> wrote:


Which is a poor "rule" when your non-physics codes deal with things that are often not measured or computed in SI units...


When physics codes deal with electron mass and charge, non-SI
units make a lot of sense :-)


Or have to deal with many possible sets of units depending on who was doing the measurements, or who runs the instrumentation. We have a fairly small subset of data collected in metric units, but most water info in the US is in the traditional units (gallons, cubic ft/sec, ft/sec, etc).


*shudder*

Maybe not ideal, but it works... Most water work in the USA is done in these units, and there's a good long history of their usage, so as long as we're consistent its not a problem.


I remember seeing a liquid units conversion table in a control
room of a chemical plant in the US. This is plainly necessary
when you measure your tank size in cubic foot and your flows in
gallons per hour.


I would amend your "rule" to say that you should document the system(s) of units used in your code, and variable names should reflect the units as much as practical.


You'd probably need a module for unit conversion.

We have routines to do such conversions, but not a single module. Of course, we're still coding in 77-style because of other limitations. Having a number of conversion routines may not be ideal, but for our setup it's been working pretty well since before Fortran 77...

Jim
.



Relevant Pages

  • Re: GPS receiver with Raw Data Measurements
    ... data and "gar2rnx" to do the conversion to RINEX format. ... I am trying to find a cheap GPS receiver, ... (phase measurements, pseudorange etc). ... hack solutions (take a normal receiver, hack it down to isolate the signals, ...
    (sci.geo.satellite-nav)
  • Re: Any suggestions for HO gradient? . . thanks for all the replys and information
    ... people who never did buy into the "Freedom Fries" mentality. ... I figure the metric system is good for the pointy-headed scientists who seem to prefer it, but for us ordinary folks, our "customary" measures suit me just fine. ... There's grains, carats, tons, US shortweight tons, tonnes and umpteen other weight measurements. ... Each of those, including the hundreds of traditional measurements I haven't mentioned, have irrational conversion factors to many of the ...
    (rec.models.railroad)
  • Re: Website to find Hazal Measurement
    ... > I am trying to find a conversion table on the website. ... > that can convert measurements such as Tefach, Agudal, Parsa, Zait, etc. ... and Feldheim is having their 20% off Chanukah sale. ...
    (soc.culture.jewish)
  • Re: GPS receiver with Raw Data Measurements
    ... data and "gar2rnx" to do the conversion to RINEX format. ... I am trying to find a cheap GPS receiver, ... (phase measurements, pseudorange etc). ... hack solutions (take a normal receiver, hack it down to isolate the signals, ...
    (sci.geo.satellite-nav)