DFO-CHS-Dynamic-Hydrographic-Products / IWLS_pygeoapi

pygeoapi plugins to access and process water level and surface currents from the IWLS public API
5 stars 0 forks source link

Add the define-once-and-for-all principle in the coding guidelines. #33

Open glmcr opened 2 years ago

glmcr commented 2 years ago

Just one example for this: We now have the "properties" string defined at 11 places in three different source code files so if this "properties" string is changed for another string (for whatever reason) then we would have to change it 11 times.

Then it would be a good idea to define it just once in a variable that would be visible from all the source code and we would have to change only the content of this variable if the related string is changed.