Dealing with confusing business logic

Posted by achyxhu@reddit | ExperiencedDevs | View on Reddit | 51 comments

In the span of two years, our team has dealt with three different product managers who lack domain knowledge of the product they’re working on. Whenever they come in, they’ll add more business logic - typically ones that contradict an older behaviour (unfortunately support is required for backwards compatibility). The lack of thought behind the business logic shows up as spaghetti code in our code base. Basically a bunch of if-else statements (sometimes nested) and rollout checks. How do you guys deal with complex, messy and sometimes contradicting business logic?