mastercho / recruitment

A sample app with code that needs improving

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recruitment Exercise

Please review src/refactor-me.php which contains code that desperately needs improving. There are a number of bugs and design flaws in it that need addressing.

The task is to refactor this code so that it is functional and also much improved from its current state. Feel free to refactor as much as you like but we'd ask that you don't use a full framework for your test, though we're happy for you to pull in selected components/libraries. We want you to consider how the code can be improved; is it maintainable, how can it be made to adhere to best practice.

Note, to do well in this test you will need to refactor the code into multiple files. We would anticipate that a good submission should take no longer than 2-4 hours though better submissions are likely to be towards the end of that. If you are completing this and applying for a senior role we would expect some automated tests to be included with the submission.

To complete the exercise, please fork this repository and work directly in your fork. Once you've finished create a Pull Request back to this repository so we can view the diff.

Docker

We have included a docker setup to allow you to get up and running quickly with this example, though you are under no obligation to use this. After you have installed docker and forked the repository you will need to:

  • Run docker-compose up
  • The sample sql should automatically run
  • Visit http://localhost:8080 in your browser

Didn't manage to run on Docker as their site wont allow me to download package for Windows(might be temprorary issue). Just create new database named "customers" and insert the .sql file to make project work.

About

A sample app with code that needs improving


Languages

Language:PHP 95.0%Language:JavaScript 4.0%Language:Dockerfile 1.0%