Clear > Clever: Writing and Coding
An author might write a story with lots of twists that are meant to be exciting, but this can actually end up confusing readers more than it entertains them.
Why do we sometimes insist on making life hard for ourselves?
We’ve all been there.
Adding a bit more here, a little extra there, hoping it’ll make our work shine, but sometimes, less is more. In both coding and writing, clear and simple often beats complex.
Why Do We Like Making Things Complicated?
Sometimes, for people who write code or stories, making things complicated or “smart” can be tempting.
A coder sits down to solve the ‘FizzBuzz’ challenge: print numbers from 1 to 100, but with a quirk, replace multiples of three with “Fizz”, multiples of five with “Buzz” and if it’s both, that’s a “FizzBuzz”.
But then, there’s that coder who adds a touch of flair:
result = [f"{i}{'Fizz'*(i%3==0)}{'Buzz'*(i%5==0)}" or i for i in range(1, 101)]
Sure, it works.
But others looking at this code might need a moment…or two. It’s easy to get lost in such compacted expressions.
It’s not only in coding.
Writers too can make their narratives so twisted that readers feel like they’re in a maze, a plot that’s hard to follow can make readers set the book aside.
The point is, what’s clear to us can be a puzzle to someone else. This is where we see great software become troublesome or a good story become hard to grasp.
How do we fix this? Simplicity.
How Simplicity Makes Things Work Better
With the ‘FizzBuzz’ challenge, simpler solutions are often better. Consider this easy-to-understand alternative:
for i in range(1, 101):
if i % 3 == 0 and i % 5 == 0:
print("FizzBuzz")
elif i % 3 == 0:
print("Fizz")
elif i % 5 == 0:
print("Buzz")
else:
print(i)
It’s clean, it’s easy, it speaks for itself.
Ernest Hemingway got it right with ‘The Old Man and the Sea’. Not because he used flowery language, but because he kept it simple and straight to the point.
The same goes for brands like Apple, their designs are not about showing off, they’re about usability and clarity.
So, want to keep things simple?
Get a second opinion, you might be too attached to see the tangles in your work.
Try trimming the fat, can your work still stand strong without the extras?
Always think of the end user, would they understand easily?
Observe and learn from those who’ve mastered the art of simplicity.
It’s important to find a balance, simplicity isn’t just a design choice.
You want your work to be smart but not so tricky that it confuses people, the goal isn’t to show off how clever you are. It’s to share something that others can connect with and understand.
"2. Try trimming the fat, can your work still stand strong without the extras?"
We usually need to wait a day or two to revisit the work to provide better criticism. However, in reality, when we complete the first pass of the work, the Jira task is marked as DONE (QCs might have even completed their tests), and we don't have time to return and refactor the code.
The solution, in my opinion, is to communicate with the team leader or PM, indicating that if they want the code to become more maintainable, they should allocate more time so that developers can revisit and refactor the code.
Great post, by the way!