This article contains instructions, advice, or how-to content. Please help rewrite the content so that it is more encyclopedic or move it to Wikiversity, Wikibooks, or Wikivoyage.(March 2012)
Defensive programming is a form of defensive design intended to develop programs that are capable of detecting potential security abnormalities and make predetermined responses.[1] It ensures the continuing function of a piece of software under unforeseen circumstances. Defensive programming practices are often used where high availability, safety, or security is needed.
Defensive programming is an approach to improve software and source code, in terms of:
General quality – reducing the number of software bugs and problems.
Making the source code comprehensible – the source code should be readable and understandable so it is approved in a code audit.
Making the software behave in a predictable manner despite unexpected inputs or user actions.
Overly defensive programming, however, may safeguard against errors that will never be encountered, thus incurring run-time and maintenance costs.
^Boulanger, Jean-Louis (2016-01-01), Boulanger, Jean-Louis (ed.), "6 - Technique to Manage Software Safety", Certifiable Software Applications 1, Elsevier, pp. 125–156, ISBN 978-1-78548-117-8, retrieved 2022-09-02
and 24 Related for: Defensive programming information
Defensiveprogramming is a form of defensive design intended to develop programs that are capable of detecting potential security abnormalities and make...
extreme interpretations of defensiveprogramming, the two are not fundamentally in conflict. Rather, offensive programming adds an explicit priority of...
live. Defensive design in software engineering is called defensiveprogramming. Murphy's law is a well-known statement of the need for defensive design...
contract (DbC), also known as contract programming, programming by contract and design-by-contract programming, is an approach for designing software...
kinds of application programming languages that supports scripts which are often interpreted rather than compiled. Programming languages are the most...
analysis of source code in a programming project with the intent of discovering bugs, security breaches or violations of programming conventions. It is an integral...
process than for an interpreted language. Programming techniques such as programming style and defensiveprogramming are intended to prevent typos. For example...
precisely. Other notable applications include defensiveprogramming strategies such as EMC-aware programming. While a NOP slide will function if it consists...
Imhoff of the (US) National Safety Council. The program instituted a Defensive Driving Course (DDC). Defensive Driving Courses, along with Instructor Development...
narrower definitions of "unobtrusive": "Do not make any assumptions": Defensiveprogramming techniques should allow for the possibilities that JavaScript may...
or hijacking of session cookies Keystroke logging Cybersecurity Defensiveprogramming Hacking of consumer electronics Illegal number Principle of least...
and May 8, 1985. The program, called Defensive Publication Program, was replaced by the statutory invention registration program, which itself was discontinued...
A defensive wall is a fortification usually used to protect a city, town or other settlement from potential aggressors. The walls can range from simple...
deliberate defensive operation that the Soviets implemented to repel the German offensive is referred to as the Kursk Strategic Defensive Operation. The...
derivatives, in which the processor does two reads and one write cycle. Defensiveprogramming practice will generally avoid this problem by not executing read/modify/write...
In computer programming, unreachable code is part of the source code of a program which can never be executed because there exists no control flow path...
the maximum value in a[0...i-1], and i==n return m; } Following a defensiveprogramming paradigm, the loop condition i!=n in line 5 should better be modified...
(Lie-AH-too LAH-too; born December 31, 2000) is an American football defensive end for the Indianapolis Colts of the National Football League (NFL)....
Defensive gun use (DGU) is the use or presentation of a firearm for self-defense, defense of others or, in some cases, protecting property. The frequency...
Defensive vomiting refers to the use of emesis by animals to defend against ingested pathogens or against predators. Vomiting serves an evolutionary purpose...
for Wake Forest's defensive line Kobie Turner, a graduate transfer defensive lineman Wake's Turner gives profile of football program to incoming recruits...