The DRY principle: its cost explained with examples

I know what you are thinking: “Again a boring article on DRY? Don’t we have enough already?”. You might be right. However I see too many developers (junior or senior) applying DRY like they are doing some witch hunting. Totally randomly or everywhere they can. So apparently we never have enough DRY principle articles on Internet. A little reminder for those in the back who don’t follow: the DRY principle means “Don’t Repeat Yourself” and was first introduced in the The Pragmatic Programmer. »

10 min. read

PHP 7.2: the pitfalls to avoid for a better and cleaner code

What are the pitfalls to avoid with this new version of PHP and its new functionalities? As my previous article on PHP 7 scalar and return types pitfalls, instead of describing the new super cool features of this perfect PHP 7.2, I will describe what can be dangerous for the good health of your application. As Ward Cunningham stated it: “You know you are working on clean code when each routine you read turns out to be pretty much what you expected. »

6 min. read

10 tips to become a better web developer

I had a dream! This dream was to write an article with a title beginning by “10 tips to…”. I don’t normally like them so much (yes, they are often pure clickbait) but let’s face it, humans like lists. That’s why we have the ul tag in HTML. When I finished to write this article and I counted how many parts I had, I was so full of joy and love! »

13 min. read

How did I replace PhpStorm by Vim in my heart

I wrote an article some time ago in order to give you the most useful tips and tricks for my favorite php IDE, PhpStorm. Well, sorry PhpStorm, you were my favorite IDE. Things changed. I love another one now. Its name is Vim. Are you confused? Are you yelling “why”? What happened between PhpStorm and me? Why a PHP developer would use this… old smelly thing called Vim? I was happy with PhpStorm. »

13 min. read

The DateTime PHP object: how to use it efficiently?

When I search and read code about time and date problems, I noticed that a lot of people still use the old PHP functions like date(), time() or strtotime(). What about using DateTime instead? It is time to introduce this powerful PHP object. Datetime can do all the usual date and time operations you could ask for and even more. Using Datetime can save a lot of time when you have to do more complex operations on dates. »

4 min. read