Developer Hint: String codes instead of actual strings

TLDR; Use string codes instead of actual strings even if you have only one language supported. For example, {{ "alex_panshin.hello_page.title"|trans }} is much better than {{ "Hello, world!" }} just because you are ready for i18n at every moment, it’s easier to change and find and this change is much less error-prone.

Triple Tags: Introduction

Triple tags (another popular name is machine tags) is a way to create very flexible taxonomy of everything without introduction of many entities.

Triple tags mechanic was created by Flickr to classify user’s photos in a different ways and to store this classification as simple as possible.

Return Null? Think Twice!

What does everyone’s code uglier? Actually, the only thing is code itself. Unnecessary code. The code that would not be written if the author of library I use thought about me, but not about his awesomeness.

Interfaces And Abstract Classes

Let’s talk about the most popular question in programmers job interview:

What is the difference between interface and abstract class?

Ok, the simple answer is that abstract class can contain some code, but interface contains only function or fields definitions. As for PHP, interface can define only functions.