From small work to experts 2019.11.17

The reading was the fourth and fifth chapters of this book are:

"Pragmatic paranoia" and "bend or break"

In the fourth chapter is a step of programming mode, the design (Design by Contract), I understand that each language is similar to the packaged function, through specific ways and means to mobilize the method in accordance with the contract, in accordance to the agreement, and more convenient and easy to manage.

For a crash program, do not be afraid, the courage to face it, the collapse of the program will not lie, it will tell you the wrong reasons and location, allow you to modify.

Use assertions programming style, every time after the completion of a program carried out by a variety of ways to call it, detect it, do not assert that it is right or wrong.

For a variety of resources in the program, to be reasonably trim, for a variety of resources are not utilized should be promptly closed, freeing up resources for other space programs, allowing maximum utilization of space resources.

Chapter bent or broken

Bent or broken, said the program is robust, if not well robustness, the program will appear soon issue and abandon.

Write a program to make the code there is a strong and inclusive, so that the adapter code more relaxed, more flexible and adapt to more conditions, rather than for a condition will collapse.

Guess you like

Origin www.cnblogs.com/cxy0210/p/11945443.html