Journal: International Journal Of Advanced Studies In Computer Science And Engineering (ijascse)
ISSN Number:
0
Downloads
19
Views
Abstract
In system quality assurance, medical sciences, aviation and many other scientific fields, it is an accepted norm that prevention is better than cure. In other words, it is better to prevent errors than to spend valuable resources trying to unravel or fix such errors. In software engineering, the importance of defensive programming cannot be ignored. The concept of defensive programming emphasizes that a number of coordinated steps should be taken right from the software design stage in order to drastically reduce the possibility of system errors. Thus, defensive programming is a form of error-avoidance and vulnerability reduction mechanism. The current research is a study on the importance and practice of defensive programming in software projects. Particular interest is on a class of problems termed as multi-path error propagation. This is a scenario where a programming decision which has several possible options, and is dependent on the attributes of a given input parameter, leads to the propagation of system errors. Moreover, such an error could affect the overall system output, thus the need for defensive programming. Appropriate case studies and practical solutions were based on the three programming platforms - Java, C/C++ and Matlab.