A long cheatsheet for Redis

Setting up Redis: (on Ubuntu 16.04) Install Redis server apt-get install redis-server Enable Redis as service (start on system boot) systemctl enable redis-server.service Note:  The service configuration can be found at: /etc/systemd/system/redis.service There you can see that Redis will be running as user redis: User=redis Group=redis The Redis server will always restart after reboot: Restart=always…

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…

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….