News for hackers. Stuff that matters.
Re:Master JavaScript Programming with 18 Open-Source Books by partycoder on Friday March 03, 2017 @11:56AM (#13784160)
The weakest spots in the JS code I have seen, in npm and the projects I've had to maintain:

- Profiling CPU and memory: preventing and mitigating resource leaks.

- Robustness: Input validation, error handling, logging.

- Event handling and construction of finite state machines: defining states and transitions and validating them.

- Using a sane coding standard. Like Google's JS standard rather than the self proclaimed "standard" from feross.

The "request" npm module for example, is a FSM where states are defined by a combination of flags. However you can obtain states that are not handled by the library, because the FSM is constructed poorly without validating state transitions. That is a very common theme in npm modules.

There are no comments on this comment yet.