Most of my code is reusable. Recently I've been splitting code in roughly 2 categories: small reusable modules (~90% of code), and connectors, which are sometimes big, but really dumb modules, whose purpose is to connect reusable modules together and provide dependencies. Connectors could be easily thrown out, rewritten, copy‐pasted, duplicated with changes, etc, because they don't contain much logic. This kind of setup allows you to structure your code in many different ways, for many different environments at once, quickly restructure for a new environment, provides good testability, etc. And yes, a lot of my small modules are reused, e.g. for testing or to run in multiple places or multiple environments (e.g. both client side and server side).
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Most of my code is reusable. Recently I've been splitting code in roughly 2 categories: small reusable modules (~90% of code), and connectors, which are sometimes big, but really dumb modules, whose purpose is to connect reusable modules together and provide dependencies. Connectors could be easily thrown out, rewritten, copy‐pasted, duplicated with changes, etc, because they don't contain much logic. This kind of setup allows you to structure your code in many different ways, for many different environments at once, quickly restructure for a new environment, provides good testability, etc. And yes, a lot of my small modules are reused, e.g. for testing or to run in multiple places or multiple environments (e.g. both client side and server side).