Why making mistakes is ok, especially when dealing with legacy code

Why making mistakes is ok, especially when dealing with legacy code

Team lead Matheus de Lara Calache is keen on his team making mistakes. Why, you might wonder? Surely you’d rather have no errors in your code at all? Then again, making mistakes is a learning experience from which you grow as well. So why not embrace them?

To introduce myself, I am the manager of a group of back-end developers and of two scrum teams consisting mainly of software engineers, product owners and designers. All of them focus on the B2B side of our organization, on agents. In this blog I will explain why I think making mistakes is ok.

The agents' side

Funda is a two-sided housing platform. Consumers who are looking to buy a house search via funda.nl, while agents looking to sell a house enter them via listings on funda.nl. My teams are responsible for the agents' side. This is where agents log in and manage their advertisements, listings, contact requests, and so on. It’s the critical side of the organization, the backbone, since it is they who are the paying customers.

Legacy code

At the moment we are dealing with a legacy challenge. We are working on code dating back more than a decade. This year, we plan to start building a brand-new system, using the best of our known technologies and being very critical with our architecture. This will enable easier expansion and maintenance and a long-term vision of our product.

Why making mistakes is ok

At times it is difficult for our developers to deal with the legacy challenge. Working on old code can be tough and my team is mostly trying to fix code so that it will not break while improving it and implementing new functionalities. But I don’t want them to worry about breaking things. In my opinion, making mistakes is ok, because:

1. Being vulnerable helps you grow

Making mistakes is the best learning experience ever. And sharing your mistakes with others helps you learn from each other, without stepping into a trap yourself. So, I try to create a safe environment for sharing. I invest in creating strong relationships, where we feel confident not only to share the challenges we face at work, but also to sometimes share situations from our private lives. Also, we have fostered a culture of always asking and offering if anyone needs a helping hand.

2. We are not saving lives here

Of course, we take our work seriously and we don't want our website to go down. Our system is very delicate, which causes all these fears. My team says to me: ‘I am afraid of touching this code, because what if it breaks?’ or ‘I am not sure how it works; we’ve never worked on this area. It is a monolith and probably if I touch this piece, errors will start, and have a cascading effect’.

See also: 5 reasons why we test our products as a team

But I don’t want them to feel that way. I tell them that if that happens, we might get some calls, but in the end, no one will die – and by stressing that, everyone is more relaxed if they do break some piece of code. But besides fixing bugs, I also stress that we do a risk analysis, thus mitigating the threats and taking advantage of new opportunities.

3. It stimulates your creativity

If you make a mistake you will need to find a solution to fix it. To solve a problem means you also need to be creative and experiment. That’s how you learn from making mistakes. And once the issue is resolved, you might even learn that the solution works better than it did before.

Another activity that is part of our culture is what are called spikes. Whenever we need to do an analysis, a proof of concept, or a deeper investigation before we start implementing the final solution, we timebox a task with this goal of discovery. This means that we first perform an exploratory task before we begin the real task. In that way we can explore different solutions and approaches to tackle the challenge. This helps us to get more knowledge, but it also leads to the most creative and best solution possible for the time being.

4. Work hard, play hard

Working on legacy code can be a challenge. That is why it is so important to keep my team motivated and to create an atmosphere where it is not only about work, but also about having fun together. By organising dinners, internal events, or conference trips, I try to create an informal atmosphere, where it is much easier to reach out to a colleague when you need help in case you make a mistake.

We also do smaller, ad-hoc activities, such as taking a short break during the day and simply going to ‘fundaplein’, our internal office square, to play table tennis or quickly prepare some snacks for the team. Or we play some board games or cards so we can recharge our batteries before we start a new challenge.

What’s next?

Making mistakes is ok. The main thing I try to do is to foster an open atmosphere where you feel comfortable sharing issues, challenges, progress and wins. The system we are working on right now was created with top-tier technologies, and it was a fine piece of art back then.

But now it is time to rebuild this core system, be innovative, and use the best resources from our cloud computing and newer technologies. This will be very exciting, and I truly believe it will be incredibly motivating for my team.

See also: Why having a mentor at work is a great idea

Great! Next, complete checkout for full access to Funda Engineering blog.
Welcome back! You've successfully signed in.
You've successfully subscribed to Funda Engineering blog.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.