Giter Club home page Giter Club logo

account-deletion-challenge's Introduction

Preface

This repository demonstrates bad code that was previously used in Taskworld. The ultimate goal of this web is allowing users to delete their account, but before doing so, they must transfer their ownership to another user and do our exit survey. To confirm the account deletion, users need to type their emails, and tick the acknowledgment check-box. After deleting accounts, users will be redirected to www.example.com.

You can bring up the web by going to client directory, running npm install and npm run serve respectively, then open http://localhost:1234/ in your browser. You may also view this project on CodeSandbox.io.

Specifications

You are logged in as Ross Lynch, the owner of the workspace Lightning strike.

Initially, the web needs to download the workspace data that belong to you by calling the REST API fetchWorkspaces.

Once the web has the workspace data, the web prompts you to transfer your tasks, projects, and admin rights to another person. Every time you assign a user, the web tries checking if the assigned user presents in the workspace (dry-run) by calling the REST API checkOwnership. Note that the ownership transfer operation will actually happen once you finish the email confirmation (the last step).

Moving on, you are forced to do the exit survey. Marking one or multiple answers allow you to proceed to the final step. Your answers and comments will be sent to the REST API submitSurvey for further analysis. Note that the request payload must be conform with SurveyMonkey®.

Finally, you need to confirm the account deletion by typing your email, hard-coded as [email protected], and tick the acknowledgment check-box. After that, calling the REST API terminateAccount will tell the server to transfer the ownership that is previously chosen in the first step, delete your account, and the web will redirect you to http://www.example.com.

You can go back and forth through the steps anytime, but the whole process is considered complete only when clicking Delete my account button.

Instructions

  • You are instructed to improve the code mainly in JavaScript files inside client/src directory. There are many bugs hidden in the codebase, try to fix as many as you can and refactor the code so it becomes easier to maintain.
  • You may amend, move, or delete some of the existing functionality even it breaks the specifications as long as you see fit.
  • You may add new functionality in addition to the specifications as you see fit.
  • You may rename the files and React components as you see fit.
  • You must be able to explain the reasons behind your code changes along with its trade-off in a verbal review or a written document.
  • You must be able to go to client directory, run npm run serve against your code without any errors, and open http://localhost:1234/ to perform the intended tasks according to the specifications using the original set of the REST APIs.
  • You must add at least one test case of your choice using black-box testing technique.
  • You must use Git as a version control.
  • You will not be judged by the appearance of the web, which means you may leave index.css and every style={{ ... }} prop untouched.

Expectations

You will be judged by the following criteria.

  • Functionality is correct with respect to the specifications, while breaking changes are acceptable only if rational.
  • Bugs are fixed as many as possible. It should be hard for the reviewers to find a remaining bug.
  • Good software engineering principles are followed, for example, SOLID principles.
  • Identifiers are named meaningfully and consistently.
  • High coupling code blocks are adjacent to each other.
  • Errors are handled and exposed to users beautifully. Any REST API call may randomly take longer than usual or result in an error due to an invalid input or an unknown server error.
  • Good choice of data structure is used.
  • Consistent indentation and formatting are followed.
  • Indirection is minimized as much as possible, while still maintaining flexibility.
  • Git commit messages clearly state the reason of the change.
  • Over-engineering and under-engineering are avoided.
  • Automation testing covers the main functionality of the under-testing components.

Taskworld expects you to put great effort into your work with the highest attention to detail.

Taskworld reserves the right, in its sole discretion, to disqualify any candidate that does not comply with any of the above, even before the work is submitted.

By submitting this challenge you agree that any writings or images you submitted may be used by Taskworld.

account-deletion-challenge's People

Contributors

dtinth avatar thisismanta avatar carryall 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.