4 ms·
one thing i’d add that works well in javascript that is similar to “eye level is buy level” and that is “hoist the system” the important things that any file
by tylerchilds 2y ago
one thing i’d add that works well in javascript that is similar to “eye level is buy level”
and that is “hoist the system”
the important things that any file does is at the top.
the things those things depend on are either imported from packages at the top of the file or hoisted from functions below.
the things those functions depend on are hoisted from below them and so on
this makes every file in a system easy to grok because the first things are the business needs and as you scroll down, you get into the weeds and the implementation details— important things, but conversationally irrelevant things— this paradigm makes cross functional collaboration more effective as it drives engineers to understand business context with literal forcing functions.
- molteanu 2y agoYes, I do this kind of thing in JavaScript, too. I actually forgot it is a feature. Not all JS projects I work on take advantage of it in this way. "conversationally irrelevant things" - nice way of putting it. Important things, because they are there, the project is built on them but they are actually just details from a requirements or project-feature-wise point of view. Nicely said!