Why use modules? - Deepstash

Why use modules?

There are a lot of benefits to using modules in favor of a sprawling, interdependent codebase. 

  • Maintainability: By definition, a module is self-contained. 
  • Namespacing: In JavaScript, variables outside the scope of a top-level function are global (meaning, everyone can access them). Because of this, it’s common to have “namespace pollution”, where completely unrelated code shares global variables.
  • Reusability: Let’s be honest here: we’ve all copied code we previously wrote into new projects at one point or another.

11

54 reads

CURATED FROM

IDEAS CURATED BY

heathesoli

Engineer in control and instrumentation

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates