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.

Implement new Concept Exercise: Randomness

See original GitHub issue

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.

  • randomness

Learning Objectives

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

  • how to create pseudo random numbers with Math.random
  • how to create pseudo random integers
  • the seed is selected automatically and cannot be influenced by the user
  • when and how to create cryptographically secure random numbers (web and node), should not be part of the exercise but would be good to mention in the concept to raise security awareness

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

Out of Scope

  • details of pseudo random number generation in general
  • discussing the different algorithms

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

Prerequisites

  • numbers

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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
atj-craigcommented, Apr 19, 2022

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

2reactions
atj-craigcommented, Apr 19, 2022

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 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing Randomness into Idea Generation Workshops
Some exercises are designed to generate specific outputs such as consumer understanding, defining benefits, new packaging ideas.
Read more >
Randomness Exercises
is set on “random”, about how many songs would you have to hear until you're ... This first thing you have to do...
Read more >
6-1 Exercise- Randomness in Establishing Samples - Studocu
a. The instructor's sample selection process suffers from selection bias. Describe three ways the sampled students will be systematically different from the ...
Read more >
CS161 Labs - Lab 6: Using Randomness
hs implement a new function randR :: Random a => (a, a) -> RandState a that is like rand , but generates numbers...
Read more >
Randomness in Elixir on Exercism
Master Randomness in Elixir by solving 4 exercises, with support from our ... from an enumerable data structure (e.g. list, range), we use...
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