Objective: Write Less Code
Everyone wants to write elegant code. That is, we want to do cool work with little code. The cooler the work is and the less code it takes us, the greater the ratio of elegance. If we can’t make our work cooler, it stands to reason that at least we can improve the elegance ratio of coolness to code volume by doing the same work with less code.
That’s a superficial reason, but there are more rational reasons to write concise code:
-
We’ll finish coding a working application more quickly.
-
We’ll have less code to test, to document, or to have peer-reviewed.
-
We’ll have fewer bugs if we have fewer lines of code.
It’s therefore an instinctive priority for programmers to eliminate any code they can, especially if ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access