Page 227 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 227

Unit 11: Coding Process



            Coding Standards Enforcement IS static analysis of source code for:                   Notes
               •  Certain rules and patterns to detect problems automatically
               •  Based on the knowledge collected over many years by industry experts

               •  Virtual code review or peer review by industry respected language experts – automatically.
            Standards enforcement includes SEI - CMM and ISO 9001. These efforts failed to deliver on
            their promise because they created stacks upon stacks of bureaucratic documents. There was
            no automation of processes– because of this the cost of implementation overwhelms the benefit
            of process implementation.
            The coding process of the software life-cycle is concerned with the development of code that
            will implement the design. This code is written is a formal language called a programming
            language. Programming languages have evolved over time from sequences of ones and zeroes
            directly interpretable by a computer, through symbolic machine code, assembly languages, and
            finally to higher-level languages that are more understandable to humans.

            The goal of the coding phase is to translate the design of the system into code in a given
            programming language. For a given design, the aim of this phase is to implement the design in
            the best possible manner. The coding phase affects both testing and maintenance profoundly. A
            well written code reduces the testing and maintenance effort. Since the testing and maintenance
            cost of software are much higher than the coding cost, the goal of coding should be to reduce the
            testing and maintenance effort. Hence, during coding the focus should be on developing programs
            that are easy to write. Simplicity and clarity should be strived for, during the coding phase.

            The different notations used to communicate algorithms to a computer. A computer executes
            a sequence of instructions (a program) in order to perform some task. In spite of much written
            about  computers  being  electronic  brains  or  having  artificial  intelligence,  it  is  still  necessary
            for humans to convey this sequence of instructions to the computer before the computer can
            perform the task. The set of instructions and the order in which they have to be performed is
            known as an algorithm. The result of expressing the algorithm in a programming language is
            called a program. The process of writing the algorithm using a programming language is called
            programming, and the person doing this is the programmer.
            Machine Language
            For the first machines in the 1940s, programmers had no choice but to write in the sequences of
            digits that the computer executed. For example, assume we want to calculate the absolute value
            of A + B − C, where A is the value at machine address 3012, B is the value at address 3013, and
            C is the value at address 3014, and then store this value at address 3015.
            It should be clear that programming in this manner is difficult and fraught with errors. Explicit
            memory locations must be written, and it is not always obvious if simple errors are present.
            For example, at location 02347, writing 101 instead of 111 would compute |A + B + C| rather
            than what was desired. This is not easy to detect.
            Assembly Language

            Since each component of a program stands for an object that the programmer understands,
            using its name rather than numbers should make it easier to program. By naming all locations
            with easy-to-remember names, and by using symbolic names for machine instructions, some of
            the difficulties of machine programming can be eliminated. A relatively simple program called
            an assembler converts this symbolic notation into an equivalent machine language program.
            The symbolic nature of assembly language greatly eased the programmer’s burden, but programs
            were still very hard to write. Mistakes were still common. Programmers were forced to think
            in terms of the computer’s architecture rather than in the domain of the problem being solved.


                                             LOVELY PROFESSIONAL UNIVERSITY                                   221
   222   223   224   225   226   227   228   229   230   231   232