Advanced Defensive Programming Techniques
This course will lead you step by step through the process of developing defensive design practices, which can substitute common defensive coding, for the better of software design and implementation.
How often do you have to defend from nulls, zeros, surprising cases hitting switch instruction, impossible else branches, and so on? Is your life a struggle with issues caused by unexpected data or invalid system state? In this course, Advanced Defensive Programming Techniques, you'll learn how to defend by means of design, so that almost all explicit defensive code can be happily removed. First, you'll discover how to build validation. Next, you'll explore how exactly to design a public interface. Finally, you'll cover how to unify error flows, so nothing unpredictable can take you by surprise. By the end of this course, you'll have the necessary knowledge to efficiently develop your own defensive design practice.
Course SyllabusCourse Overview- 1m 24s
—Course Overview 1m 24sUnderstanding Limitations of Traditional Defensive Code- 40m 43s
—The First Law of Defensive Programming 5m 20s
—What Follows in This Course? 7m 22s
—Traditional Defensive Techniques 5m 11s
—Defensive Design: An Experiment 7m 54s
—Called Method Cannot Defend 6m 14s
—Defining Function Domains 6m 19s
—Summary 2m 20sRemoving Corruption by Only Creating Consistent Objects- 31m 54sRemoving Corruption by Only Making Valid State Transitions- 40m 8sDismissing Defensive Code by Avoiding Primitive Types- 45m 5sDefining Function Domains as the Primary Line of Defense- 44m 1sBuilding Defensive Design Instead of Writing Defensive Code- 42m 50sThe Principle of Working with Objects, Not with Nulls- 46m 31sBuilding Rich Domain Model as an Effective Defense by Design- 43m 8sDesigning Alternative Workflows Instead of Defending from Errors- 46m 30s