TAILIEUCHUNG - Thinking in c volume 1 - 2nd edition - phần 2

Ngôn ngữ OOP áp đặt hạn chế ngữ nghĩa, thậm chí nhiều hơn nếu bạn nghĩ về nó thực sự là hình thức thử nghiệm. "Đây có phải là loại dữ liệu đang được sử dụng đúng cách? Đây có phải là chức năng được gọi là đúng "là các loại xét nghiệm đang được thực hiện bởi trình biên dịch hoặc hệ thống thời gian chạy | certain types of mistakes. OOP languages impose even more semantic restrictions which if you think about it are actually forms of testing. Is this data type being used properly Is this function being called properly are the kinds of tests that are being performed by the compiler or run-time system. We ve seen the results of having these tests built into the language people have been able to write more complex systems and get them to work with much less time and effort. I ve puzzled over why this is but now I realize it s the tests you do something wrong and the safety net of the built-in tests tells you there s a problem and points you to where it is. But the built-in testing afforded by the design of the language can only go so far. At some point you must step in and add the rest of the tests that produce a full suite in cooperation with the compiler and run-time system that verifies all of your program. And just like having a compiler watching over your shoulder wouldn t you want these tests helping you right from the beginning That s why you write them first and run them automatically with every build of your system. Your tests become an extension of the safety net provided by the language. One of the things that I ve discovered about the use of more and more powerful programming languages is that I am emboldened to try more brazen experiments because I know that the language will keep me from wasting my time chasing bugs. The XP test scheme does the same thing for your entire project. Because you know your tests will always catch any problems that you introduce and you regularly add any new tests as you think of them you can make big changes when you need to without worrying that you ll throw the whole project into complete disarray. This is incredibly powerful. Pair programming Pair programming goes against the rugged individualism that we ve been indoctrinated into from the beginning through school 68 Thinking in C where we succeed or fail

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.