exercism / javascript

Exercism exercises in JavaScript.
https://exercism.org/tracks/javascript
MIT License
581 stars 618 forks source link

Implement new Concept Exercise: Randomness #1515

Open junedev opened 3 years ago

junedev commented 3 years ago

Getting Started

If you have not yet contributed to concept exercises before, this task requires some upfront reading to acquire the necessary background knowledge.

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. You can also look at the code of an existing concept exercise like bird-watcher (concept for-loops) for reference.

See the documentation above (general documentation), as well as How to implement a Concept Exercise in JavaScript.

Also be aware of these general guidelines.

Goal

The goal here is to create a new concept exercise to teach randomness (random number generation).

The concept needs to be written from scratch, the exercise can be ported from another track (see details below).

Concepts

The following concept needs to be created. You can use the introduction.md file of the concept also as introduction.md file of the exercise. No need to create different content at this point. Additionally, if you want to save some time it is ok to not have an extensive about.md for now. It can also be mainly the introduction.md content, maybe with some additions you would like to make.

Learning Objectives

In the concepts the student should learn about the following topics and then practice them in the concept exercise.

It would be good to include a link to an explanation why randomness is hard/what pseudo random numbers are.

Out of Scope

As always, the concept should mainly focus on the JavaScript specific parts.

Prerequisites

Other prerequisites should be added as needed to solve the specific exercise.

Exercise Idea

Elixir "Captain's Log" Exercise could serve as template.

In case you port that exercise, it is probably a good idea to omit the last task (does not belong to this concept) and switching task 1 and 2 because in JavaScript, task 2 is easier.

Resources

Here some links that might be helpful as a starting point and/or for the links section of the concept:

How to proceed

  1. First accept this issue by saying "I'd like to work on this" (no need to wait for a response, just go ahead).
  2. Use this issue to discuss any questions you have, what should be included in the content and what not and to collect more reference material.
  3. Create a PR and set "exercism/javascript" as reviewers. Additionally you can write in #maintaining-javascript on Slack 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.
atj-craig commented 3 years ago

I'd like to tackle this. It may take me a while to get fully caught up with using the system you've created for generating exercises, but I'd nevertheless love to sink my teeth into something like this to further develop myself as a developer :3

Let me know!

junedev commented 2 years ago

I am happy to assign this to you but to manage expectations, the main task with new concept exercises is writing the new concept document, so something similar to this https://exercism.org/tracks/javascript/concepts/functions but on the topic of randomness.

This task also involves writing code (tests, example solution) but that's usually a lot easier/quicker than the concept writing.

Leave a quick 👍 to confirm you want to work on this.

atj-craig commented 2 years ago

I understand that I'll need to prepare the concept document alongside the code. I'll take you up on the opportunity. Thank you.

atj-craig commented 2 years ago

Just a quick check-in. I've got most of the concept lesson written.

I'll keep plugging away :)

junedev commented 2 years ago

Thanks for the update!

atj-craig commented 2 years ago

I've got most of the exercise portion of things done. Getting to know how Jest works to make .spec.js play nicely with the exemplar solution was a fun challenge.

I need to do some more polishing, but it's coming together.

junedev commented 2 years ago

@atj-craig Feel free to maybe create a draft pull request. Then if there is something in particular that needs polishing, me or some other maintainer can help out if you want by adding some commits to your branch.

atj-craig commented 2 years ago

Sorry for the late reply and for being out of touch. Holiday season took me by surprise, and I ended up in a vacation spot without reliable internet (hence why I didn't reply until now). I'll have a PR by next week. I appreciate your offer of help with the polishing :D

SleeplessByte commented 2 years ago

Thanks Andrew!

atj-craig commented 2 years ago

Thanks for waiting!

I've got an initial push to my fork: https://github.com/atj-craig/javascript/tree/main

For a quick reference of where I'm at, I made a TO-DO file in javascript/exercises/concept/captains-log/TO-DO

What I was working on last was the instructions. I was wondering just how much I should be giving the student in the instructions and how much should be left for them to figure out in the exercise. For this concept, the line of balancing this seemed a little tricky as the instructions for making random numbers are fairly simple... any advice?

junedev commented 2 years ago

Is it possible you meant "How much to put in the introduction"? The instructions are probably very similar to the ones from the exercise you are porting, just with JavaScript syntax. As for the introduction, the "learning objectives" are your guide. So as mentioned there I would recommend to include how to get an integer between 0 and some max value but I would not show how to get from that to a random letter.

It is totally fine if the introduction is just a couple of sentences long.

junedev commented 2 years ago

A good start was made for this exercise here https://github.com/exercism/javascript/pull/1633 but the original contributor did not have time to finish this. However wants to work on this can continue from there.

menty44 commented 2 years ago

A good start was made for this exercise here #1633 but the original contributor did not have time to finish this. However wants to work on this can continue from there.

I'd like to work on this

junedev commented 2 years ago

@menty44 Thanks for volunteering to work on this. Sorry that I didn't really had time to say hi before.

Unfortunately, this task involves some "reading the docs" before jumping in as mentioned in the description. Once you did that and still have questions, just post them here and I will try to answer as soon as possible. Also feel free to create a draft PR at any time with some preliminary version if you need feedback on something concrete you already did.

One last thing: If you find out that you won't have time to continue working on this at some point, please let us know.

junedev commented 2 years ago

@menty44 Are you still working on this? If not, I would unassign you so someone else can pick this up.