كل المنشورات

الوحدات العميقة بعد ستة أشهر

2026-05-081 د قراءة#architecture#lessons

Six months ago I read A Philosophy of Software Design and committed to one experiment: prefer deep modules over many small ones. Short interfaces, heavy bodies, no helper-helpers.

Here's the unvarnished version of how that went.

What worked

  • Onboarding got faster. A teammate could explain what a service did by reading three exported functions.
  • I stopped writing factories. The "do you really need this" hurdle was much higher when the file was already 600 lines.

What didn't

  • Tests got slower to write. Deep modules give you fewer seams, so high-leverage tests cost more.
  • The discipline frays under deadline. Six weeks in, two "small helpers" appeared in a hotfix and never left.

The most useful takeaway wasn't the principle itself — it was that having a north-star aesthetic for a codebase changes the default decision, and defaults compound.