phetsims / molarity

"Molarity" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/molarity
GNU General Public License v3.0
2 stars 6 forks source link

In code rename "solids" to "precipitate" sometimes? #191

Closed zepumph closed 4 years ago

zepumph commented 4 years ago

Especially while working on #171 in ConcentrationDescriber.

In the model we have precipitateAmountProperty, and I don't think that should change.

In the interactive descriptions view we have the term "solids" and I don't think that should change.

I feel that there needs to be a defined dividing line where we begin to refer to it as solids. Right now all of ConcentrationDescriber refers to it as solids instead of precipitate, but I wonder if solids should just be the string used to communicate precipitate, and that all the code usages of solids should actually become precipitate.

Here is a thought experiment. Right now we really like solids, it has been well designed to communicate what is actually there (precipitate) at the correct pedagogical level. What if in the future we decide to change "solids" because the target learning level changes. Wouldn't it be nice to just have to change the strings, because all of the code was referring to the "precipitate amount" as that, and not sometimes as solids and sometimes as precipitate.

@twant what do you think?

twant commented 4 years ago

I changed this so that most of the class methods now refer to precipitateAmount, but the strings (and their keys) still refer to solids (I thought about changing the string keys, but I think they'd morph to be too far away from the actual strings to be recognizable). I think it's in a place I feel good about -- would love your thoughts @zepumph!

zepumph commented 4 years ago

I really like this. Thanks for all your hard work. This is one of those finicky ones that I think will really help in the maintainability of the sim.