Clean Code
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability. General rules Design rules Understandability tips Names rules Functions rules Comments rules Source code structure Objects and data structures Tests Code smells …
What is Composer?
Good response = Composer is a dependency management tool/program for PHP …
What is TDD & BDD and how do they differ?
Good responses = TDD stands for Test Driven Development, BDD stands for Behaviour Driven Development. TDD is a way to determine that small sections of code are returning the expected results by writing tests up front that that match the required outcomes. Examples of this are Unit Testing, Integration Testing and Behavioural Testing (Bonus points if PHPUnit Selenium, Mink or Codeception are mentioned). BDD focus on testing the business behaviour of the application regardless of the underlying code. BDD Tests generally test a user flow through an application, rather than sections of code. (Bonus points if Behat, Selenium, Cucumber, Gherkin, Codeception or PHPSpec are mentioned) …
What is PHPDoc and why would you use it?
Good response = PHPDOC is a standard for commenting PHP code. Generally you want to use it to explain to other developers what a section of code is doing, or how it works. (Bonus points if they mention how it can be used to generate technical documentation) …
For the design patterns you have experience with – what circumstances would you use them, and why
This you might need to explain the best pattern design you are confident with for example mention ORM and explain the need of it and how did you use it …
Explain what some of the concepts of S.O.L.I.D are?
Single Responsibility principle (Class should only have a single responsibility) Open/Closed principle (Open for extension, but closed for modification) Likskov Substitution Principle (Objects should be replaceable with instances of their subtimes without altering the outcome. Bonus points if they mention design by contract ) Interface Segregation principle (Many client specific interfaces are better than one general-purpose one) Dependency inversion principle (Depend upon abstractions, not concretions) …
What are the advantages of dependency injection?
ideal response should include; Testability Configurability Reusability …
What is a return-type declaration?
Return type declarations allow to specify what type of value is returned from a function. (Bonus points if strict typing is mentioned) …
What are some of the design patterns you have experience with?
Good responses = Singleton, Factory, Strategy, Front Controller, MVC (Model, View, Controller), Dependency Injection, Repository, ORM (Object Relationship Mapper), Observer, …