Giter Club home page Giter Club logo

software-engineering-test's Introduction

Supahands Coding Assessment

  • This is a coding asssessment for prospective supahands engineers
  • Please create a new file for the solution, DO NOT modify the seed.py file
  • The seed file MUST NOT be modified, it is expected to generate a list of random timestamps to be used in the test

Submission Instructions

  • Make a FORK, and then create a PR for the FORK from the FORK when you are ready for answer submission!
  • Place your solutions files in the same directory as the seed.py file
  • You can solve the problem using either python, javascript, or ruby
  • Use the LATEST PRODUCTION versions of the language
  • Notify [email protected] upon PR request with link to PR
  • Solutions that did not follow the submission instructions WILL NOT be considered
  • For guidance on the PR workflow, please read the Hints section

Hints

  • HOW TO PR workflow, please read this guide to PR properly
  • We WILL NOT be processing submissions that do not match the output format as stipulated in Outputs
  • You are ENCOURAGED to re-attempt the assessment in the event that you do not do well enough in the first attempt

Problem Statement

  • Given a list of time stamps that is generated by the provided seed.py, where the timestamps represent login time
  • Length is defined as the number of days of consecutive logins, NOT the number of consecutive logins
  • Output a table with time stamps sorted by consecutive logins, sorted by descending length
  • For example, if given the following timestamps
    • ['2021-03-13 15:13:05', '2021-03-13 23:13:05', '2021-03-16 15:13:05', '2021-03-16 23:13:05', '2021-03-17 07:13:05', '2021-03-17 15:13:05', '2021-03-17 23:13:05', '2021-03-18 07:13:05', '2021-03-18 15:13:05']
  • Since the longest period of consecutive logins occur from 2021-03-16 to 2021-03-18, the answer would be
START END LENGTH
2021-03-16 2021-03-18 3
2021-03-13 2021-03-13 1
  • The problem stems from needing to award badges for consecutive logins in order to reward good behavior as demonstrated by a Supahands labeler

Expected Solution

  • You are provided wit a solution and test placeholder file, change the extension to reflect the language of the script you are using
  • Your solution should be inside the solution file, and your test should be inside the test file
  • Call the seed.py from the your script in order to generate a data pipeline for the processing code
  • Create a separate unit test for your script file to test the various scenarios presented in your script
  • DO NOT edit or amend the seed.py file
  • Include a separate readme in the form of a README.txt if additional instructions are required to get your solution running
  • Your solution should follow best practices such as DRY, KISS, YAGNI, SOLID etc.
  • IMPORTANT Your solution should consists of a solution file, a unit test file and a README.txt if necessary
  • Your solution will be rated for cyclomatic complexity, code maintainability, adherence to best practices, elegance of solution, defensibility and performance
  • Solutions that do not follow the submission instructions WILL NOT be considered

Assessment Criteria

  • Submitted code will be assessed based on the following criteria
    • Cyclomatic complexity
    • Maintainability index
    • Best practices
    • Elegance of solution
    • Defensibility of code
    • Optimization

Outputs

Our test script expects a stdout of the following format

START END LENGTH
2021-03-03 2021-03-10 8
2021-02-15 2021-03-18 4
2021-02-10 2021-03-12 3
2021-01-03 2021-01-03 1

software-engineering-test's People

Contributors

thomasaquinas-debug avatar prasadshunmugam avatar kaizenx 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.