MFC icon indicating copy to clipboard operation
MFC copied to clipboard

remove magic numbers

Open sbryngelson opened this issue 1 year ago • 1 comments

The code doesn't have too many magic numbers https://en.wikipedia.org/wiki/Magic_number_(programming), but it has some, like this:

https://github.com/MFlowCode/MFC/blob/f347b30f9c0194c0ab3492b7772fa6edbc8d0860/src/simulation/m_qbmm.fpp#L1115C36-L1116

remove them (can set them as constant parameters in the module or subroutine).

sbryngelson avatar Jun 07 '24 18:06 sbryngelson

I'd be curious to see this strategy continued: https://github.com/MFlowCode/MFC/pull/580/files#diff-3cbade161f91b38a72f4c35e4ab1a5fd66b24ab50d700e4e56eae364e5bd84ed

sbryngelson avatar Sep 08 '24 21:09 sbryngelson

Most magic numbers have been removed at this point, and new merged code doesn't have them (or so I try to impose). Closing this for now.

sbryngelson avatar May 26 '25 11:05 sbryngelson