[Insight-developers] CLEAN CODE : 0x02
Luis Ibanez
luis.ibanez at kitware.com
Sat Apr 2 08:25:11 EDT 2011
"The next time you write a line of code,
remember that you are an *author*
writing for reader who will judge your effort.
You might ask: How much is code really read ?
Doesn't most of the effort go into writing it ?
...
Have you ever played back an edit session ?
(e.g. in Emacs or Vi)
...
The ratio of time spent reading vs. writing is well over 10:1.
We are *constantly* reading old code as part of the effort to
write new code.
Because this ratio is so high, we want the reading of code to
be easy, even if it makes the writing harder. Of course, there's
no way to write code without reading it, so making it easy to read
actually makes it easier to write.
There is no escape from this logic. You cannot write code if you
cannot read the surrounding code. The code you are trying to write
today will be hard or easy to write depending on how hard or easy
the surrounding code is to read. So if you want to go *fast*, if
you want to get done *quickly*, if you want your code to be easy
to write, make it easy to read."
"Clean Code"
'A Handbook of Agile Software Craftsmanship'
by Robert C. Martin
More information about the Insight-developers
mailing list