"Pragmatic Programmer" Book 03

Chapter 4 pragmatic paranoia

  This chapter discusses a real problem, that is, a programmer can not write perfect code. Like our usual work, rarely perfectly meet the requirements, always more or less there are some unreasonable, irrational these programs let us not become perfect, but going to amend often require a lot of energy . Truly understand the effectiveness of programmers take advantage of this situation.

  Our pragmatic, then, often enough in prevention when coding, marking the error-prone code and books programmers will not trust even their own, will prevent more closely. The preventive can do is follow the contract design.

  Contractually our rights and responsibilities, in addition, provides consequences for non-compliance, were developed in accordance with the contract the two sides can benefit. DBC agreement as mentioned in the book, in order to ensure the correctness of the program, that is, before using the program to use a document recording program to do things. Each software system functions and methods are doing some things to do before you start, the contract will seek to find the corresponding miscellaneous conditions, including the pre-conditions and post-conditions, that is, demand and end, thus completing a contract.

  To be honest I really can not understand the meaning of these, on might use it in the future.

Guess you like

Origin www.cnblogs.com/limitCM/p/11070550.html