Page 207 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 207

Sarabjit Kumar, Lovely Professional University                                 Unit 10: Coding Standards



                                 Unit 10: Coding Standards                                        Notes



             CONTENTS

             Objectives
             Introduction
             10.1  Common Errors
                  10.1.1  Synchronization Errors
                  10.1.2  Enumerated Data Types
                  10.1.3  String Handling Errors
             10.2  Structured Programming
                  10.2.1  Algorithms
                  10.2.2  Understanding the Algorithm
                  10.2.3  Top-Down Design Approach (Modularization)
             10.3  Programming Practices
                  10.3.1  Coding Standards and Code Reviews
                  10.3.2  Coding Techniques
             10.4  Summary
             10.5  Keywords
             10.6  Review Questions

             10.7  Further Readings

            Objectives

            After studying this unit, you will be able to:

               •  Explain the common errors
               •  Describe the structured programming
               •  Define programming practices

            Introduction


            Programmers use far more time reading code than writing code. Over the life of the code, the
            spends a considerable time reading it throughout debugging and enhancement. People spend
            considerable  attempt in reading code  because the code  is often maintained by someone.  In
            short, it is of prime importance to write code in a manner that it is easy to read and understand.
            Coding standards provide method and guidelines for some aspects of programming in order to
            make code easier to read. Most organizations that develop software regularly develop their own
            standards. In general, coding standards provide guidelines for programmers regarding naming,
            file organization, statements and declarations, and layout and comments. To give an idea of
            coding standards (often called conventions or style guidelines), we discuss some guidelines for
            Java, based on publicly available standards.
            Naming Conventions

               •  Names of variables in mixed case, beginning with lowercase.


                                             LOVELY PROFESSIONAL UNIVERSITY                                   201
   202   203   204   205   206   207   208   209   210   211   212