Interview test expected to complete in 2 hours

I had an interview test where I was given the following to complete in 2 hours (I was give a link to download a .zip file containing the skeleton files and logo and instructions). I was given not more than 3 hours to complete this project; yet expected to complete it in 2 hours. My question is: is this something I should be able to do in two hours?

— Recreate the supplied business card layout in /index.html using HTML/CSS.

— In /php/getData.php write a command to query the table “employees” for all records and output them as a JSON array.

— In /js/main.js write a script to make an AJAX call to retrieve all records from /php/getData.php

—Below the HTML business card, create a dropdown which lists all names from the database.

—When the value of the dropdown changes, it should populate the data in the business card.

1 Like

It is possible and will depend one what they provided you…however it may not be. They may also be checking how fast and accurately you work, so not completing may not be much of an issue.

thank you for the quick reply. I was thinking it could be that as well (checking for something other than completeness). Needless to say, I was overwhelmed and felt like giving up.

This took me 20 minutes: https://codepen.io/jenovs/pen/YBbgWr

Writing sql query in php shouldn’t take too long. So the main question is how difficult is the layout that needs to be implemented.

I’d say doable in two hours if all they want is the proof that you have some hands-on experience in mentioned technologies.

thanks for the quick reply! That’s awesome! Thanks for sharing.

the test files included a .php file. The instructions called for php to get data from database (they provided a .sql file to import to mysql). Then to use JSON to sparse the data; then to have javascript get the data from the php file and have the dropdown change the name. Just like you have it there but I don’t see a php / JSON /AJAX in the .js file. Unless all of the AJAX and JSON and PHP can also be in a .js file?

I didn’t have the sql file so I created an endpoint (using jsonbin.io) that returns JSON with some hard-coded data, but creating sql query shouldn’t take much longer.

I really doubt that php can be in a js file.

Yes doable in 2 hours especially if you can google.

If you are allowed to show the file via github please include the link. It’s good practice regardless of whether you get the job or not.

how do you think: how long it will take me to find a job just with java courses? and how hard it will be for me?