3 ms·
I guess a good place to start looking for a definition of readable would be Peter Norvig's Rule of English Translation[0]. 1. Start with an English descripti
by malisper 12y ago
I guess a good place to start looking for a definition of readable would be Peter Norvig's Rule of English Translation[0].
1. Start with an English description of algorithm
2. Write the code from the description
3. Translate the code back into English
4. Compare 3 to 1
Code that is easily translated to an English is probably the closest we can get to readable code.
As a side note, this entire discussion of what makes good code is making me think of this[1].
[0] https://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf https://www.cs.umd.edu/~nau/cmsc421/norvig-lisp-style.pdf
[1] https://twitter.com/paulbaumgart/status/571788242174918656 https://twitter.com/paulbaumgart/status/571788242174918656