software model driven approaches
Inspired by Model practice’s last posts I will try to illustrate a business logic’s paradox on the barber’s paradox taken as a business rule 😉
The barber’s paradox: “The barber shaves only those men in town who do not shave themselves! Who shaves the barber?”.
The first sentence is the business rule: “the barber shaves only men who do not shave themselves”. The second sentence is not a business rule but a comment. A lot of misinterpretations when coding or modeling business rules come from comments turned into rules: “Hum… As I understand the rule there is a problem: who shaves the barber?”. From that point one can:
Both cases cost time, at least, or lead to inaccurate behaviours and maintenance costs, at worst. The rule in itself is clear and non ambiguous if seen in a real world context (which should always be the viewpoint to adopt when dealing about building applications intended to be used by real people with a real business!):
So. I tell there is no problem. However, how can I be sure that my (sensible) interpretation is the good one compared to what business guys had in mind when they wrote the rule? By asking them! And, as a communication support, a model would be a great help to describe this lack of complexity which is a kind of business logic complexity 😉
Featured image taken from http://bollywood-sapna.over-blog.com/article-23221027.html