|
|
|
|
|
by katbyte
4934 days ago
|
|
In both those examples information about why the variable needs to be set to that specific value is lost. At some point the variable needs to be set and the more information on why it needs to be set to a particular value the better. You can't pack all the required information into a function name and i would dare say you shouldn't. Granted I would personally do: const int perfecttemperature = 350; // 400 will burn them, 300 they will be mushy
.....
oven.setTemp(brownie.perfecttemperature);
but still comment it as to why i picked 350. Comments are for the why, and the why is the most thing to understand. |
|