Everything on Category: Software Engineering

About Guard Clauses, automated tests, and Design by Contract

2015-07-04 at 08:25 0 comments

I’m currently reading Bertrand Meyer’s “Object-Oriented Software Construction” (finally, I should say) and I’m absolutely amazed. Part of the reason I haven’t touched this book yet is its age: the second edition was released in 1998. A book that is now 17 years old (the first edition is even ten years older) – what could I learn from it, especially in a field like software development where things change relatively fast?
Well, I was totally wrong. Not only are the topics Bertrand Meyer addresses in his book still relevant for OOP today, but more importantly he describes concepts that are not fully supported by popular object-oriented languages like C++, C#, or Java, although they are deemed necessary to achieve the main goals of software quality with OOP according to Meyer.
One of these concepts is Design by Contract. And the best thing is that you probably apply it in your daily programming already, although not to such an extend as Meyer intends you to. So let’s check what Design by Contract actually means.

Continue reading