Code Monkey home page Code Monkey logo

intern-test's Introduction

A simple test for new/future interns.

The goal of this test is that we can check if you have a basic understanding of coding.

In this project you will find the following Files/Classes.

commands.php
______________________________________________________
You can call this class in the terminal with the command below and it will run.
php command.php
App/Command/ImportCars.php
______________________________________________________
This class serves as an example class which imports all the car data from exampleCars.csv
App/Connector/Connection.php
______________________________________________________
This class is able to return a connection to your database.
Make the following variables are set correct for a connection to your database.

$serverName
$databaseName
$userName
$password
App/Files/exampleCars.csv
______________________________________________________
This file contains data for example import
App/Files/users.csv
______________________________________________________
This file needed for the assignment 1
App/Files/animals.xlsx
______________________________________________________
This file needed for the assignment 2
.gitignore
______________________________________________________
This avoids commiting unneeded files
.intern_test.sql
______________________________________________________
This contains the example database
Setup the enviroment.
  • Install php if not yet done so https://www.sitepoint.com/how-to-install-php-on-windows/

  • Install composer.

https://getcomposer.org/doc/00-intro.md

  • Import the database file, we should be able to expect from you how to do this.

intern_test.sql

  • Make sure $serverName, $databaseName, $userName, $password are set correct in Connection.php.

  • run composer install from your terminal in the root of the project.

  • run php commands.php in the root of your project. If everything is done correctly you should have 1000 cars in your database.

Notes
  • Your allowed to create as many files as you want.
  • Make sure you don't put any private info in.

Assignment 1

With all the example code you should be able to make a new table in the database called users. These users all have to be imported in the database. This also has to be done by calling php command.php

Use the example code and make sure not the break the other import.

Assignment 2

Import animals.xlsx using https://github.com/shuchkin/simplexlsx this is a composer package.

Install it using the following command. composer require shuchkin/simplexlsx If you can't get this to work, try to get a .csv file from animals.xlsx and import it the same way as you did at Assignment 1

Complete

  • You can call this assignment complete when all imports work when calling php commands.php

Deliverables

  • Make sure to include all needed files, don't forget the sql file.
  • Compile this project as a zip and mail it to your contactperson.

Bonus points

Make a pull request with your solution on this github repository.

intern-test's People

Contributors

joey-bolts avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

nwel12 glennyano

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.