|
|
|
|
|
by animuchan
62 days ago
|
|
This is an entirely false dichotomy though, is it not? One can both know facts and understand logic behind them, it's not like you're creating an RPG character and need to make a choice with limited character points. (Can't say time is the limiting factor either -- we're both in HN comments, valuing our own time at zero.) |
|
Let's for example about html boilerplate, where you don't remember the syntax. What you remember is the components & why they are needed, then add them one by one as you recall your memory. Doctype, html tag, head, body, etc. It works because html is simple and common.
Then for express it is harder, because you need to recall javascript syntaxes and express syntaxes, and most of the time you don't get involved with express outside req and res. You recall that express need body parser, register routers, and finally listen, whether you use http server first or directly from express. Now you compose one by one, looking at docs or web for the forgotten pieces, but you don't lose the understanding / logic of express, you just forget the syntaxes.
As for stream where I keep forgetting it, I just need to remember that stream need source, event handler such as on data, error, finish / end. Pipe if needed. However I never remember whether to use writable, readable, streamable, etc because I seldom get involved with them, and can look up for references anytime.