question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve Concept Exercise: Numbers (Freelancer Rates)

See original GitHub issue

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

  • How to do perform the following 6 arithmetic operations: addition, subtraction, multiplication, division, remainder, exponentiation
  • What are shorthand assignment operators for those 6 operations and how to use them

(To avoid too many tiny concepts, both of these will be combined in one additional concept called arithmetic-operators.)

ToDos

Add Concept

  • Create a new folder arithmetic-operators in concepts and add the concept to the general config.json file (incl. adding it to concepts for the freelancer-rates exercise there)
  • Write the introduction.md, about.md and links.json file for the concept

Adjust the Concept Exercise

  • Add the introduction.md of the concept at the end of the introduction.md file of the exercise, make some adjustments in the content if necessary.
  • Adjust the design.md file to incorporate the new learning objectives.
  • Update the tasks in the exercise to include at least one use of one of the more unusual operators (% 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 files
    • instructions.md
    • hints.md
    • exemplar.js
    • stub file (freelancer-rates.js)
    • test file (freelancer-rates.spec.js)

Fixes for the Existing Content

This part is optional polishing “while you are at it” but can also be tackled in another issue/PR later.

  • Fix broken link in “Built-in Object” section
  • About.md for numbers could benefit from the following additions:
    • explain the 3 special numbers: NaN and +/- Infinity
    • show how to write numbers with underscore or exponential notation
  • Remove the section on comparison, it is now included in the comparison concept, instead just keep the link (“How to compare numbers is explained in …”)
  • The current exercise requires rounding to solve it. The introduction.md of the exercise currently does not include this. It should point the students to a list of the rounding methods, e.g. like this one, so they don’t get lost reading about rounding in JavaScript. Also update the introduction.md of the numbers concept to keep them roughly in sync.
  • See comments below for other issues that students found that should be addressed.

Ideas for About.md of the New Concept

  • / does not perform integer division like in some other languages
  • behavior of % if one operand is negative, see MDN docs below the demo box
  • typical use of % 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 older Math.pow()

Help

You can choose to do this solo-style, or collaborate with multiple people on this. The suggested approach is to

  1. First accept this issue by saying “I’d like to work on this” (no need to wait for a response, just go with it) and optionally request that someone works with you (and wait for a second person to accept your request).
  2. Use this issue to discuss any questions you have, what should be included in the content and what not and to collect reference material.
  3. Create a PR and set “exercism/javascript” as reviewers. Additionally you can write in #maintaining-javascript that your PR is ready for review. Once you incorporated any critical feedback that the reviewer might give you and the PR is approved, it will be merged by a maintainer.

Credit

This contribution grants you an author slot. Add your username to the authors key in the config file.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:28 (25 by maintainers)

github_iconTop GitHub Comments

5reactions
benallancommented, Sep 4, 2021

Hi, I just did this exercise and found one part a bit unclear:

If the freelancer bills the project manager per month, there is a discount applied

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!)

2reactions
JaPatGitHubcommented, Nov 11, 2021

@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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Freelancer Rates in Elixir on Exercism
Can you solve Freelancer Rates in Elixir? Improve your Elixir skills with support from our world-class team of mentors.
Read more >
How to raise your freelance rates (and when's the right time to ...
You don't have to uniformly raise your rates for all clients. Instead, do so progressively. First, quote higher prices to new leads to ......
Read more >
Freelance Rates: How To Work Out Your Daily or Project Rate ...
Here are my top tips for calculating your freelance rates: Get comfortable talking about your rate: There'll be situations where you'll have to ......
Read more >
Freelance Rates & Pricing: How much should you charge?
How to set your rates as a freelancer? · How to calculate and work out freelance rates? Calculate expenses; Calculate working days; Calculate...
Read more >
Creating a fair, but highly-profitable, freelance rate
This is not a case of picking some numbers out of the air. I see a lot of advice telling freelancers to increase/decrease...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found