

Minimalism - Omit Needless Code - visitor4rmindia
http://www.two-sdg.demon.co.uk/curbralan/papers/minimalism/OmitNeedlessCode.html

======
makecheck
It's not just short words that count; simple words count too.

A 5-word sentence with words that nobody knows, communicates nothing (or at
least wastes time, as the dictionary is consulted).

The programming equivalent of this is to have a very good reason (and
compactness isn't one) for using an advanced language feature. If nobody knows
what the hell it does, and it isn't doing anything all that complicated, then
you've wasted everyone's time.

This is an interesting statement:

"Code is not written to be read by Everyman: it needs an audience, and will be
better off for having one in mind."

Well, yes it is written for the everyman. Organizations will have more average
programmers than good ones, and if you care at all about maintainability, you
will choose the path that is clearest (even if you are an expert).

Even if you can prove that a fancy solution is worthwhile -- and sometimes it
may be, for speed/etc. -- you're still generally making debugging more
difficult by hiding everything away, so it's a trade-off at best.

Take the article's for-loop example. The for_each() function is very hard to
debug, because the only logical breakpoint is inside the code that iterates.
And as a reusable object, that code could be run in _1000 other places_
besides the point of interest; if you needed to insert a logging instance for
just one case, you couldn't do it without affecting the 1000 other cases. With
a regular for-loop, there's an easy place to insert code for debugging _just_
that loop.

------
garnet7
Rule 17: Omit needless words! Omit needless words! Omit needless words!

------
edw519
How ironic, a 4136 word essay about minimalism.

~~~
baddox
I think the only things that need to be written about minimalism are examples
of it in action.

------
pshc
As always with this sort of writing the piece itself doesn't follow the rule
it sets: there are many needless paragraphs spent ranting about laptop battery
monitors.

------
pbhj
Clarity - Eschew Extraneous Obfuscation

