Question

In: Computer Science

Describe defense in depth.

Describe defense in depth.

Solutions

Expert Solution

I will explain defense in context of programming. Hope I have understood your question well.

Defensive programming is a mindset to write your code in such a way that it is hard to use it not in the original intention of the code. In simpler terms, it prevents malicious use of the code.

For example, in OOP, you don't want to return a (non-const) reference to your member variable because if you do, anyone could change the state of the object and most likely, this is not what your original intention is.

Another example: When you want to access element in an array, you will check if the index is a valid one (i.e. -1 < index < size of array) before you actually making a call to access the element.

Without defensive programming, your code will still run under normal condition/input but it is really easy to break it or make it to do something that's not intended to happen in the first place.


Related Solutions

Explain the intent or meaning of the phrase “defense in depth”, especially noting what the three...
Explain the intent or meaning of the phrase “defense in depth”, especially noting what the three key elements of defense in depth are and providing an example of a failure in each domain. Define defense in depth: Domain 1: Domain 2: Domain 3: Failure in Domain 1: Failure in Domain 2 Failure in Domain 3:
Match each component with proposed strategies/elements of a framework for Defense-in-Depth security. Word bank: Risk management...
Match each component with proposed strategies/elements of a framework for Defense-in-Depth security. Word bank: Risk management program Cyber security architecture Physical security ICS Network Architecture ICS Network Perimeter Security Host security Security monitoring Vendor management The human element Defense in Depth Strategy Elements 1. Standards/ Recommendations Policy Procedures 2. Patch and Vulnerability Management Field Devices Virtual Machines 3. Common Architectural Zones Demilitarized Zones (DMZ) Virtual LANs 4. Firewalls/One-Way Diodes Remote Access & Authentication Jump Servers/Hosts 5. Field Electronics Locked Down...
Match each component with proposed strategies/elements of a framework for Defense-in-Depth security. Word bank: Risk management...
Match each component with proposed strategies/elements of a framework for Defense-in-Depth security. Word bank: Risk management program Cyber security architecture Physical security ICS Network Architecture ICS Network Perimeter Security Host security Security monitoring Vendor management The human element Defense in Depth Strategy Elements 1. Standards/ Recommendations Policy Procedures 2. Patch and Vulnerability Management Field Devices Virtual Machines 3. Common Architectural Zones Demilitarized Zones (DMZ) Virtual LANs 4. Firewalls/One-Way Diodes Remote Access & Authentication Jump Servers/Hosts 5. Field Electronics Locked Down...
Describe how infants perceive depth and describe the visual cliff experiment.
Describe how infants perceive depth and describe the visual cliff experiment.
Name and describe the body’s three lines of defense for immunity. Name and describe the five...
Name and describe the body’s three lines of defense for immunity. Name and describe the five major types of white blood cells. What are their lab values? Local inflammation generally produces what classic signs? Describe the multistep process of inflammation.
Please describe, in depth, the human capital of Petco and PetSmart.
Please describe, in depth, the human capital of Petco and PetSmart.
defense mechanism, adaptive defense mechanisma, maladaptive defense mechanism
defense mechanism, adaptive defense mechanisma, maladaptive defense mechanism
Describe the 3 levels of defense mechanisms. Describe the importance of mast cells, complementary proteins and...
Describe the 3 levels of defense mechanisms. Describe the importance of mast cells, complementary proteins and phagocytes in inflammatory response. Why is the lymphatic system important for the immune system?
Describe the 3 levels of defense mechanisms. Describe the importance of mast cells, complementary proteins and...
Describe the 3 levels of defense mechanisms. Describe the importance of mast cells, complementary proteins and phagocytes in inflammatory response. Why is the lymphatic system important for the immune system? Please, type the answers
Describe the in-depth pathophysiology of a STEMI including all cellular changes.
Describe the in-depth pathophysiology of a STEMI including all cellular changes.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT