Original video address: www.youtube.com/watch?v=geP…

What advice do you have for node.js beginners?

Wyatt Preul

Joyent product Engineer

Don’t rely on modules on NPM at first, try to implement some basic functionality from scratch, and then introduce a module when you really need it. Another tip is to stay active in the community and get involved in local community activities. Try contributing to Node, even if it’s just correcting README or document submissions.

My note: The best way to learn a language if you have enough time is to build wheels. The premise is sufficient time and study period

Patrick Ritchie

Senior Software Manager at HomeAway

Find an entry point where Node can help you quickly start your business and demonstrate its value. Then look for more sophisticated and powerful Node applications to support your business. There are some big differences between Node and other software. So you need a complete program to achieve your business goals.

Steven Faulkner

Bustle Engineering Director

When you first start learning Node, take a look at the code you use for modules and learn how it works. There are many prolific developers in the Node world who develop many different types of modules. Read their code to understand the thinking behind them.

A few years ago the NPM top contributor list: gist.github.com/michalbe/71… Too bad TJ is no longer in the Node circle.

Practical advice on Node.js

So called best practices

Charlie Robbins

Director of Technology, GoDaddy

  1. Use the proprietary NPM library
  2. If you don’t do the first one, another piece of advice is don’t do itnode_modulesSubmitting to version control will not work well
  3. Using git urls in package.json can also end up causing problems, although doing so can help you out if you don’t have a private NPM.

In short: use private NPM;

CNPM solutions can be found at github.com/cnpm/cnpmjs…

Paul Milham

WildwWorks engineer

  1. Handle exceptions correctly where possible
  2. When your application is in an unknown state, restart your server without mercy
  3. There must be tests; Tests that are automated after you submit code.
  4. Js is a dynamically typed language, so there must be strict data checking; Make sure the data coming into your app is what you expect, especially at the API level

The second, which may not be accepted by many, is the most basic test of a system’s architectural capability: having your server process restart at any time. And of course the third one is also important, it’s hard to think about how a complex system can be maintained without testing, without automated testing.

James Hush

Netflix Software Engineer

When you start a new project in production, be sure to lock in dependencies; Do not appear “^”, “~” in package.json; Lock dependencies directly.

I strongly recommend * YARN. If you don’t like yarn, create a.npmrc file in the root directory of your project and say save-exact = true

If you are upgrading the Node.js version. Be sure to let everyone on your team know that you’ve updated the version of Node.js; If someone can’t run node.js after you upgrade, rm -rf node_modules and NPM I will solve 90% of your problems.

Node.js is moving so fast, if the project is radical, just use the latest version. Be conservative with TLS.

Patrick Ritchie

Senior Software Manager at HomeAway

The JVM’s threading mechanism allows you to squeeze all the resources of the system to accept new connections; But Node has only one process and limited memory resources.

Learn to use clusters and learn about microservices architecture

Final advice

(Baiyun: Only one word left?)

Sarah Saltrick Meyer

Luca brasi buzzfeed program

Node is evolving as fast as the Internet, and it’s getting better as well. You can’t just show up for six years waiting for a new language to show up and then forget about your previous work.

Node.js is not perfect at the moment, but it is getting better and better, and should go with the flow. Without the context of the interview, I don’t know why she said six years.

Paul Milham

WildwWorks

I encourage you to accept that javascripts. Js is a great language that can be used in a variety of areas, and it will take a bit of an attitude change to see js as a dynamic typing language, and some developers even have a bias against dynamic typing. The dynamic nature of your code makes it cleaner and easier to read, but first you have to embrace it; Instead of bypassing JS by compiling to JS in some language.

Haha, I feel that using a language like TS without mastering JS does cause some problems. I haven’t used dart and can’t publish anything.

After #

I hope it’s helpful.