Software Dev

Clarity is (even) more important than brevity

I have published a post or two about the powers of brevity. But we programmers sometimes take it too far.

Can someone tell me what these integers represent?

case upc(Int, Int, Int, Int)

No? Me either.

This is how associated values are pretty much always done in Swift. But thanks to this post by Marco Eidinger via iOS Dev Weekly, I discovered something new and clarifying: it turns out that you can actually label your enum’s associated values too. People just don’t do it for some reason. 🤷🏻‍♂️

Can you tell me what the integers represent now?

case upc(numberSystem: Int, manufacturer: Int, product: Int, check: Int)

Isn’t that a little easier to understand?

I run into the assumption sometimes where people mistake brevity for efficiency. Brevity shouldn’t mean sacrificing valuable context for slightly fewer words. Thanks to the Marco Eidinger post for pointing this out explicitly. 👍

Clarity is more important than brevity.

Marco Eidinger
Quotes

“Noise is the enemy, clarity the goal.”

It’s cool that Jon Stewart is back with a new show. And it’s really cool it’s on a streaming service that I already have. 😛

In this interview, he’s is talking about doing his new show in a deeper and more focused way than he did The Daily Show, which was funny but all over the place.

In the interview, a really cool quote popped out to me.

 Noise is the enemy, clarity the goal.

Jon Stewart

It seemed so succinct and true. And probably applies to more than just TV shows. 🤔

Via Apple news.