Giter VIP home page Giter VIP logo

randomleaderpicker's Introduction

RandomLeaderPicker

A WebApp to randomly pick the weekly leader, as well as the feedback reviewers.

randomleaderpicker's People

Contributors

hackoor83 avatar

Watchers

James Cloos avatar

randomleaderpicker's Issues

Feedback on V1

First of all, nice work Sam.

Good idea to split up the students in two halves to prevent self-assignments. What about if the number of students is an odd number? Your code still seems to work, but a more explicit handling of this case would make the code more clear and maintainable.

I'll bring my deck of cards again this Sunday so that you can explain to me how your fancy functional code (I'm a functional fan too) works.

It is customary when you chain methods like that to start each new method on a new line, like this:

let shuffledReviewees = firstReviewers
    .map() => [Math.random(), a])
    .sort((a, b) => a[0] - b[0])
    .map(a => a[1]);

This makes it a bit more readable as you can now more clearly see the steps involved.

Maybe you can create a version where you can paste the students names into a textarea field to make it truly universal for any class. Then you can consider hosting it, for instance using a free service such as Netlify.

What can be inproved

  • Right now you are creating multiple events and you could create 1 event that executes 2 functions.
document.getElementById('leaderPicker').addEventListener('click', () => {
  leaderPicker();
  reviewersList();
});
  • As you said in you slack message you have repetitions, try to clone the original array and use the new array for the forEach, every time you iterate througth student delete the element that you just used for the table.

  • Doing the second task you can still have a problem, someone could have himself as reviewer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.