Giter Club home page Giter Club logo

holyaff_test_task's Introduction

HolyAff coding test

This is a Django coding/knowledge test. You can run this either in docker, or not. This test is not about Docker, so if you are not familar, please just setup your environment however you normally would.

Please spend no more than 30 minutes on this test. Task 4 is optional, only do it if you have time left over. In all tasks, consider that this is in the context of a financial system, and data integrity and precision is of key importance.

Docker

The Dockerfile includes running of migrations, and then performing the test suite. So simply be in the root directory of the project, and run:

docker build .

Tasks

The project is simple, containing only 1 app with 2 models. It is a basic implementaion of a system where users can have accounts. Those accounts can have balances, and we wish to be able to track changes to balances by storing transactions.

There is already a basic deposit service written, allowing for an amount to be added to an Account, and a deposit Transaction created.

Task 1

The Transaction model is fairly basic, and some important information is missing. Make sure that whenever a Transaction is created, we store the time it was created.

Task 2

The accounts app has a tests.py, which has 2 tests, one of which fails.

Why does the test fail? How can you change the application to fix the test?

Task 3

The deposit service is quite basic right now, and not much could go wrong. But what risks are there with the way it's written? Imagine that it's possible for the creation of the Transaction to fail, what would happen in this case? What could you do to improve it?

Task 4

The perform_withdrawal service is unwritten. Implement a basic version of this service - no extra models should be required. What considerations might you need to make for this service, and how might you approach preventing any issues it might raise?

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.