Open germanivanov0719 opened 1 year ago
Right now, there are a few basic variables. Here is a table with proposed math names (for formulas), descriptions, current (ver. d44e2b0) and future names in code for each:
Math Variable | Description | Current name | Future name |
---|---|---|---|
$M_0$ | Original mean value | M1 |
M0 |
$W_0$ | Original weight sum | s |
W0 |
$x$ | New grade value | m |
x |
$w$ | New grade weight | w |
w |
$M_1$ | New mean value | M2 |
M1 |
$W_1$ | New weight sum | Not used | W1 |
Let's define basic formulas for variables in the table above.
$$ W_1 = W_0 + w \ \ $$
$$ M_1 = \frac{M_0 \cdot W_0 + x \cdot w}{W_0 + w} $$
From the second formula, we can find $w$:
$$ w = \frac{W_0 (M_0 - M_1)}{M_1 - x} $$
Assuming rounding up to the nearest integer from $M_1$ including (therefore, making it the closest value we have to reach), and only solving for integer values of $w$ (as it is the weight, which is often a whole number):
$$ w = \left\lceil {\frac{W_0 (M_0 - M_1)}{M_1 - x}} \right \rceil $$
This approach allows the user to specify more conditions for the calculation.
For example, right now you can only use $x = 3$ for calculations, when looking for $M_1$ rounded to $3$. This approach also allows using $2$'s, $1$'s, zeros, and even negative and/or non-integer numbers to reach the same rounded $M_1$ value.
It allows users to specify the set of grades their school uses for grading.
It is possible to add a manual entry, or just provide a range selection for users in settings, which would later be displayed on the main page.
Calculating will be much faster even for the huge values.
This approach takes approximately constant time, and it means users will be able to recalculate as many times as they want without worrying about performance.
I'm still thinking about which interface should be used to support most of the features of the new approach. However, it is likely I'll save current view at least for calculations with roundings.
Scheduled for 2023-07-13 – 2023-07-20
Issue
When creating this app, I used a brute-force approach for calculating required number of new grades to reach a certain goal. While it does allow me to add the option to calculate with rounding, it greatly decreases performance and limits the number of available goals and marks used to reach those goals.
I knew about this design limitation, and it has to be fixed as some point. I will have to come up with a solution on how to integrate the fix to this app.
Status Tracking