Increase web server performance: we put nginx in front of apache

In one of the notes we described how to configure nginx + php-fpm. But nginx can be used in a slightly different way. For example, if you don't want to completely abandon apache, but you want to speed up the web server. (Perhaps you have implemented a complex redirect system that you don't want to port to nginx).

In this case, a possible solution is to use nginx only for serving static files (images, css, js, etc.). Other requests (to the php engine, for example) will still be redirected to apache (assuming you already have a site configured to work with it). To do this, configure nginx to serve static files, and proxy all other requests to apache. (In this case, you can do without php-fpm).

Localization of numeric/monetary data

When developing a medium to large project, there is a problem with localizing numeric/money data. In this note, I will talk about the difficulties of using the Symfony framework, Sonata Admin Bundle, and the client-side. But first, let's discuss the essence of the problem, as it is not very obvious at first glance.

So, let's say we have a project that renders numeric/money data on the server side (php/template engine). They should be displayed according to the set locale. The user can enter data (in their own representation). At the same time, the data can be processed on the client side (javascript). For example, in most European countries, except for the UK and Ireland, the decimal separator is a comma while in the UK and Ireland it is a period. Naturally, a user from Germany will enter data with a comma separator.

Geniuses and Outsiders. Why some have everything and others have nothing - Malcolm Gladwell

About the book "Geniuses and Outsiders. Why some have it all and others have nothing" by Malcolm Gladwell, I found out by accident, from the comments on geektimes. I decided to share my impression by writing a short review.

Firstly, I must say that this book is not a universal guide "how to achieve success". On the contrary, the book talks about how difficult everything is in this world (which, by the way, may only be doubted by constant reposters of "success diaries").

First of all, it discusses the enormous influence of the environment on great personalities. No, don't think that they were just lucky. In reality, it's not enough to just have the necessary set of personal qualities, just as it's not enough to simply end up in a favorable environment. All of this has to happen simultaneously. The author analyzes the personalities of Bill Gates, Bill Joy, and others, provides historical examples.