You are here
These are some of the most common questions I have been asked and ask myself on interviews for LAMP positions. I will update these questions and possibly answer some of them on my spare time.
Something important: If you mention knowing something on your resume, expect to be asked about it.
Note taking questions.
- Are you comfortable working on both Drupal 6 and Drupal 7?
- Are you stronger doing Drupal frontend, or Drupal backend?
- What you don't like about Drupal?
- Have you ever contributed a module to the community? If yes, for which modules?
- Are you familiar with CCK, Views, Panels, Features, Services? How have you used them before?
Full answer questions.
- In which language is Drupal written?
- What are Drupal hooks?
- Which hook would I use to define a new menu item and page callbacks? e.g. Say I need to register a new URL path that simply prints out "hello world!"
- How can I prevent SQL injection attacks in Drupal?
- If you write a SQL statement that refers to nodes, which function do you use to respect node access restrictions?
This tells me whether the person is aware of the existence of PHP. To me it matters and saves me time.
* Allow modules to interact with the Drupal core.
* Modules can implement a hook to extend Drupal.
By correctly using the database abstraction layer.
General Drupal Performance
- Name some modules that should not be enabled on a production server?
* Developer module (a.k.a Devel).
* DB logging module (a.k.a DBLog).
- What is the difference between a LEFT, RIGHT and INNER JOIN?
- What is an INDEX?
- What is the difference between a PRIMARY KEY and a UNIQUE KEY?
* LEFT JOIN returns items from the left table even if there isn't a match on the table that it is being joined to.
* RIGHT JOIN this is the opposite of LEFT JOIN
* INNER JOIN returns rows when there is at least one match in both the tables.
- In which language is PHP written?
- Given an array of unsorted vocabulary words, how would you sort this array by performing a Quicksort sorting algorithm?
- What's the idea behind type casting?
You can use the PHP sort() function.
Allows to change one type of data into another. e.g. An integer to string.
Object Oriented Programming (OOP)
- What are the major principles of OOP?
- What is the difference between an Abstract Class and an Interface?
- What is the difference between Public/Private/Protected class properties?
* Interface defines method signatures with no code or defined functionality.
* An Interface is not a class, is an entity.
* Abstract class can have both complete and incomplete methods.
* A class can inherit multiple interfaces, but only 1 abstract class.
* A class implementing an interface MUST override all the signature methods.
* Public class properties (a.k.a variables), are properties that are visible to all classes.
* Private variables, are variables that are visible only to the class to which they belong.
* Protected variables, are variables that are visible only to the class to which they belong, and any subclasses.
- How would you use Memcache?
- Are you familiar with Alternative PHP Caching (APC)? How does it work?
- Are you familiar with Akamai/Varnish? What does it do to improve performance?
- What is SQL injection?
- What is XSS?