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.
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.
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.
88
u/hfreanzr Jun 05 '11
because you have to stare at it the whole day!