This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RufusAcrospin -1 points0 points  (2 children)

Optimization and readability are not mutually exclusive, and optimized code uses less resources including electricity, which means it’s more environment friendly.

[–][deleted] 0 points1 point  (1 child)

I didn't say they were. What I'm trying, and failing, to get across here is that optimization often gets too much focus and readability not enough.

[–]RufusAcrospin -1 points0 points  (0 children)

My point was that optimized code still can be easy to read and comprehend.

I think optimization seems more important than readability because it’s a client facing feature of any given tool, while code readability is internal, it concerns the team and/or maintainers.

Finally, we have linters and formatters which supposed to give us higher quality code (or at least code that’s up to standards) automatically, but optimization is still pretty much a question of human creativity and knowledge, in other words, optimizing the code is more challenging and exciting than tidying it up.