Je découvre git bisect

HIer grâce à mon collègue à Yoast Aris Stathopoulos, j’ai découvert la commande git bisect.

En gros, cette commande est super utile pour débogguer notre code versionné. Et elle est encore d’autant plus utile si ce code versionné a eu de nombreux commits, a plusieurs branches, et qu’on ne sait pas exactement quand le bug a été introduit.

Je me sens comme un gros noob stupide de ne pas avoir connu cette commande plus tôt ????. Du coup, je vais configurer un dépôt spécial et la tester dès que possible.

Discovering git bisect

Today, thanks to my colleague at Yoast Aris Stathopoulos, I discovered the git bisect command.

Basically, this command is super useful to debug our versioned code. And it’s even more useful if this versioned code has had many commits, has several branches, and we don’t know exactly when the bug was introduced.

I feel like a big stupid noob for not having known about this command earlier ????. So I’m going to set up a special repository and test it as soon as possible.

The culture of searching

If there’s something I think is very useful for someone in a technical or creative field like mine, it’s the culture of searching.

The ability to first know the right sources of information, and to use them correctly. This is something that will really make the difference between a good software engineer, for example, and a very good software engineer.

Chasing the techno

Chasing the techno

In the same vein as my note from yesterday, I came across (as usual) an interesting tweet today.

This is a Tweet from Irina Shestak, in which she says she has been practicing JavaScript for a number of years; but she is getting more and more tired of having to follow the evolution of all the technos that appear around this language.

As I was saying yesterday, in software engineering, things move fast, very, very fast. And when you’re not focused, you find yourself wanting to try everything.

I’ve done that too. It was fun at first. Then it got harder.

And JavaScript is a very palpable example of that. Not a year goes by without new frameworks coming out. And clearly, the temptation to switch from one techno to another is very strong. It really is. Even more so when you see very influential people on the internet praising the merits of these new technologies.

It’s a loop that can quickly become toxic if you don’t handle it properly.

So as they say…

Tools are tools. Let’s not be tools.

And finally, this very relevant tweet from David Heinemeier Hansson

Sometimes you don’t need more tools

Sometimes you don’t need more tools. You just need to be less reliant on complexity.

Most of the time, we’re busy dealing with a lot of tools to get the job done. But sometimes that’s not what we need. We just need to look the other way and use simple things.

This is even more relevant in the field of software engineering where every day new tools are created. Always more interesting, always more powerful and with more and more functionalities.


I’m pretty sure I’ve written these words somewhere before. Apparently it’s not on this blog. I searched with the site’s search field (which is very powerful) without success.

Going live

I’ve been doing a big job redesigning my personal website segbedji.com for the last five weeks. It was one of the steps I undertook as part of the Irawo Taka program.

To tell the truth, I was more or less reluctant to push the new version of the site online. Performance is something I really care about. And I think it’s also important to keep things simple.

And on both these levels, the previous version of my site really suited me.

But in the end, I’m very satisfied with the results. I’ve just done some performance tests, and …. it’s not bad. Not bad at all. So we can say that it went well.

Test on GTmetrix
Test on Pingdom

Second réflexe: planifier des sauvegardes automatiques

Second réflexe: planifier des sauvegardes automatiques

On savait déjà que le premier réflexe, c’est de planifier les sauvegardes automatiques.

Et bien, c’est pareil pour le second réflexe: planifier les sauvegardes automatiques ?. Mon vendredi soir a été à quelques millimètres d’être ruiné, et je suis reconnaissant à moi même d’avoir mis en place un système de sauvegardes sur les plateformes de l’ADSC.

Enfin, j’ai quand même eu quelques minutes de paniques, mais mes sauvegardes étaient là pour me dire:

I got your back

The obsession of optimization

UPDATE: As of April 1, 2020, this site is no more running on Twenty Twenty theme. But I (almost once in a week) continue to seek for ways to make it more performant.

Cette note est aussi disponible en Français.


I am writing this note, previously in French, for the needs of my services page, which I recently created.


I wrote in an earlier note: The obsession of optimization [FR]. Today, I’m updating it.

So I’m obsessed with the performance of my site segbedji.com. Obsessed by its speed, its ranking in the main SERP, its security, etc…

This is a personal matter for me. Very personal. I present myself as a talented WordPress developer. It goes without saying that my site, built with this CMS should be a credible example of what I claim to offer!

I’m going to talk today (in issue 89 of my #DailyNotes ??) about the different things I’ve had to do, and continue to do on the site.

As I said before, my site has to be fast. Very fast. Excessively fast (well, within the limits of what is possible). So I had to opt for a WordPress lite theme that I could boost with a few tricks of my own.

The opportunity was too perfect with 2020, the new official default WordPress theme, coming with 5.3 (version for which I was part of the release team, coordinating the technical documentation).

2020 was designed by the excellent Anders Norén, and its development was coordinated by Ian Belanger. I myself made some fixes to the theme during the early stages of its development.

So I started with a child theme of 2020 whose source code is currently hosted on my GitHub account.

Pictures are usually one of the biggest resources on a website. So I’m careful to upload only images that have been optimized beforehand (size, weight). So I was more than happy when the automatic sizing feature for large images came with WordPress 5.3 (kudos to our dear Andrew for the work done on this).

Images are also converted to WebP format for further optimization. Also, I now only use it when strictly necessary.

Next to it, I have the excellent, must-have WP Rocket ? for site optimization. Basically, caching, preloading the cache, minimizing and compressing script and style files are provided.

I tested for a few weeks the image preloading feature, which I then left. This because WP Rocket adds a script on the site to manage it. One less script to load, which was going to deprive ?. Not me, that’s for sure. Also, Chrome natively supports preloading since a few weeks. So as soon as I have some time, I’ll contribute to the ticket opened by Morten on Core Trac to integrate it to WordPress.

Another aspect, the plugins. The popular belief is that the more active plugins you have on a WordPress site, the slower it is. That’s not exactly true. A site with 30 active plugins can be faster and more performant than one with 3.

I’ve limited the active plugins on the site to the bare minimum. The list can be found on my legal notice page.

I have also disabled comments on the site. So no more comment scripts to load (although this is not the main reason for this action).

Test on GTmetrix
Test on GTmetrix
WebPage Test
WebPage Test
WebPage Test
Pindom test
 PageSpeed Insights
PageSpeed Insights
PageSpeed Insights
PageSpeed Insights

PS: I noticed that some emojis are loaded in SVG since

w.org‘s servers, and that a script is added on all pages, even those that do not contain emojis. To be explored for later.

L’obsession de l’optimisation (2)

This note is also available in English.


J’écrivais dans une note précédente : L’obsession de l’optimisation. Aujourd’hui, j’en fais un update.

Alors je suis obsédé par les performances de mon site segbedji.com. Obsédé par sa vitesse, son ranking dans les principaux SERP, sa sécurité, etc…

C’est pour moi une affaire personnelle. Très personnelle. Je me présente comme un talentueux développeur WordPress. Il va de soi que mon site, construit avec ce CMS soit un exemple crédible de ce que je prétends offrir!

Je vais aborder aujourd’hui (dans le numéro 50 de mes #DailyNotes ??) les différentes choses que j’ai eu à faire, et que je continue de faire sur le site.

N°51 maintenant. Puisqu’hier j’ai eu la flemme de pousser cet article en ligne. Voir En attendant demain pour plus de détails.

Vitesse

Comme j’ai dit plus haut, mon site doit être rapide. Très rapide. Excessivement rapide (enfin dans les limites du possible). Il me fallait donc opter pour un thème WordPress lite que je pourrai booster à coups de petites astuces à ma sauce.

L’occasion était trop parfaite avec 2020, le nouveau thème par défaut officiel de WordPress, venu avec 5.3 (version pour laquelle j’ai fait partie de l’équipe de la mise à jour, en coordonnant la documentation technique).

2020 a été désigné par l’excellent Anders Norén, et son développement a été coordonné par Ian Belanger. J’ai moi même apporté quelques correctifs au thème lors des premières phases de son développement.

Donc je suis parti sur un thème enfant de 2020 dont le code source est actuellement hébergé sur mon compte GitHub.

Les images, c’est en général l’une des ressources les plus gourmandes sur un site. Je fais donc attention à n’uploader que des images au préalable optimisées (taille, poids). J’étais donc plus que ravi quand la fonctionnalité du dimensionnement automatique des grandes images est venue avec WordPress 5.3 (kudos à notre très cher Andrew pour le travail fait à ce niveau).

Les images sont aussi converties au format WebP pour plus d’optimisation. Aussi, je n’en utilise maintenant que quand c’est strictement nécessaire.

À côté, j’ai l’excellent, l’incontournable WP Rocket ? pour l’optimisation du site. En gros, cache, pré-chargement du cache, minification et compression des fichiers de script et style sont assurés.

J’ai testé pendant quelques semaines la fonctionnalité de preloading des images, que j’ai ensuite laissé. Cela parce que WP Rocket ajoute un script sur le site pour la gérer. Un script de moins à charger, qui allait s’en priver ?. Pas moi, c’est sûr. Aussi, Chrome supporte nativement le preloading depuis quelques semaines. Donc dès que j’aurai un bout de temps, je vais contribuer au ticket ouvert par Morten sur le Core Trac pour l’intégrer à WordPress.

Autre aspect, les extensions. La croyance populaire veut que plus on a d’extensions actives sur un site WordPress, plus celui ci est lent. Ce n’est pas exactement ça. Un site avec 30 extensions actives peut être plus rapide et performant qu’un autre avec 3.

J’ai limité au strict minimum les extensions actives sur le site. La liste se trouve sur ma page de mentions légales.

J’ai aussi désactivé les commentaires sur le site. Donc plus de scripts de commentaire à charger (bien que ce ne soit pas la raison première de cette action).

Test sur GTmetrix
Test sur GTmetrix
WebPage Test
Pingdom test

PageSpeed Insights

PageSpeed Insights

PS : J’ai remarqué que certains émojis sont chargés en SVG depuis les serveurs de w.org, et qu’un script est ajouté sur toutes pages, même celles qui ne contiennent pas d’émojis. À explorer pour plus tard.

Ah, il commence par devenir trop long ce post. Eh bien, on va s’arrêter là pour aujourd’hui. Demain je parlerai de comment je gère le référencement sur mon site.

En attendant demain

J’étais censé faire pour ce numéro 50 de mes #DailyNotes un super long post technique sur un sujet qui me passionne vraiment.

Alors je l’ai écrit le post (sur Keep depuis mon téléphone). Mais je suis grave flemmard ce soir (encore ??‍♂️). Flemme de le copier sur le PC, faire les corrections, insérer les liens et autres ressources nécessaires pour le post.

That said, ça fait demain. Pauvre numéro 50. Désolé ?.