Making sure the software we build works the way we (and our customers) want it to work is called, unsurprisingly, software testing. Software testing is an enormous topic; indeed, there are entire books, courses, conferences, academic journals, and more about the topic. One can even make a career out of testing software. We couldn’t possibly scratch the surface of the complexity involved in software testing in this article, so we’ll only focus on a topic most relevant to us as programmers: test-driven development.
(more…)Tag: software design
-

Delegate and Decorate in Python: Part 2 – The Decorator Pattern
Note: This is not about Python’s language feature called decorators (with the
@symbol), but about the design patterns called “decorator” and “delegate.”In the previous article, we learned how to implement the Delegation pattern in Python. With this knowledge, we’ll now learn about the Decorator pattern, which will make use of delegation. We’ll learn about when we might use it and implement a couple of examples.
(more…) -

Delegate and Decorate in Python: Part 1 – The Delegation Pattern
Note: This is not about Python’s language feature called decorators (with the
@symbol), but about the design patterns called “decorator” and “delegate.”In this series we’re going to learn two very useful design patterns: the delegation pattern and the decorator pattern. Each pattern is useful in that they help us enforce the single responsibility principle of object oriented programming. Getting these patterns to work as expected in Python requires a relatively deep dive into Python syntax as well as the always scary technique of metaprogramming. Let’s jump in!
(more…) -

Designing Public Interfaces the Right Way
Interfaces define the ways objects interact with each other. Properly designing interfaces not only help conceptualize a system, but aid in testing and maintainability of our systems.
(more…)
