19 ways to become a better Node.js developer in 2019

The Node.js future brings some interesting stuff

Short Intro

My name is Yoni Goldberg, an independent Node.JS consultant and the co-author of Node.js best practices. I work with customers at the USA, Europe and Israel on polishing their Node.js applications. Among my services are code, application and architecture review, testing & CI, advanced training sessions, and others which you may find here. Follow me on Twitter.

📗 Want to take your testing skills to the extreme? Consider visiting my comprehensive course ‘Testing Node.js & JavaScript From A To Z’.

Reviewed & improved by Bruno Scheufler and the Reddit community (special thanks to @pysouth, @fullheap, @ReginaldBull and @relativityboy) and.

1. Add some types and schemas. Typescript is a great candidate in 2019

Examples:

2. Enrich your Linters

Examples:

3. Be a bit more Java and a byte less Ruby — deepen your architecture knowledge

I absolutely don’t recommend embracing heavy Java/Spring patterns (we came here to Node-Land for a reason, didn’t we? :)), just cherry-pick few ideas that provide great value without sacrificing the app simplicity

Examples:

4. Plan how to utilize Async-Hooks to reach better tracing and context

Examples:

5. Understand the latest ‘Serverless’ features: It’s now ready to battle on the robust infrastructure field (Kubernetes killer?)

Originally FaaS was meant for development micro-tasks and not for robust “Microservice” applications. As their popularity grew, so the appetite of the cloud vendors, soon new features piled-up and suddenly now in 2019 it seems like a worthy infrastructure for robust applications. Can it now compete with Kubernetes and serve large applications? Some see Serverless and Faas as orthogonal technologies but practically every new cloud application in 2019 will have to choose (literally this choice is shown on each cloud vendor UI) one of the three: (1) bare-metal instance like EC2 or GCP compute (2) Kubernetes or (3) FaaS. Consequently, being able to compare K8S vs FaaS/serverless and telling the consequences becomes a mandatory design skill.

p.s. The examples below relate to AWS for convenience only.

Examples:

6. Meet the latest JavaScript features that are turning green soon

Examples:

7. Become intimately familiar with at least one more API technology. GraphQL is a great candidate in 2019

So which one to learn? Your best bet is probably GraphQL which is carried over a great momentum straight into the main-stream. Its echo-system has greatly matured and it serves very popular use cases like dynamic search and hierarchic data source. Grpc, on the other hand, is still a niche technology that fits well server to server communication use cases where minimum overhead is appreciated (e.g. Pub-sub/message-queue system).

Examples:

8. Go beyond unit & integration tests — enrich your testing portfolio with shiny new testing techniques

Examples:

5 shiny testing techniques by Yoni Goldberg

9. Align your monitoring with SRE/DevOps best practices

10. Think like an attacker: increase the security level by learning attack tools and techniques

Once you start doing this, it turns out to be not that scary. Just become familiar with common attack types and tools, draw your application architecture and flows and think how you would attack this. With time, unconsciously you’ll start mind security in every design decision and every code line

Examples:

  • Read my list of Node.js Security best practices which contains 23+ attack ideas including JavaScript code examples
  • Conduct a monthly threats analysis meeting where the team tries to look at the application design and propose attacks. sound boring? not necessarily if you add some gamification and reward members that find an exploit, or run a competition between a blue team that designs a module vs the read team which tries to find exploits

11. Have a package update strategy. A lesson learned in 2018: updating too soon is a dangerous practice

Examples:

  • Commercial tools like greenkeeper will PR once a package is updated. Unfortunately, none is still capable of suspending the update until a release is proven safe

12. Perform gradual installations, separate between the deploy and release phases

A word of caution: performing full-blown canary deployments in 2019 is still very expensive as it requires to orchestrate many infrastructure parts like routing, and monitoring. Therefore, consider starting with simple and semi-manual canary deployments (e.g. manually spin-up more machines with the new version based on the monitoring metrics)

Examples:

13. Kubernetes ate the world

14. Blockchain technologies embody some great opportunities

15. Gain solid machine learning skills, or at least speak intelligently about it

16. Skim through the code of selected open source libraries

17. Deepen your Linux OS understanding, focus on the anatomy of a Linux process

18. Dive deeper into the Node.js internals

Examples:

19. Last but not least: learn using scientific methods

Examples:

Thank You. Other articles you might like

Want more? follow me on Twitter

Software Architect, Node.JS Specialist. Consultant, blogger, conference speaker, open source contributor — author of the largest Node.js best practices guide