How to replace conditionals with polymorphism
clean code refactoring open close polymorphismLet’s imagine your boss is coming one day and asks you to write some code to calculate the area of a rectangle.
You say ok, that’s easy, and you start first creating a class for a Rectangle
.
8 steps to start with Docker containers
docker container linuxDocker is used by almost everybody, from developers to sysadmins and architects, everybody is using it because is fast, clean and very easy to build, ship, and run distributed applications. In my older docker posts I presented the basics of Docker when it wasn’t so mature. Today I want to recap some of it’s functionalities and discuss more advanced technique that will help you start use Docker with more confidence.
MySQL cheetsheet
mysqlMySQL is one of the most popular sql databases, it is a powerfull, free open-source database management system that has been around for years. MySQL powers 9 of the 10 top Web sites worldwide, as well as thousands of corporate web-based applications. MySQL was designed and optimized for Web applications, that’s why it became the favorite choice for web developers.
Run PHPUnit on multiple PHP versions using Docker
docker phpunit phpOne of the biggest advantage using Docker is the ability to switch between tools versions. Personally I think the easiest way to demonstrate how you can benefit from this advantage is to run PHPUnit tests against different PHP versions.
Graceful restart php-fpm
php php-fpm modern phpPhp-Fpm allows for a graceful restart of child, usually with the reload keyword instead of restart on the init script.
subscribe via RSS