-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Concept Exercise: Numbers (Freelancer Rates) #1049
Comments
@NobbZ did this exercise and noted two things.
|
Hi, I just did this exercise and found one part a bit unclear:
I assumed this meant that each full month gets a discount, and any leftover days are billed at the full day rate. But from the expected results in the tests it seems that the discount needs to be applied to all days regardless of whether they make up a full month. (Apologies if this was clear to everyone else!) |
@benallan Good point! We should clarify that in the instructions. |
Another comment by a student who was confused:
|
I'd like to work on this |
@JaPatGitHub Thanks a lot for picking this up! There are a lot of todos here. Feel free to only tackle some of them first. Your PR does not have to include all things at once. Also if you don't feel like doing all the parts we can put the rest in some new issue later. |
Hello @junedev, my pleasure to work on this! |
Please make sure you have read the documentation listed under "Getting started" above. There you learn that there are the concepts (in this |
What do I do for the uuid of arithmetic-operators in the general config.json file? |
You can use configlet to generate the uuid: https://github.com/exercism/configlet#configlet-uuid How to fetch configlet is documented here: https://github.com/exercism/javascript/blob/main/CONTRIBUTING.md#fetch-configlet |
Thank you @junedev. Went through the links you sent and tried implementing. I don't exactly get how to run the Not much great help on google searches |
@JaPatGitHub if you're on windows, open PowerShell and bin/fetch-configlet.ps1 If you're not on windows, bin/fetch-configlet Both will result in |
That wasn't my exact thought process, but I also was confused at task 3 as to which rate I was supposed to use, and even though I could guess from the function inputs and also the clue that
I thought it was more vague than it should. In the end, it seems the whole monthly rate thing could actually be dispensed with in favor of talking directly in terms of something like a single-charge rate or a fixed-budget rate. That would make things clearer. Also, I've just checked the hint for this task before commenting here, and I think it can even add to the confusion by mentioning
|
@Fbrufino, I agree with you. I got your second point about changing |
Ok, I'm trying my best not to waste other people's time, so I tried to reanalyze both the instructions and my thought process when doing the exercise. I'm laying my conclusions here as clearly as I can so any mistakes can be easily pointed out. I think there are 2 ways of interpreting task 3:
Now, granted, interpretation 1 is pretty clearly the more solid one between the two, but if you start out at interpretation 2, as I did, I think it's a bit hard to step out of it, it's just easier to try things out and see what the tests return. I'm almost definitely biased towards justifying my interpretation but the fact that the only explicit/clear mention of a discount is in the case of monthly billing might "prime" people towards the same reading I made. I suspect this accounts pretty well for @benallan's thought process too. As to a solution, I think we can either try to do something to put task 3 more clearly out of the context of tasks 1 and 2; or try to more clearly lay out the situation in task 3 as a possibility in the "story" part, so as to avoid the "priming" effect I alluded to. Or both, of course. My pitch:
|
I agree with @Fbrufino but I would even go further than the changes he suggested
With these two changes there is no confusion anymore which information needs to be applied in which task. @JaPatGitHub Do you think you can work with that input? |
Thank you for your detailed suggestion @Fbrufino! Only would like to know - are there any docs or instructions for writing test files? |
Moreover, I have some thoughts about introducing How do you all feel about this? |
@JaPatGitHub Regarding the test files
Let me know if you have further questions. (I will create an issue for transferring this info to some documenation file.) Regarding the remainder operator task Some clients always extend the contract by another full month. When the freelancer already worked for that client for a larger number of days, it would be good to know how many days are left to complete the current month so the freelancer knows it might be time to discuss another extension of the contract. Implement a function
I know the story is not as nice as in your suggestion but it would avoid convoluting one task with too many aspects of the concept at the same time. |
@junedev Regarding Remainder Operator However, I find your story good too. So which one do you think should we work on? |
Sorry for the misunderstanding. I think a new task to implement something like |
@junedev, I wish to add everyone who gave suggestions in this issue in the |
@JaPatGitHub That is very nice of you but the contributor slot is meant for the person that actually did the change in the code and that means you. 🙂 |
I've been thinking about the use of shorthand arithmetic operators in the exercise. Do you think we can make sensible use of it in this exercise? In my experience, I've mainly used shorthand operators only in loops - beyond the scope of this exercise. |
@JaPatGitHub Good point, I asked myself the same. I couldn't think of a good exercise here and there are a couple of other exercises later where these operators are used and the analyzer can tell students if they didn't use them there. So that's good enough for now. |
@JaPatGitHub All the main points from this issue are addressed now. 🎉 Thanks again! The only thing left are some improvements for the about.md file. Do you want to work on those as well? If not, I would move them to a new issue and consider this one closed. |
@junedev, I'm glad to have worked on this. This was my first open-source contribution apart from fixing typos and broken links. A personal thank you for your reviews - made me go a long way! I plan to stay dormant on GitHub for the rest of this month as I have my exams and the courseload is heavy. Hence I think it would be better to move to a new issue so that someone else can work on it or I tackle it later :-) |
The ticket with the leftover items is here: #1505 |
Getting started
Here you can read about what Concept Exercises are and how they are structured:
If you have not done so yet, it is probably also helpful to do a couple of "Learning Exercises" (this is how they are called on the site) yourself.
Goal
The goal of this issue is to extend the existing concept exercise Freelancer Rates that teaches the
numbers
concept.The exercise is already in good shape but currently only explicitly introduces numbers as a concept. Additionally it should also introduce arithmetic operators incl. shorthand assignment operators.
See this list for details on the learning curve we are aiming for.
Additional Learning Objectives
(To avoid too many tiny concepts, both of these will be combined in one additional concept called
arithmetic-operators
.)ToDos
Add Concept
arithmetic-operators
inconcepts
and add the concept to the general config.json file (incl. adding it toconcepts
for thefreelancer-rates
exercise there)Adjust the Concept Exercise
%
or**
) and one sensible use of a shorthand assignment operator. You can add new additional tasks but you can also consider replacing/adjusting an existing task that might currently not teach much more than the other tasks already do. Updating the tasks includes the following filesFixes for the Existing Content
This part is optional polishing "while you are at it" but can also be tackled in another issue/PR later.
Ideas for About.md of the New Concept
/
does not perform integer division like in some other languages%
if one operand is negative, see MDN docs below the demo box%
for keeping a value inside a range/ "if you reach the end while iterating, start from the beginning" (not sure how to describe this well but explanation should also be understandable for someone who does not know ring theory)**
does the same as the olderMath.pow()
Help
You can choose to do this solo-style, or collaborate with multiple people on this. The suggested approach is to
Credit
This contribution grants you an author slot. Add your username to the
authors
key in the config file.The text was updated successfully, but these errors were encountered: