Content deleted Content added
Adding local short description: "1978 book by Brian W. Kernighan and P. J. Plauger", overriding Wikidata description "book by Brian Kernighan" (Shortdesc helper) |
Srich32977 (talk | contribs) MOS fixes |
||
Line 54:
==Lessons==
Its lessons are summarized at the end of each section in [[Aphorism|pithy maxims]], such as "Let the machine do the dirty work":
# Write clearly
# Say what you mean, simply and directly.
# Use library functions whenever feasible.
# Avoid too many temporary variables.
# Write clearly
# Let the machine do the dirty work.
# Replace repetitive expressions by calls to common functions.
Line 69:
# Modularize. Use procedures and functions.
# Avoid gotos completely if you can keep the program readable.
# Don't patch bad code
# Write and test a big program in small pieces.
# Use recursive procedures for recursively-defined data structures.
Line 100:
# Make sure special cases are truly special.
# Keep it simple to make it faster.
# Don't diddle code to make it faster
# Instrument your programs. Measure before making efficiency changes.
# Make sure comments and code agree.
# Don't just echo the code with comments
# Don't comment bad code
# Use variable names that mean something.
# Use statement labels that mean something.
Line 125:
==External links==
*[http://www.softwarequotes.com/showquotes.aspx?id=574&name=P. J. Plauger selected quotes from ''The Elements of Programming Style'']
*{{YouTube|id=8SUkrR7ZfTA|title=Elements of Programming Style
{{DEFAULTSORT:Elements Of Programming Style, The}}
|