Consistency as key to success

Written on 30 May, 2024.

Consistency is key to success. We've all heard it, right? But how do you actually achieve it? I've found that having strong opinions and sticking to conventions is a great way to start.

One of the things I loved about Go from the beginning was its built-in formatter, gofmt. It seems I'm not alone because Rust and Deno have similar tools.

Why does this matter? Well, I've seen countless hours wasted on arguing about tabs vs spaces (seriously, people?), where curly braces should go, and how to write git commit messages.

Ain't nobody got time for that!

Take a look at this commit. It's supposed to remove a <div>, but the real change is buried among ' becoming " and other style changes.

This doesn't apply to coding though, it can be a philosophy for every little decision you make during your day.

We want consistency, and conventions give us that. As Steph Ango puts it, "Every time you reuse your style you save time."

So, what can you do?

Important note: Don't let conventions become a straitjacket. Make exceptions when needed. And if there are too many exceptions, it's time to change the convention. They're not set in stone.

logo

I'm Antonio, a software engineer with a passion for distributed systems and clean maintainable software.

Currently co-founder of Warden Protocol.

I first got into blockchains working at Emeris for Ignite (previously known as Tendermint).

Before that, I started a meetup group called pisa.dev, and I was among the first engineers for projects such as Traent and Zerynth.