By Mark Seemann, 1h 6m
How do you define abstractions over logical branching? How can you eliminate the Arrow Code anti-pattern? Can you compose two, or more, outcomes that may succeed or fail?
This episode, the second of two connected videos, teaches you how to model mutually exclusive cases in a type-safe, object-oriented way. (The first is the video called Church Visitor.) You’ll see lots of object-oriented code examples that illustrate how to amplify the essentials of domain-specific logical branching while eliminating the irrelevant implementation details.
You’ll also learn some more of the scary words wielded by functional programmers and discover that they’re not so scary after all.
By Mark Seemann, 1h 17m
How do you define abstractions over logical branching? How can you eliminate the Arrow Code anti-pattern? Can you compose two, or more, processes that each may produce a number of mutually exclusive outcomes?
Using object-oriented code, can you make illegal states unrepresentable?
This episode, the first of two connected videos, teaches you how to model mutually exclusive cases in a type-safe, object-oriented way. You’ll see lots of object-oriented code examples that illustrate how to amplify the essentials of domain-specific logical branching, while eliminating the irrelevant implementation details.
Finally, you’ll learn how such abstractions over logical branching corresponds to a well-known design pattern. Refactoring of the motivating code example shown in the video will be concluded in the next video.
By Mark Seemann, 41m
How do you create abstractions that fit in your brain? How do you define abstractions that truly amplify the essentials and eliminate the irrelevant? A Composite makes many objects look like one object, so that’s one way to hide details. As the previous episode revealed, a Composite can be turned into a precise abstraction by realizing that it’s just a monoid.
What’s a monoid then? In this video, you’ll get all the details with easy-to-understand examples in C#. Not only will you learn just how a Composite is a monoid, but you’ll also come to the realization that the Null Object design pattern is a monoid as well; it’s simply a special case of the Composite pattern.
This episode gives you the tools to identify monoids in your own code base, and thereby also to predict where and how you’d need to refactor your code in order to make it composable. That, again, will give you a valuable recipe for composing your code so that it fits in your brain.
By Mark Seemann, 37m
Composite as Universal Abstraction
How do you make code readable? How do you make code fit in your head? How do you create good abstractions? How do you amplify the essentials while eliminating the irrelevant?
One useful tool is to employ the Composite design pattern, but when can you apply it? When are objects composable?
There’s a simple answer to that question. In this episode, you’ll learn to tell at a glance whether an interface is composable or not. This will also set you on the path of being able to deliberately design APIs in such a way that they’re composable – that is: so that they are intuitively understandable abstractions.
Composite is a universal abstraction. It’s not tied to a particular programming language or specific development paradigm. Under a different name, it exists independently of software development. This makes it a powerful abstraction.
By Mark Seemann, 34m
Why are most code bases bad? Why is it that, despite our best intentions, code rots between our fingers?
The answer is that most of us still think of code as merely a technical tool to reach a goal: Implement a feature. Fix a bug.
While it certainly is that, it’s also a written medium for communicating with other people: your colleagues, and your future self. We spend more time reading code than we do writing it, so we should optimise code for readability, instead of focusing on how fast we can produce it.
Learn how to think productively about software development, so that you can maintain a sustainable pace, even with a growing code base. This video is about humane code, and how programming is first and foremost an activity that ought to focus on communication.