The mistake I did when learning Nodejs

The mistake I did when learning Nodejs

May 01, 2023

Shipping a product to production is what every developer aims for to start earning as soon as possible. This was the mentality I had when working on my final year project with my friends.

Let me take you back to the beginning. In our team, we had no serious developer, so I decided to take on the role and develop the project myself. Luckily, I had a strong foundation in programming, having studied C, object-oriented programming in Java, and a bit of Javascript. We were unwilling to outsource the project, as was the case for most of the other groups, so I chose to develop it using ReactJS for the frontend and NodeJS for the backend.

So, I had to take on some Nodejs courses before beginning working on the project. The courses I found on the internet majority focused on teaching Expressjs and MongoDB. After learning for about 3 weeks, I began working on the project, i had to keep it concise but functioning given the little experience i had with the technologies i used. Three to four weeks later i finish the project and it was successfully.

I thought the experience i had in working with Expressjs as well as other 3rd party libraries made me to become a Nodejs developer but unfortunately it was all wrong.

Many of the courses all over the internet teach Nodejs at a more abstract level ignoring the core buit-in modules. I really don't why because for one to understand the future atleast he/she must at-least have little knowledge of the past. So i had to rewind everything i knew about Nodejs.
With more extensive research on Nodejs, now can in fact narrate some of the internal workings of Nodejs

Here is what I had missed when I learnt Nodejs at a more abstract level.

  • Nodejs core dependencies

    • v8 engine - Js engine for compiling and executing js files.

    • libuv - C library that power asynchronicity in Nodejs through its event loop and the capability of providing direct access to OS kernel.

  • EventLoop - C program that is part of libuv. It is a design pattern that orchestrates sync and async code in Nodejs

  • Phases of the eventloop and their order of execution - forexample, timers queue, I/O queue, check queue, close queue and also microtask queue ( nextTick queue and promis queue).

  • streams - like readable, writable , duplex and transform streams.

Encoding and character sets - Unicode, ASCII.

Majorly the emphasis was to understand Nodejs from the roots. At least am in position to share, use and teach beginners the right way to learn Nodejs.

Thanks to a Nodejs course on youtube from codevolution channel.

Enjoy this post?

Buy Code With Isaac a coffee