知識社群登入
位置: CS101 > 討論區 > 討論
介紹ㄧ本 很不錯的 程式設計的書
1樓
書名:程式設計型態

原文書名:Programming Style

書的後面,有程式設計守則。

ㄧ 寫清楚你的企圖,不要太過聰明。
Write clearly, don't be too clever.


2樓
3樓
http://users.erols.com/blilly/programming/The_Elements_of_Programming_Style.html

SUMMARY OF RULES

This summary is designed to give a quick review of the points we covered in the book. Remember as you read the rules that they were presented in connection with one or more examples – go back and reread the pertinent section if a rule doesn't call them to mind.

To paraphrase an observation in The Elements of Style, rules of programming style, like those of English, are sometimes broken, even by the best writers. When a rule is broken, however, you will usually find in the program some compensating merit, attained at the cost of the violation. Unless you are certain of doing as well, you will probably do best to follow the rules.

Write clearly - don't be too clever.

Say what you mean, simply and directly.

Use library functions.

Avoid temporary variables.

Write clearly - don't sacrifice clarity for "efficiency."

Let the machine do the dirty work.



4樓
http://en.wikipedia.org/wiki/The_Elements_of_Programming_Style

The Elements of Programming Style, by Brian W. Kernighan and P. J. Plauger, is a study of programming style, advocating the notion that computer programs should be written not only to satisfy the compiler, but also with human readers in mind (especially software maintenanceengineers).

The book pays explicit homage, in title and tone, to The Elements of Style, by Strunk & White.