Git Product home page Git Product logo

wizsys's Introduction

Magic 8.0

The wizarding world has been around for ages, this system even more so.

The intent of the code

-> To send acceptance letters to students regarding which magic school they have been accepted at.

What the code is doing now

A school offers different courses(school_data.json -> ["school"]["courses"]) and a list of ratings for each course(school_data.json -> ["school"][:course_rating]) these ratings are out of 100.

A child when applying to the school should submit his name and at least 5 subjects he is interested in, the order of the subjects coincides with a list of all the subjects available(School::COURSES).

We compare the list of interest scores a student submits to each schools list of courses offered and their rating.

The code is centuries old and needs a fair amount of refactoring.

Use all the knowledge at your disposal to manage the dependencies wisely.

Tips

You will need access to ruby. All versions of OSX will have it, you will also need:

  1. rspec - gem install rspec

  2. byebug - gem install byebug

  3. There is a spec written. you can run it by calling bin/rspec test.rb

  4. Debuggers are also suggested if you have byebug installed you can easily debug the code by adding require 'byebug' at the top of the test.rb file.

  5. You can

  • rename / add files
  • change the data structure in the
  1. Start with the simple tricks learnt today -. Extraction Method -. Method Object -. Dependancy Injection

Bonus

-> Identify in words how the system calculates a score. -> Use all three of the refactoring tips.

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.