## Symfony REST api : validating data that will be stored in different entities

REST is great. But, most of the time, it is quite hard to think your web services architecture in a way that each WS is stateless. Let’s think about a common use case. The problem If you have to design a personal data form and wish to ask the user to complete some fields such as the name, the firstname, the birthdate, and two addresses with, for each, an addresse, a city, a zipcode, and a country. [Read More]

## L’état des projets informatiques en 2015

Le rapport Big Bang Boom publié en 2014 par le Standish Group met en exergue de façon très pragmatique la principale cause de l’échec d’un projet informatique :

A Big Bang theory for software and information technology projects is that everything needs to come together at once to have a working solution that is universal to all stakeholders.

Il explique, notamment, que sur un panel représentatif de projet IT :

• 42% échouent purement et simplement;
• 52% ne répondent pas aux contraintes imposées (coût, délais, qualité, périmètre, etc.);
• 6% seulement réussissent.

Par ailleurs, ce même institut fait une analyse plus globale de l’évolution des projets IT au fil du temps dans son fameux Chaos report.

On y constate que la réussite d’un projet informatique est un challenge que peu d’entreprises réussissent.

## Utiliser un listener de test avec PhpUnit

Si vous avez déjà utilisé PHPUnit, vous avez forcément en tête la succession de points qui s’affichent dans la console pour signifier que les tests passent. Sans doute aussi avez-vous l’habitude de vous ronger les ongles de peur qu’un joli F rouge apparaisse. Avec PHPUnit, cette sortie de console est gérée par un listener qui implémente l’interface :

PHPUnit_Framework_TestListener


Pour rajouter des listeners à ceux implémentés par défaut, il suffit donc de créer une classe qui implémente cette interface et de déclarer votre listener directement dans le fichier de configuration PHPUnit : phpunit.xml(.dist) Voici un exemple concret.

## As a developer in 2016, you need to learn Emacs (or Vi)

How to improve your productivity writing code and force yourself to think twice.

This post is not another Emacs vs Vi troll. My point is to explain why (deeply) learning to use a low level text editor is one of the first things any software engineer should do. I have personally chose Emacs because I found common shortcuts easier to memorize. As you will see later, it doesn’t matter which one of those editors you like to use, as long as you have learned to use it.

Editors like Emacs may seems old but they have been thought to be productive tools. Shortcuts are optimized with your hands place on the keyboard and the most used key. They let you do your work as quickly as you can think about it but still, they force you to think about what you’re doing. Not only they let you learn how to be more productive, they make you understand what you do instead of writing code with crappy CRLF.

If you have ever add to work with docker and and docker-compose, you probably often have mistaken in you Dockerfile. Specially when you work with multiple container build from multiple Dockerfile and tag differently. Here is a simple way to clean all your docker images. Show images : {% highlight sh %} $docker images {% endhighlight %} Delete all container : {% highlight sh %}$ docker rm \$(docker ps -a -q) {% endhighlight %} [Read More]