In the freelancer-rates, I think it might be convenient to explicitly mention in the tasks what types students are working with (even though they are in the stub) and what each argument represents.
For example, in the discounted price example there is this code:
apply_discount(150, 10)
// => 135.0
I can probably guess that the first argument is the price before discount, but the task might mention that (or else introduce properly-named variables in the example).
Side note: I would probably rename before_discount to price_before_discount.
I personally also prefer the logic to implement to be explained in the tasks themselves, not beforehand.
So instead of having :
We first establish a few rules between the freelancer and the project manager:
The daily rate is 8 times the hourly rate.
A month has 22 billable days.
Sometimes, the freelancer is offering to apply a discount on their daily rate (for example for their most loyal customers or not-for-profit customers).
Discounts are modeled as fractional numbers representing percentages, for example, 25.0 (25%).
and the task being:
Implement a function to calculate the daily rate given an hourly rate:
I would have:
The daily rate is 8 times the hourly rate.
Implement the `daily_rate` function to calculate the daily rate given an hourly rate:
(note: I've also explicitly mentioned the function name).
In the
freelancer-rates
, I think it might be convenient to explicitly mention in the tasks what types students are working with (even though they are in the stub) and what each argument represents.For example, in the discounted price example there is this code:
I can probably guess that the first argument is the price before discount, but the task might mention that (or else introduce properly-named variables in the example). Side note: I would probably rename
before_discount
toprice_before_discount
.I personally also prefer the logic to implement to be explained in the tasks themselves, not beforehand.
So instead of having :
and the task being:
I would have:
(note: I've also explicitly mentioned the function name).