Better Programming

Advice for programmers.

Follow publication

Member-only story

Code Readability or Performance: Which Is More Important?

Bikash Paneru
Better Programming
Published in
9 min readJun 24, 2021

a perplexed-looking woman and the words “performance?” and “readability?”
Base image by ospanali on unsplash

The discussion around the importance of code readability compared to performance has been floating around on the internet for a long time. However, it is difficult to come up with an objective answer.

So let’s try to analyze readability and performance in different contexts instead of trying to find an objective answer.

Let’s start with a question: Is this readable code?

- .... .. ... / .. ... / .-. . .- -.. .- -... .-.. .

This is actually Morse code that translates to “this is readable!” You might say that this is readable if you know Morse Code. Now, does it make sense to call this code unreadable if you do not know Morse code? Not really, because it is readable Morse code.

Now let’s apply this to software. Can you figure out what the following code does by taking a quick glance at it?

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Bikash Paneru
Bikash Paneru

Written by Bikash Paneru

Technology for Passion, Noodles for Hair and Junk for Food. https://mrdivinemaniac.github.io/

Responses (1)

Write a response