ABSTRACT

After learning about the programming statements in detail, we come to the task where the rubber hits the road and we need to get going. In this chapter we discuss the aspects of coding, debugging, and performance tuning. Coding is the activity of writing program statements in the proper order. In the present-day GUI programming, everything is tied to a form on which data controls are placed as required. Then we write code for all the events that need to be called to process the data. We program the procedure inside these events. We begin coding the procedure with the form-load event and finish with the form-unload event. The execution begins with the form-load event and we need to write the program exit statements in such a way that the program always ends with the execution of the form-unload event. Debugging is the process of removing errors from the program. Syntax errors are caught by the compiler, but logical errors and precision errors need to be ferreted out by us. So, we need to carry out testing. We need to test our programs using the white box testing technique, which involves stepping through every statement and traversing every branch of the control statements. After stepping through a statement, we need to verify the result, and if there is an error, we need to correct the code. Once all errors are eliminated from the program, we need to tune the performance. Performance of a program is measured in terms of response times in addition to delivering error-free results with the desired precision. We have a few tools that aid us in performance tuning. All these aspects are discussed in this chapter.