System Software Design
Re: System Software Design
I didn't actively choose to use defensive programming here. If it seems that way, it is probably a combination of habit, practices drilled into me at university, and following suit with the code that had already been written for the project.
Going by the way Wikipedia defines these terms, I think I would describe the code I've written as leaning towards offensive programming, as a subset of defensive programming. But it would not surprise me if the code can be classified as defensive under a different definition of defensive programming.
Going by the way Wikipedia defines these terms, I think I would describe the code I've written as leaning towards offensive programming, as a subset of defensive programming. But it would not surprise me if the code can be classified as defensive under a different definition of defensive programming.
Re: System Software Design
That seems fair. We could also add some notes about offensive programming if you like.
My approach wasn't originally defensive either, but it has become more so over the years. The Open University interestingly prefers Design by Contract for the efficiency gains, as it is mostly considering things from an enterprise setting, but personally I prefer defensive, especially for projects like this.
My approach wasn't originally defensive either, but it has become more so over the years. The Open University interestingly prefers Design by Contract for the efficiency gains, as it is mostly considering things from an enterprise setting, but personally I prefer defensive, especially for projects like this.
Hamish