---
title: "Comment by Adam Lewis on \"Rethinking Expense Validation: From Hardcoded If Statements to Pluggable Engines in Java\" | Hashnode"
description: "I spent years arguing the opposite, that a pluggable engine was over-engineering for what looked like a few branches. Every new reimbursement rule forced a re-r"
url: "https://hashnode.com/posts/designing-extensible-expense-validation-platform-java/6a9b9ad167188a8ce9306fcc/comment/6aa930c92ef827ebdc128acb"
---

[Discussion](https://hashnode.com/posts/designing-extensible-expense-validation-platform-java/6a9b9ad167188a8ce9306fcc)

Comment [Rethinking Expense Validation: From Hardcoded If Statements to Pluggable Engines in Java](https://hashnode.com/posts/designing-extensible-expense-validation-platform-java/6a9b9ad167188a8ce9306fcc)

[Adam Lewis](https://hashnode.com/@nark3d)

[Sep 15](https://hashnode.com/posts/designing-extensible-expense-validation-platform-java/6a9b9ad167188a8ce9306fcc/comment/6aa930c92ef827ebdc128acb)

I spent years arguing the opposite, that a pluggable engine was over-engineering for what looked like a few branches. Every new reimbursement rule forced a re-read of the whole conditional, because the branches changed shape independently of each other. The interface has to be narrow enough that adding a rule never means touching the one beside it. Otherwise the branching just relocates into the strategies.
