HomeJob Application

Job Application

Application for a Position as PHP/MySQL Developer for RustyBrick

Below you will find several questions that will aid us in selecting the the most compatible developer for the position and the company. We are asking you to provide answers to a dozen questions under three main categories; contact information, work experience, and programming skills.

Please do your best to answer the questions below in a detailed and clean manner. We suggest printing out this application and working out the answers offline. Then, when you are ready, enter them in and submit. Thank you for your interest in RustyBrick and we look forward to your responses.

STEP 1. CONTACT INFO

First Name:
Last Name:
Phone:
E-mail:

STEP 2. WORK EXPERIENCE

Copy and paste your resume or email it to jobs@rustybrick.com:


Please list the site(s) you've worked on:


Please supply references:


STEP 3. PROGRAMMING QUESTIONS

Answer all questions in PHP unless indicated otherwise. If you do not know PHP, then we are not looking for you. Some questions can be answered by either a simple php function or by writing them out. I want to see BOTH.
  1. Given an array in which every element is of type integer. Write a function, hasDuplicates(), that determines if there are any duplicates.


  2. Given two strings $s1 and $s2. Delete from $s2 all of the characters that appear in $s1.


  3. Write a function, reverseArray(), that reverses the contents of an array and returns the new reversed array.


  4. Given the following database structure, write an SQL query to retrieve a list of order ids and their totals (including shipping amount). Only show records prior to June 1, 2021. Also, sort the results so that the newest orders are first. This should be written to work in MySQL. ANSI compliant SQL is ok too.
    HINT: requires GROUP BY statement or subselect
    OrdersOrderItems
    id
    date
    shipping_amount
    order_status
    customer_id
    id
    order_id (Orders.id)
    product_id
    price
    quantity

    The output should look something like this:
    +-----------+------------+
    | OrderID  | OrderTotal |
    +-----------+------------+
    | 13230   | $55.00   |
    | 54455   | $40.00   |
    | 59694   | $33.04   |
    | 39495   | $21.05   |
    | 59349   | $12.55   |
    +-----------+------------+
    



  5. A programmer successfully wrote the above query and returned the information in an array, $orders (Do not show the code for this). $orders is indexed, associatively, using the order ids. It's value is the amount of the order.
    Write a loop using foreach that outputs $orders in an HTML table (2 columns with headings). Add alternate line coloring using CSS classes.


  6. Write a JavaScript function isValidForm() that validates a form named "myForm". The function must validate that the field "email" is filled out, "checkTest" is checked, and "selectTest" has something other then the first option selected. The function should return true on success or return false on failure.


  7. Given the following database structure, write an SQL query to retrieve a list of the 5 most popular states that had orders.
    OrdersCustomers
    id
    date
    shipping_amount
    order_status
    customer_id (Customers.id)
    id
    first_name
    last_name
    city
    state

    The output should look something like this:
    +-----------+------------+
    | State     |  # Orders  |
    +-----------+------------+
    | NY        |  55        |
    | CA        |  40        |
    | NJ        |  33        |
    | FL        |  21        |
    | MO        |  12        |
    +-----------+------------+
    



  8. Using the above example, illustrate how you would query the data using Laravel's Eloquent (or similiar) ORM.


Connect With Us

Send Us a Message

Do you wish to give us feedback on one of our apps, send us a message or explore a proposal? Fill out the form below and we'll get back to you pronto!

Visit Us

250 West Nyack Road, Suite #200 West Nyack, NY 10994
Get Directions

Call Us Toll Free

877-GO-RUSTY
877-467-8789

Telephone

845-369-6869

Fax

845-228-8177