Lesson plan

Offensive programming

Offensive programming is a software development philosophy that deals with software bugs by having the program fail fast and visibly, rather than attempting to hide or recover from them. The goal is to make bugs obvious during development and testing, under the assumption that unexpected internal errors should be fixed by the programmer, not tolerated by the running software. This approach is considered a branch of defensive programming because it is a strategy for handling errors. However, it contrasts with defensive techniques that might mask a bug by using default values or continuing to run in a degraded state. Instead, offensive programming often uses tools like assertions to halt the program immediately when an invalid state is detected, making the source of the problem easier to identify and fix.

Back to article

Article summary

Offensive programming is a software development philosophy that deals with software bugs by having the program fail fast and visibly, rather than attempting to hide or recover from them. The goal is to make bugs obvious during development and testing, under the assumption that unexpected internal errors should be fixed by the programmer, not tolerated by the running software. This approach is considered a branch of defensive programming because it is a strategy for handling errors. However, it contrasts with defensive techniques that might mask a bug by using default values or continuing to run in a degraded state. Instead, offensive programming often uses tools like assertions to halt the program immediately when an invalid state is detected, making the source of the problem easier to identify and fix.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.