Interview checklist




Code test - I

Please write a simple piece of code that, given an array of integers, calculates the sum of integers.  

Code test - II

Please write a primitive and naive PHP guestbook script by completing the PHP source file given. A guestbook is a page on a website where people can submit their comments about the site. It is a single web page that consists of a comment submission form and the list of previously submitted comments. Once the visitor submits the form, its contents are added to the storage using the provided API, and displayed on the page.

Take all the time you need and use the online PHP manual if necessary. The code does not have to be perfect; assume that your customer is a greedy idiot who doesn’t deserve a luxury solution.

You are provided with an API to a simple storage engine:

You are also provided with two HTML templates:


function addItem($object) { … }

function getItems($object) { … }

$t_item = <<<EOT

<div class=”comment”>

<div class=”comment from”>From: %s</div>

<div class=”comment body”>%s</div>



$t_form = <<EOT

<div class=”commentForm”>

<h1>Submit your comment here</h1>

<form method=”POST” action=”guestbook.php”>

<label>From: </label>

<input name=”from”/>


<label>Your comment:</label>

<textarea name=”comment”></textarea>


        <input type=”submit” value=”Send my comment”/>




On this page please write your implementation of the guestbook, continuing where the code on the last page left off.

Code test - III

On this page, please take notes and thoughts about the improvements you’d like to make to the guestbook you’ve written above, considering your real world experience, and discuss them with the interviewer. You are welcome to criticize the test and propose improvements.