The “Rule of 10” for functions, components and modules

  • If a function has >10 lines of code, break out into multiple functions.
  • If a component has >10 functions, break out into multiple components.
  • If a module has >10 components, break out into multiple modules.

--

--

--

I build tools for creativity 🧩. CEO of @Weld_io , a #nocode tool for marketers. Father of two. Feminist. Fan of espresso and movies. Still learning.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tom Söderlund

Tom Söderlund

I build tools for creativity 🧩. CEO of @Weld_io , a #nocode tool for marketers. Father of two. Feminist. Fan of espresso and movies. Still learning.

More from Medium

Properties of base fields cannot be altered in this manner!

FOUNDATION 6 FRAMEWORK

[PYTHON-OOP] ABSTRACTION

Using a JavaScript Hash Table To Lower Big O Time Complexity When Searching For The First Recurring…