Jeff Atwood: “the best code is no code at all. Every new line of code you willingly bring into the world is code that has to be debugged, code that has to be read and understood, code that has to be supported. Every time you write new code, you should do so reluctantly, under duress, because you completely exhausted all your other options.”
Robert Galanakis: “The fastest code is the code which does not run. The code easiest to maintain is the code that was never written.”
> it is only a small step to measuring "programmer productivity" in terms of "number of lines of code produced per month". This is a very costly measuring unit because it encourages the writing of insipid code, but today I am less interested in how foolish a unit it is from even a pure business point of view. My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.
Though of course "lines of code" in Dijkstra's essay is itself only a proxy, a line of Java code and a line of Perl code have fairly difference costs.
Sometimes the downswing from a single line is so dramatic, that such maxims are expressed... but don't take them too literally. Let's be real here.
There's already enough problems with companies considering their tech departments to be "cost centers" that don't result in direct revenue generation, therefore they don't respect the department enough, we don't need them thinking we're completely undesirable.
So what the heck is the point of labelling things "cost centers"?
You spend lines of code, to get functionality. Keep your expenses down, but nobody is saying they must be zero.
Of course you want to remove the tumor. Curing cancer is the goal. But each surgery is a liability; each scalpel cut you make may bring potentially fatal complications, so you strive to perform as few surgeries as possible while still saving the patient.
Rewarding LOCs is like rewarding the high number of surgeries a doctor had to perform on a patient in order to save him/her. It's backwards!
To get better at coding, I have to be prolific with writing code. Prolificity doesn't have to mean verbosity. Be prolific but do it succinctly. Code like Hemingway wrote.
(The irony in this post is apparent to me, thanks.)
Obviously that has limits, else the best MVP would be empty space.