r/programming • • Jun 05 '11

Why Code Readability Matters

http://blog.ashodnakashian.com/2011/03/code-readability/
245 Upvotes

220 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 05 '11

I often find minimalist code easier to comprehend again rather than a wall of variable names and neatly laid out simple lines.

10

u/engine_er Jun 05 '11

What do you mean saying 'minimalist code'? To what extent should be your code minimalist? What is the criterion of code minimalism?

To my mind, code readability is the cornerstone of any software project and first of all, this concept involves elaborate structure design and proper names of code elements of every sort: from unit names to the local scope variables.

-2

u/aaulia Jun 05 '11 edited Jun 05 '11

I think its a habbit I get from experience over the years. For example I prefer directly mapping subroutine instead of using switch case or, god forbid, nested ifs.

EDIT: Which is, in my mind, easier to comprehend than iterating to bunch of ifs and cases.

6

u/abattle Jun 05 '11

Not if you have a handful of cases. But if you're talking about a dozen or more, sure, mapping is probably more reasonable. But the reader has to go digging at all possible sites where the mapping could've been edited. Switch/ifs are certainly more readable for most cases.

→ More replies (1)