Download presentation
Presentation is loading. Please wait.
1
PROGRAMMING METHODOLOGY
BY TUSHAR THOSAR PGT (Computer Science) HVF Avadi, chennai
2
SYNOPSIS Stylistic Guidelines Characteristics of a Good Program
Storage of Program Development Process Robustness Type of Errors Problem Solving Methodology and Techniques Documentation Program Maintenance
3
DO YOU KNOW ABOUT What is Programme ? What is Programming?
What is System? What is Software Design?
4
STYLISTIC GUIDELINES Developing good program is a skill and writing good program is a quality habit. This good habit can be developed by consciously following the guidelines. Meaningful Names for Identifiers Ensure Clarity of Expressions Use Comments and Indentation Insert blank lines and Blank Spaces Statement formatting Style
5
MEANINGFUL NAMES FOR IDENTIFIERS
Identifiers identify different parts of a c++ programs. Therefore, identifiers should have meaningful names Assign meaningful names for all identifiers viz. variables, functions and procedures etc. Do not use similar looking names e.g manage, manager. Always assign names to scalar constants when it helps in clarity and readability.
6
Ensure Clarity of Expressions
Expression carry out the specified actions. Thus they must be clearly understood by the users. There should not be any compromise with the clarity of expression. Avoid programming tricks whose intent will not be obvious to a reader. Never sacrifice clarity of expression even if changed (but unclear) expressions may get you minor gain in machine execution time. Use standard functions in expressions to enhance readability.
7
Use Comments and Indentation
Comments play a very important role as they provide internal documentation of a program. Indentation makes the statements clear and readable. Sometimes, comments and indentation are not used to save on program writing time, but remember, there should not be any compromise on readability and understandability. In c++ comments are given either by // and /* …….*/ brackets.
8
Insert Blank Lines and Blank Space
The insertion of blank lines and blank spaces at appropriate space also enhance the program readability. The blank lines are inserted to separate declaration blocks, comment boxes, procedures and functions etc. Normally, blank lines are inserted before label, const, type, var declarations. the blank space may be added before operators like +, - ,*, / and %, =, >, <, >= , <=, <> etc. and characters like /*, */ ,//, comma etc. to improve preventability and readability. Note: When program formatting is done to make a program more readable, it is called prettyprinting.
9
CHARACTERISTICS OF A GOOD PROGRAM
A program written in good style is easily understandable to a reader, therefore, is a good program. A good program not only efficiently solves the given problem but also itself well. Following are the characteristics of a good program. Effective and efficient. User Friendly Self- Documenting Code Reliable Portable
10
STAGES OF PROGRAM DEVELOPMENT PROCESS
A program development process is a step by step process where each stage contributes to building of an effective and efficient program. There are four stages in program development process as given below: Creak the problem Code the algorithm Compile the program Execute the program
11
ROBUSTNESS Even after taking all preventive measures, errors may still occur during program execution. This property of recovering following an error is called robustness. Definition: The ability of a program, to recover following an error and to continue operating within its environment, is called Robustness. The code which can handle exceptional data errors and operational errors is called Guard Code
12
TYPE OF ERRORS An error or called ‘a bug’ is anything in the code that prevents a program from compiling and running correctly. There are broadly three types of errors Compile-time errors Run- time errors Logical errors
13
COMPILE- TIME ERROR Errors that occur during compile- time, are compile-time errors Two of errors fall into category of compile-time errors. Syntax errors- Syntax refers to formal rules governing the construction of valid statements in a language. Semantics errors – Semantics refers to the set of rules which give the meaning of a statement.
14
RUN-TIME ERRORS Errors that occur during the execution of a program are run-time errors. These are harder to detect errors. Some run-time errors stop the execution of the program which is then called program “ crashed” or “ abnormally terminated”. Most run-time errors are easy to identified because program halts when it encounters them an infinite loop or wrong value is input.
15
LOGICAL ERRORS Sometimes, even if we don’t encounter any error during compile-time and run-time, our program does not provide the correct result. This is because of the programmer’s mistaken analysis of problem he or she is trying to solve. Such errors are logical errors.
16
PROBLEM SOLVING METHODOLOGY AND TECHNIQUES
The steps to creating a working program are: Understand the problem well. Analyze the problem to Identify minimum number of inputs required for output Identify processing components Design the program by Deciding step by step solution Breaking down solution into simple steps Code the program by Identifying arithmetic and logical operations required for solutions. Using appropriate control structures such as conditional or looping control structure. Test and Debug your program by Finding errors in it Rectifying the errors Complete your documentation Maintain your program.
17
SDLC ( SYSTEM DEVELOPMENT LIFE CYCLE)
The step to creating a working system are: System requirements Feasibility study System analysis System design System testing System implementation System maintenance
18
DOCUMENTATION Definition: Documentation refers to written descriptions, specifications, design, code and comment, internal and external to a program, which make a program more understandable, readable and more easily modifiable. Modules of Documentation Complexity of system Technical sophistication of user People involved in development and use Expected life of documentation
19
USER DOCUMENTAION( OR MANUAL)
General description Run flow and description Logic flow Program testing File descriptions Record layouts Output specifications File disposal Error messages Special run instructions Security considerations Restart and recovery procedures
20
PROGRAMMER’ S DOCUMENTATION
The programmer’s manual provides the technical part of the documentation. The technical documentation is of two types :– External documentation- The external documentation of a program consists of the written information that is outside the body of the source code. Internal Documentation- The internal documentation includes comments, self documentating code and program formatting (prettyprinting). “Prettyprinting refers to program formatting to make a program more readable”
21
USE OF DOCUMENTATION Facilities communication about an application between the technical development personal and non-technical. Useful for technical personnel not only during development, but also during operations and normal maintenance. Essential during abnormal or urgent maintenance Very helpful in initiating and training. Enables troubles shooting when the application system breaks down. Essential for both internal and external control. Ensure that all commitments and expectations are on records.
22
PROGRAM MAINTENCE Program maintenance refer to the modification of a program. There could be four kinds of maintenance. Corrective Maintenance Adaptive Maintenance Preventive Maintenance Perfective Maintenance
23
RELATED QUESTIONS What do you mean by syntax errors and Semantics errors? Why are logical errors harder to locate? (hot) What is echo printing? Why a program should have good presentation style. What are main error types? Which types are most dangerous and why? hot) What is the significance of documentation. Why is program maintenance considered very important?
24
ANY QUERIES ?
25
THANK YOU HAVE A NICE DAY
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.