Please enable JavaScript.
Coggle requires JavaScript to display documents.
Anti-patterns in NodeJs (The dangling source stream (Destination stream…
Anti-patterns in NodeJs
Callback hell
Flattern using Promises
Long list of arguments
Use "options" object instead
Abusing variable arguments
Use "options" object instead
Poor use of modularity
< 200 LoC
Overuse of classes for modelling
New keyword missing error
Hard to switch to Functional Programming
The Kitchen Sink module
Modules are cheap, just break them down
< 200 LoC
Synchronous execution after initialisation
Only use sync operations at startup to reduce hiccups/unresponsiveness
The dangling source stream
Destination stream throws error leaving source stream dangling
Dangling source stream may leak resources
Handle "close" event properly or use "pump" instead
Changing the way require() works
Because of ugly require paths
Module should be small and structured
Testing at the wrong level
Should be at interface level only
Depending on global modules on package.json
Module should be self-contained and complete
Not measuring code coverage
Istanbul
Poor use of public modules
Should make good use of existing open-source
Don't blindly look up for npm package all the time
Unlimited asynchronous operations
Causing system hiccups
Must limit the number of requests
Ignoring callback errors
This is way too easy to forget and cause debug nightmare
Linter would help
CPU heavy operations
Off-load to other processes
Schedule small amount of work at a time: streaming