Accessing securely production services with SSH port forwarding


We’ve already talked about how to deploy your public SSH keys into your server using Ansible and GitHub. This time, I just want to share a simple approach to have access to your production services (MySQL, Elastic, RabbitMQ, etc.) without exposing publicly your services. You have different alternatives, probably the most common are using a VPN or use SSH port forwarding. Let’s see an example of the last one.

Continue reading

Hola Carlos


Hola Carlos,

Hace poco oí hablar de ti en mi círculo de colegas frikis y me puse una de tus charlas sobre scrum, me pareció increíble que en tan sólo una charla de dos horas me quedara tan claro el concepto, los roles, etc, así que continué mirando tu blog etc. A día de hoy creo que he visto todo tu material online.

Ahora estarás pensando ¿qué quiere este capullo? jaja

Solamente agradecerte tu labor en la comunidad PHP, gracias a gente como tu, los menos seniors o los que nos encontramos en una empresa estancados podemos aprender grandes cosas. Lo mejor es que me abriste los ojos con tu pensamiento de, mientras el dinero no sea lo más importante, preocuparte de aprender lo máximo.

Sin nada más que añadir, solo darte las gracias de nuevo, eres un crack, un ejemplo a seguir sin duda, ojalá algún día coincidamos en algún sitio.

Un saludo!

“Domain-Driven Design in PHP” (@dddbook) is finished


Today, Keyvan, Christian and me are very happy to announce that “Domain-Driven Design in PHP” book is 100% complete. 380 pages and around 1400 readers so far.


Thanks, thanks, thanks.

Thanks to everyone that has supported us in this project.

Thanks to Christian and Keyvan. We don’t need words to understand each other.

Thanks to our families and friends. Love is what you need to keep pushing.

Thanks to Edd Mann for helping at the beginning with the language implementation details ;).

Thanks to Matthias Noback for his suggestions and his foreword.

Thanks to Vaughn Vernon for being pragmatic and inspiring.

Thanks to Ricard Clau, Albert Casademont, Victor Guardiola and Jordi Abad for your contributions.

Thanks to Natalye Childress for non stopping asking about uppercase or lowercase. With your work, the book can be read.

Thanks to everyone that committed fixes, you are great: Jonathan Wondrusch, César Rodríguez, Yannick Voyer, Oriol González, Henry Snoek, Tom Jowitt, Sascha Schimke, Sven Herrmann, Daniel Abad, Luis Rovirosa, Luis Cordova, Raúl Ramos, Juan Maturana, Nil Portugués, Nikolay Zujev, Fernando Pradas, Raúl Araya, Neal Brooks, Hubert Béague, Aleksander Rekść, Sebastian Machuca, Nicolas Oelgart, and Marc Aube.

Continue reading

Event Sourcing is not a messaging integration pattern

Different Architectural Styles

tl;dr: If you are sending messages to RabbitMQ to communicate one application to another, you are not doing Event Sourcing. You’re just doing messaging ;)

In the last two months, I’ve seen different nice talks using DDD, CQRS or Event Sourcing in the talk title. However, after watching the content, I think there are some general misunderstandings about some of the concepts. The most important one, in my honest opinion, is calling Event Sourcing to sending messaging to other applications using a broker. Event Sourcing is not about that. Let me explain a bit more.

Continue reading

Some “basuritas”: PHP, list() and objects

I was just playing around with the Symfony Expression Language Component. Suddenly, I started to play with list() and some objects and this example came up. You can use list() and $this for assigning fields. I would not recommend it, but it just funny.

class BasuritasTest extends \PHPUnit_Framework_TestCase
     * @test
     * @dataProvider validUsersDataProvider
     * @param $id
     * @param $name
    public function listForObjects(int $id, string $name)
        $user = new User($id, $name); 
        $this->assertSame($id, $user->id());
        $this->assertSame($name, $user->name());

    public function validUsersDataProvider()
        return [
            [1, "Carlos"],
            [2, "Christian"],
            [3, "Keyvan"],
            [4, "Ricard"]

class User
    private $id;
    private $name;

    public function __construct($id, $name)
        list($this->id, $this->name) = [$id, $name];

    public function id() : int 
        return $this->id;

    public function name() : string
        return $this->name;

The interesting thing is the line 34. The output:

PHPUnit 5.4.8 by Sebastian Bergmann and contributors.

....                                          4 / 4 (100%)

Time: 56 ms, Memory: 4.00MB

OK (4 tests, 8 assertions)

That’s it. Happy Friday.

What happens if we don’t do it? – 4 ways to speed teams up


I became Certified Scrum Master (CSM) on 2010. I took a CSM course at beautiful Oporto. My instructor was Mitch Lacey ( Amazing instructor. If you can attend any of his courses, go ahead. On 2012, he published an amazing book about Scrum, I totally recommend, “The Scrum Field Guide: Practical Advice for Your First Year” ( So practical, so full of examples to understand how to properly apply Scrum and get most of it.

During the CSM training session, when talking about INVEST ( in your product backlog, value of User Stories and priorities he said, “the first question to ask yourself about a user story, task or process is what happens if we just don’t do it?”. Everyone laughed. Not doing something useless you were supposed to do, it’s a high productive activity.

The more I meet teams, project managers, developers, sysops, etc., the stronger my feeling is that we always try to improve things adding stuff not removing waste. More process, more abstraction, more code, more tools. My recommendation is that the best way to speed teams up is to remove useless or low value things. Let’s see some suggestions.

Continue reading

Hi @xing_bcn and @xing_de!


After leaving Atrápalo, it’s time to jump to a new challenge. As I explained, I need to get out of my confort zone and check other things that will make me learn new things. Some of you already know, but for the rest, the chosen company is Xing. So, I’m more than happy to announce that I’m the next B2B Head of Engineering at @xing. I’d like to share some thoughts about the reasons that took me here.

Continue reading

Adiós Atrápalo


Después de más de 2 años trabajando en Atrápalo, ha llegado el momento de partir a nuevos horizontes. Los que ya me conocéis un poco sabéis cómo soy: llegar, simplificar y marchar. Mis objetivos se han cumplido y es hora de ayudar a otros equipos. Después de estos dos años, Atrápalo es una compañía respetada técnicamente por la comunidad de Barcelona. En 2015, consiguió se le premiara por esa evolución.

Cada integrante del equipo técnico ha hecho un trabajo increíble adoptando las nuevas dinámicas y prácticas de trabajo, tanto en desarrollo, UX y Sistemas. Casi siempre, un equipo grande es una desventaja, normalmente es lento, pero me ha sorprendido cómo un equipo de casi 100 personas, aplicando Scrum, eXtreme Programming y otras buenas prácticas ha conseguido reducir deuda técnica muy rápidamente. Lo que me lleva a la frase que repito entre amiguetes: “There is no legacy code, just legacy teams”.

Continue reading