python-novice-inflammation icon indicating copy to clipboard operation
python-novice-inflammation copied to clipboard

alternative to using fahrenheit and celcius for teaching functions?

Open raynamharris opened this issue 1 year ago • 6 comments

I've seen this lesson taught numerous times, and I always have a few issues with the section on creating functions.

  1. fahrenheit and celcius are hard to pronouce and hard to spell, especially if english is a second language
  2. the math is unfamiliar and easy to mis type ((temp - 32) * (5/9))
  3. who can remember that K = 273.15?

I feel like the points listed above add to the cognitive load unnecessarily.

Could we replace this motivating example with something used in previous episodes, such as the weight (lb and kg) or something related to the inflammation dataset?

raynamharris avatar Jul 15 '22 17:07 raynamharris

I agree with the spelling here, even as a native English speaker Fahrenheit is an awkward word to type/spell (even more so in countries that use SI untis).

For parts 2/3, I believe that part of the point of creating these functions is that you don't have to remember the math/numbers, just look it up once, write the function, and then forget about it. However, I do really agree with your point on cognitive load and relating this work to previous parts of the lesson. Having the functions that we create at this point in the lesson refer back to things that were being done earlier in the lesson is a great way to reinforce prior learning.

For the most part the theme of temperature conversion could be replaced with mass conversion as suggested. The temperature conversion relies on three temperature scales in order to demonstrate function composition. I would suggest that a third measure of mass be used so that we can still incorporate function composition - the stone (st) would be useful here.

The changes required would be mostly along the following lines:

Currently Suggested
Fahrenheit st
Celsius lb
Kelvin kg
Compose F->C->K Compose st->lb->kg

PaulHancock avatar Jul 18 '22 02:07 PaulHancock

The previous submission is for instructor checkout.

PaulHancock avatar Jul 18 '22 02:07 PaulHancock

I don't think that that would be a very good change. Barely any people have heard of stone as measurement, and pound is also unfamiliar to the majority of people around the world. Whereas those measurements of temperature should at least sound vaguely familiar from high school physics/chemistry classes.

bittremieux avatar Aug 26 '22 21:08 bittremieux

Adding some personal experience here:

  • Stone --> never heard of it before
  • pound --> comfortable with that
  • Fahrenheit spelling --> no problem as a native German speaker (Daniel Gabriel Fahrenheit was German)
  • Fahrenheit conversion --> would need to look that up but that is fine

In conclusion, to me personally there was no significant cognitive load there. But I agree that the details of the problem probably feel much more natural to some people (Americans, physicists, ...) than to others. Currencies could be quite inclusive or at least approachable in that respect but would not refer to previous lecture material (and the exchange rates fluctuate all the time). From the simplicity perspective, one could use simpler weight relations, e.g. kilograms, grams, and tons. Or maybe switch gears and just do something that isn't related to units (which from my personal experience everybody hated in school). =)

chillenzer avatar Sep 15 '22 22:09 chillenzer

One of the the benefits of doing a temperature conversion exercise is that it is generally useful practice in day to day activities. Software Carpentry and academia has a lot of connection between countries (countries that use different standards), so an exercise covering this topic has real value to our attendees because this exercise could be applied in their own research, which will keep them engaged in our demonstration. There is a true negative in that these words can be difficult to spell, leading to coding mistakes. However, if we are cognizant of that fact, while teaching then it can be something we think about if people are receiving errors in our demonstrations. Hence, I would be hesitant to change this exercise because the flaws can be mitigated and it can be readably useful to our audience.

senderrr avatar Jan 10 '23 19:01 senderrr

I'd be happier with the temperature example if the conversion were reversed. The current layout has an implicit assumption that the learner should know that the melting and boiling points of water are 32°K and 212°K, which I suspect nobody outside of North America does.

I think 0°C and 100°C are much more well-known internationally, and suspect they may even be known relatively well in North America.

(The composition of functions could then be done from kelvins to Fahrenheit.)

edbennett avatar Jul 20 '23 13:07 edbennett