Sample Test for Backend Developer

This is a question that I came up with based on real hands-on project and experience. The question is not really testing on someone’s ability to know the code syntax. but rather the approach to solving a common day-to-day technical problem. The questions do require backend knowledge and the open ended questions will allow candidates to show off their object oriented skills if they want.


1. Test candidate’s ability to understand complex and vague briefs which happens a lot.
2. Test candidate’s analytical and problem solving skills
3. Test candidate’s attention to details.
4. Test candidate’s understanding of web standards.
5. Test candidate’s proactiveness to suggest ideas and think out of the box.

The Brief:

A client approached us to create a social media campaign for the launch of their new energy drink. Let’s call the drink “powerhouse”. The client also advised they are on a limited budget.

The creatives met up with the client and came up with an idea.

The idea is to build a really simple competition webpage within the client’s website that encourages people to spread the news about the new product. Users arrive at the page and sign up a form. After a successful sign up, they get one entry for the competition. At that point, they also have an option to share the sign up link. Every successful sign up referred via the link will give extra competition entries to the original link poster. There is no limit to the number of entries that a person can enter. So the idea is: The more entries you have, the higher your chance to win the prize.

The prize is 100 bottles of powerhouse drink.

The top 10 person with the most entries will win the prize.


1. The new webpage is to be launched 3 months from today.
2. The duration of the competition will be 1 month from the day it is launched. After that, the webpage will be removed.
3. The webpage will consists of text, graphical elements and a sign up form.
4. The sign up form will consists of the following compulsory fields: First name, Last name, Mobile Number and Email Address.
5. When the form is submitted, the user will receive an EDM (Electronic Direct Mail) with an option to post a special link to the competition page from his/her facebook or twitter account.
6. When people arrive to the competition page via the special link and signs up the form. The original poster will get one more extra entry for the competition.
7. After the competition has expired, provide a list of winners to the client.

An Example:

1. Bob goes to the competition page and signs up the form. Bob gets 1 entry to the competition.
2. Bob receives an EDM encouraging him to share to his friends. Bob posts the news in facebook via a link from the edm.
3. Jane sees the news in facebook and clicks on the competition link.
4. Jane arrives at the competition page and signs up the form.
5. Now, Bob gets 2 entries and Jane gets 1 entry to the competition.


As a backend developer, write down your thoughts and/or provide pseudocode/diagrams if necessary.

1. What are your considerations to implement a secure form.
2. How would you trigger an EDM upon a successful form submit?
3. How would you track referrer form submissions as described in the requirements?
4. How would you provide a list of winners to the client at the end of the competition?
5. Describe how you would implement the form and all the backend logic associated with it. Feel free to suggest any tools or services that would help you to achieve that.
6. Do you foresee any problems with this competition prior launch? Do you think if there is anything in the requirements that deserves clarification?
7. Can you provide a rough estimate on how much time you will need to implement a workable backend solution based on the requirements?

phpstorm useful plugins and shortcuts

Useful Shortcuts 1. to open up preferences, “command + ,” 2. show file in project tree or anywhere, “fn + shift + f1” 3. code completion, “ctrl + space” 4. search everything, “shift + shift” 5. search class, “command + o” 6. navigate to line, “command + l” 7. generate getters and setters, “command + … Continue reading

Resize image upload into proportional dimensions using GD library

sometimes you want to manipulate images uploaded. A good way to do it is to resize the image to the max width or height, fill the background with transparency and yet keeping the same original width to height ratio. lets say we want a 300 x 300 pixel image.

symfony adding file image constraints to form

let’s say you want to constraint what people are uploading and you don’t want to use assert statements in the entity. you can do it in the formbuilder

Drupal 8 quickstart using composer

There are benefits of using installing drupal via composer. Forget about drush, let us use the drupal console to install the site. This is the symfony way. # let us configure the drupal command line ln -s /path_to_myproj/vendor/drupal/console/bin/drupal /usr/local/bin/drupal cd web drupal site:install [/php]

Best Vagrant Lamp Stack

imagine setting up a vagrant and playing around with the vagrant config file. boots up and some libraries are not working, dependencies not working…etc. thanks to scotch box, a vagrant lamp stack that just works

Docker Cheatsheet

Docker helps a lot in the dev process. If using windows or mac, need to use a vagrant vm that allows nfs. this will help u setup the vagrant. Once vagrant is up, shell in and run docker commands. Remember to port follow all the relevant application port in virtualbox. Here are some commonly … Continue reading


Continue reading

git push origin feature refspec error

If you try to git push -u origin feature/branch_name and you get this error “error: src refspec feature/branch_name does not match any”, it means that your local branch are not named correctly. It should be named feature/branch_name as well, not just branch_name. Do a “git branch” to confirm yourself.

Good online drawing tool

I think is pretty cool. what a gem. check it out.

Page 1 of 3612345Next Page »