Developer Questions

PHP

When would you use the global variables for?

 

ex: global $my_new_variable

PHP

Is it a cookie a secure place to store information? What are the concerns?

PHP

What´s the difference between a GET and POST parameter?

PHP

What´s the difference between comparing with === and with ==

PHP

What does the operand % do?

PHP

What´s the difference between double quoted " " and single quoted ' ' strings?

PHP

Which PHP version would you recommend? and why?

PHP

Do you know what this constants apply/mean?

PHP

PHP_INI_USER

PHP_INI_SYSTEM

PHP_INI_PERDIR

PHP_INI_ALL

How would you implement a multithread program in PHP?

PHP

Given the error:

Undefined variable: entity_id 

File SageMigrateDestinationCommercePrice.inc, line 40

PHP

How would you investigate the issue?

SQL

How would you analyse performance problems in the database?

Which steps would you follow?

Given the table, how would you improve the following?
- The search by name is slow.

- The search by surname is slow.

CREATE TABLE AUTHOR (
  TITLE VARCHAR(10),
  NAME VARCHAR(40),
  SURNAME VARCHAR(100),
  CREATED DATE,
  PRIMARY KEY (NAME)
) ENGINE = INNODB;

What's a database transaction?
Which properties of the transactions do you know?

What's the difference between InnoDB and MyISAM?

What's the difference between truncate and delete?

Drupal

What´s the use of the "t" function in Drupal?

Drupal

What´s the purpose of the files[] configuration in the .info file of a module?

Drupal

What cache techniques are available in Drupal?

Drupal

Do you know what´s EntityFieldQuery and what´s its purpose?

Drupal

What´s the difference between an entity and a node?

Drupal

Do you know what the table 'system' contains in a Drupal installation?

Drupal

Explain the drupal bootstrap

Drupal

What does EntityFieldQuery return?

Drupal

What would you improve of Drupal?

Drupal

Object Oriented Programming

What are namespaces?

OOP

Can you define with your own words what´s an abstract class?

OOP

Do you know any difference between a Fatal error and an Exception?

OOP

What are the implications of a static property?


class test {

  public static $property;

}

OOP

Can you explain with your own words what´s "dependency injection"?

OOP

Can you explain with your own words what are test mocks?

OOP

Do you recognize the pattern?

class test {

  protected function __construct($params) {
    $this->params = $params;
  }

  public static function getTest($params) {
    static $object = NULL;
    if (!$object) {
      $object = new static($params);
    }
    return $object;
  }
}

OOP

Which error handling techniques do you know?

OOP

Given the left code.

Which check(s) would you use?

interface Migration {

  public function getId();
}

class NewM implements Migration {

  public function getId() {
    return $this->id ?: 0;
  }
}
function get_migration_id($obj) {
  # check 1
  if (get_class($obj) == 'NewM') {
    return $obj->getId();
  }

  # check 2
  if ($obj typeof Migration) { 
    return $object->getId();
  }

  # check 3
  if (method_exists($obj, 'getId')) {
    return $obj->getId();
  }
}
    

SASS

How would you compile SASS?

SASS

What's a @mixin?

SASS

What's a breakpoint?

SASS

What CSS does this produce?

SASS


.banana {
  border: 1px solid yellow;

  &-peel {
    display: none;
  }
}

What CSS does this produce?

SASS


.banana {
  border: 1px solid yellow;

  .unripe & {
    border: 1px solid green;
  }
}

What are %placeholders? How would you use them?

SASS

Dev Questions

By Gorka Guridi

Dev Questions

Dev Questions for developers

  • 433