Live stream: https://youtu.be/Lsi1ZhmbNDc Stuck in a deeply nested if...else when traversing the pyramid of doom, you pause for a minute to catch your breath. The program’s logic eludes you and it is getting increasingly tiresome to keep track of all the twists and turns of the various conditions and possible return values. You start to dream a dream of a flattering flattening of all this code. A dream of refactoring this bewildering maze into an orderly space, devoid of surprising and unexpected behaviour. A space where things have their obvious place and purpose. You decide that you just just might need to set some rules. Enter the Rules Engine.
This talk introduces the concept of rules and rules engines as well as a way of implementing this in Python. Building on top of the initial, simple implementation, it is then further demonstrated how to expand it to handle additional use cases that goes beyond the basic aim of refactoring nested conditional constructs such as if...else, including parallel execution of your rules. The talk is suitable for anyone using Python as the concepts are pedagogically introduced and at the same time the overarching concept is a powerful tool.
Speakers: Lennart Fridén