Coder Social home page Coder Social logo

magister-tools's People

Stargazers

 avatar

Watchers

 avatar  avatar

magister-tools's Issues

[enhancement] upgrade to promises!

Why?

Promises are cool! and allow for even cleaner code.

But I want them now!

You can simply wrap your existing code in promises if you specifically need promises for certain reasons. There's even cool modules that help you "promisify" all your code. Like promisify-node.

(Just googling "node promise" all or "promisify" will get you the desired results.)

[suggestion] rename getEndGrades to selectEndGrades

Why?

I think it's a more correct name to describe what the function actually does... Since it takes a list of grades as parameter and filters the end/average grades from it, then returns an Object filled with these grades.

[feature] Add settings to getEndGrades function.

Add a settings parameter to the getEndGrades function. This settings object should determine the behavior of the function and/or what the returnObject looks like.

For instance:

{
  full_class_name: true || false // Default false
}

[feature] Shortcut function

Why

Using the module right now results in quite a lot of code still. The Goal of this module is to write less and do more! That's why I think there should be shortcut functions.

Since the module basically does one thing right now, getting the end/average grades for a specified user I think that's the only shortcut function there needs to be.

Important

All the other functions should still be available because:

  • It's easier to branch off and add features to the module if all the functions to for example get the current course for a user still exist.
  • Some people might want to use those specific functions still.

Conclusion

Shortcuts are the way to go and will provide extra usability for this module, however, they should be an enhancement to the existing functions and not become the whole module.

fetchEndGrades(magisterlogin, callback[, doFirst])
or
fetchEndGrades(magisterlogin, callback[, settings])
Where settings is the settings object that's currently being passed into the getEndGrades() function.

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.