10 Tips to Become a better Node.js Developer

Sharing is Caring

It’s no secret that I absolutely love JavaScript and Node.js.  For those that don’t know Node.js is a framework that is built on top of JavaScript.

Node.js is an open source JavaScript runtime environment that runs on pretty much everything. It’s a great environment for building fast scalable network applications.

Node.js uses an event driven model that makes it really efficient and really good for real-time applications. Paired with serverless computing it’s fantastic for a lot of modern use cases.

In this article, I will go through the best practices for becoming a better Node.js developer. Over the last two years or so, I’ve interviewed and hired a lot of developers for the startup I’m working at.

I’ve noticed a lot of developers really aren’t that great at Node.js because they really haven’t taken time to understand core JavaScript and the various flavours of it.

Take Time And Learn Core JavaScript

Without mastering JavaScript, it’s nearly impossible to work in Node.js. There’s so many other reasons to take time to understand JavaScript because it’s used on pretty much all websites, there’s almost no websites that aren’t using it for animation, form helpers, etc. It’s literally the backbone of the web.

I recommend initially learning by doing some tutorials or courses. I’ve previously blogged about learning javascript and evaluated 5 Resources for Learning JavaScript.

After doing some tutorials or courses you need to learn by doing some side projects whether they be paid or not. CodeKata has some pretty good practice exercises.

Once you learn core programming skills in just about any language, it becomes much easier to learn frameworks or other languages. And finally, a lot of libraries and frameworks that are popular today will not be in the future. Focusing on core skills allows us to grow and better stand the test of time.

You will not ever understand everything but you should strive to learn how the system works. The best way to learn the system is to use it and push the limits of what you know regularly.

Write Lots of Code

As you are learning, it’s really important to write lots of code. Programming is like almost all skills and professions that you get better and better through practice.

Contributing to open source can be a great way to practice and can be a good way to build connections in the community. Working on the same project for a long time will narrow your vision and hide other ways of doing things. You need to strive to look at other projects and develop on your own.

Develop Your Soft Skills

Being successful is all about writing the best code, it really should start with being able to communicate with other people.

Even though soft skills aren’t technical, they are really important when working on a team or in any job.  Soft skills are non-technical abilities like being able to listen, communicate, delegate, and work on a team.

Soft skills like communication, interpersonal and teamwork are just as important as being able to write code. After all, code isn’t just for computers – it is also for humans. If it was for just computers we would likely being doing it only in binary.

Use at least ES2015

I don’t think we should blindly chase new shiny toys but there’s been a lot of really valuable JavaScript features that have been added in the last few years.

ECMAScript 2015 also known as ES2015 was a huge update to JavaScript that has been available for a few years now. ES2015 added a lot of functionality that was really needed to Javascript.

It added a lot of really useful functionality like Template Strings, Destructing, and block scoped constants like let & const. const is short for constant – or a single assignment variable. let is the new var.

And finally, ES2015 added a lot of great native functionality like Promises, Modules, and more!

Attend Conferences

There’s a huge number of benefits to attending conferences when it comes to becoming a better Node.js programmer.

Attending conferences and events will allow you to hear a lot about new things happening in the field whether it be new techniques or hearing about best practices.

When attending conferences there’s usually lots of other likeminded people that you can bounce ideas off of and learn new things from. When I’ve attended events like Dreamforce, I’ve really liked to try the small labs and do some of the hands on training.

Speak at Conferences

Albert Einstein once said “If you can’t explain it, you don’t understand it well enough.” Speaking without really knowing content is incredibly challenging.

John Sonmez has some really good videos and talks about why it’s important to speak at events.

Not to mention, speaking at industry conferences can add a lot of credibility when looking for jobs.

Avoid Complexity

If we can’t understand a class, a function or event just a file we can’t use it properly and we can’t maintain it properly which will result in some strange and complex bugs.

Most code and software architecture can be avoided by taking the time upfront to do some design and by having a great knowledge of the fundamentals.

Advanced programming is really just the basics applied incredibly well.  By reading other people’s code and by contributing to popular open source projects there’s a lot of easy learning that can be done. In a lot of cases, there truly shouldn’t be a need for comments because the code will be clear and clean.

Use Exception Handling

In general, we should be handling errors instead of allowing applications or code to crash. If you are validating data when it is received from the user or external system you shouldn’t really need to handle many exceptions.

Exception handling should be done for any external systems that can’t be handled by circuit breakers. Exception handling is needed to identify problems that program cannot handle and tell them about the user, because user can handle them.

Automate Everything

The tooling around JavaScript and Node.js has really evolved over the last few years. There’s very little need to waste a lot of time on doing manual grunt work.

Use the JavaScript Standard Style

Using a linter has really made my life easier. It often catches severe issues like undeclared variables or unresolved promises without me having to do much.

There is a huge benefit to team members when there’s a consistent coding style across all of the code. A lot of linters have an auto-fix feature that will fix any violations when the file is saved or committed.

Do you have some other tips on how to become a better Node.js Programmer?

Author: Brian Cline

Brian is a programmer living in Niagara Falls with ten years of development experience. He is passionate about automation, business process re-engineering, and gamification. For the last six years or so, he has been working with Salesforce and JavaScript.

Related Posts

Sharing is Caring