Coder Social home page Coder Social logo

refactoringchallenge's Introduction

Thanks for taking the time to download this refactoring exercise.

Instructions:

This solution contains three classes used by an imaginary bicycle distributor to produce order receipts and some unit tests to prove that everything works.

Pretend this code is part of a more extensive software system and you are given responsibility for it.

Refactor the code so that it can handle:

  • More bikes at new prices
  • Different discount codes and percentages

Refactor the code so that it can survive an onslaught of the upcoming changes, you're confident it works, and you're comfortable the next engineer will quickly understand how to work on it.

Be pragmatic in your refactoring. Don't use something fancy if you feel it's not needed.

Zip up your project (remove node_modules) and submit it with your resume at this job posting: https://trainerroad.recruiterbox.com/jobs/fk0j1wf. Don't do a PR/Fork as everyone else would see your work and could copy it.

If we love your refactoring and your resume is legit, we'll move to the next step. This might seem like a lot of hoops to jump through, but it's way better than hiring someone who answers trivia questions in an interview well but can't code worth a damn.

Building and Running Tests

You will need node and npm or yarn installed and setup on your machine. Once ready run the following from the root directory of the project.

yarn

or

npm install

After installing the packages you can run either of the following to run the tests

yarn test

or

npm test

refactoringchallenge's People

Contributors

npearson99 avatar originalmoose avatar

Watchers

James Cloos avatar

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.