Every developer who respects himself should, sooner or later, understand the tools he/she is working with work. And frameworks are not an exception. For those who don’t have the time to delve into the Laravel internals, here is a list of the main actions that take place every time Laravel is called (based on version…
Web Frameworks: The Laravel DI container
This is an overview about Laravel’s DI container ( Illuminate\Container\Container ) and its functionality. It is interesting to have a look since the logic behind most of the DI containers is more or less the same (not to be surprised. After all, the goal is the same, too.) (a) It is a singleton. There can…
Agile software development: back to the roots
I am sure that most programmers are nowadays familiar with the term “agile software development”. If it happens that you have experienced some “agile” methodology in a few companies and made a few discussions about this “agile” idea with programmers from other companies, you may have noticed the huge gap that many times exist between…
Design Patterns in Action: Decorator and SPL Iterators in AWS S3
My purpose here is to talk about the decorator pattern in SPL iterators. But since many people are not aware of how much the iterators are really used, I would also like to point out one of their use cases in real life. So, my starting point will be AWS Simple Storage Service (S3). For…
Design Patterns in Action: NodeJS rate limiter and promisification
Disclaimer: Here, I am not going to present some real-life example where promisification is used but I am gonna show you how to apply this pattern in a real-life example. The promisification is a necessity that comes from the asynchronous nature of Javascript whenever we need to make synchronous calls. Let’s assume that we want…
File Permissions: the painful side of Docker
The source of all evil: The whole issue with file permissions in docker containers comes from the fact that the Docker host shares file permissions with containers (at least, in Linux). Let me remind you here that file permissions on bind mounts are shared between the host and the containers (of course, there are also…
GraphQL: an offspring with good genes
GraphQL, as most new programming techniques (or styles or libraries), is trying for the last couple of years to find its place into the world of software development. The problem arises when people try to evaluate new techniques without taking into account the past of the relevant technological sector. Even when a new technique really…
MySQL and the UTF-8 disharmony
The problem: In case you may not know this, MySQL’s “utf8” is not the same as UTF-8 ! And, to my knowledge, this is happening in all MySQL flavors (MySQL, MariaDB, PerconaDB, etc). The “utf8” (also known as “utf8mb3”) encoding supports up to three bytes per character. The real UTF-8 encoding uses up to four…
Design patterns in action: Decorator and Redux Middlewares
Note: This article assumes that you have some basic knowledge of how Redux works. If there is a piece of functionality that we want to interject between the triggering of any action from a component and the service of this actions from a reducer ,we can use middlewares. Middlewares provide us a way to…
Design patterns in action: Builder and Symfony Finder
The Symfony Finder ( Symfony\Component\Finder ) is a component that, according to its documentation, can be used to “build rules to find files and directories”. This functionality includes a numder of optional parameters that can be used to construct the Finder object based on what files or directories we are looking for. The Finder uses…
Thoughts on static properties and methods
Static properties The implications: Static properties got a bad reputations because, as many other things in software development, people were using them without fully understanding their potential implications. Let’s see some of these implications in PHP, (trying to widen our view in other languages when required) so that we understand what are we talking about….
Handling enumerated values
From time to time we come across the need to define class properties that take values from a limited set of values. A set of values that rarely (or never) changes and when it changes it changes only manually (by the developer) and not as a result of the running application. Usually, these values are…