Low-level design patterns are great, but beyond a point, they

Arpit Bhayani

Arpit Bhayani

Oct 02, 2024 • 1 min read


Low-level design patterns are great, but beyond a point, they make code unnecessarily complex, slow, hard to contribute, hard to read, hard to debug, and borderline bad.

Not every code needs to be extensible, because most code you write is never going to be extended. You created an abstract database dao layer just in case you are required to move away from MySQL, but did you ever switch your database?

This is where I follow the rule of 3 - if I need to repeat or write something at least 3 times, I adopt an appropriate pattern and abstract out the complexities, otherwise, it is a waste of time and effort.

Because if required, you can always buy some time and add required abstractions when you need time. Spend time shipping things faster and optimizing for time to market.

Remember, business >> product >> engineering.

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses