5 Things Ryan Dahl Regrets About Node.js

5 Things Ryan Dahl Regrets About Node.js

Daily short news for you
  • Since the beginning of January until now, if you've been visiting the blog regularly, you may have noticed that the advertising content on the website has changed. That's right, I no longer use ads from Adsense, and instead, I have ads from indieboosting.com. Why?

    In the middle of last year, I joined the Build in public VN group on Facebook. This is like a playground for Indie Hackers - those who are passionate about creating products and are willing to share knowledge and experiences with each other during the learning and working process. Overall, I have learned a lot of new things in the Indie community.

    indieboosting.com is a product of Duy - who is also the Admin of the group - the idea of indieboosting is to be a bridge between product creators and those who need to use the products through website owners. If you have a website, traffic, and are willing to act as a bridge, then indieboosting is the tool for you. In return, you will receive a corresponding commission.

    This commission is relatively "lucrative," far surpassing Adsense at this time. To put it simply, on average, the ads I placed on Adsense barely reached $2 a month, whereas with indieboosting, in just the past half month, I have already earned over $10 🫣

    » Read more
  • I just found a tool that extracts content from images, pdfs, docx, xlsx, pptx... into text, markdown, or json... In general, it supports quite a few input and output formats. Once you extract the content, you can do whatever you want with it, especially putting it into large language models as data sources, what could be better 😁

    The tool is called Docling, written in Python. You can embed it in your code or use the CLI, both work. I've tried it with images and pdfs. Overall, the pdf results are better. Images can be hit or miss 😅. It also offers an OCR library option. Choose whichever is more suitable.

    During the installation process, a few errors occurred. Please remember to use Python 3.9 -> 3.12. If you encounter the error ModuleNotFoundError: No module named '_lzma', try following this guide to see if it resolves the issue ModuleNotFoundError: No module named '_lzma'

    » Read more
  • How I wish I had discovered this repository earlier. github/opensource.guide is a place that guides everyone on everything about Open Source. From how to contribute code, how to start your own open-source project, to the knowledge that anyone should know when stepping into this field 🤓

    Especially, this content is directly from Github.

    » Read more

Introduction

Node.js was first introduced by Ryan Dahl in 2009. And 9 years later, it was also Ryan Dahl who brought another platform called Deno. Like Node, Deno provides a powerful server-side JavaScript runtime environment. In a 2018 video, Ryan Dahl gave a presentation on "10 Things I Regret About Node.js" just before announcing Deno.

So why was Deno created if Node.js was already good enough? In today's article, I would like to extract 5 things that Ryan Dahl regrets about doing/not doing with Node.js.

NPM and package.json

NPM & package.json

After going through many ups and downs, Node.js and npm are like a team that always goes together. npm is known as a repository of dependencies for Node. npm is a centralized and controlled repository.

Because of its centralization, npm has often become a target for attacks aimed at injecting malicious code into packages, such as the case of Popular NPM Package Hijacked to Publish Crypto-mining Malware or attacks aimed at deleting user data like Dev Sabotages Popular NPM Package to Protest Russian Invasion.

Npm came up with package.json, which is a file that records information such as the packages used, license information, repository, description, and many other seemingly unnecessary details.

node_modules

node_modules black hole

Have you ever heard the comparison of node_modules to a black hole in the universe? Or if you have about 10 Node.js projects on your machine, it means you're ready to have 10 more black holes.

node_modules is a directory created to store all the necessary packages for a project. It doesn't use a centralized storage called NODE_PATH, but instead stores them in each project. Even the father of Node.js admits that node_modules is an irreparable mistake and apologizes for it.

Promise

Javascript Promise

Node.js did not immediately embrace Promise from the beginning, as evidenced by many APIs in Node still using callbacks for handling asynchronous operations. Nowadays, Promise has become very powerful, especially when combined with async/await, and that is something the father of Node.js regrets but cannot easily fix.

Security

Node.js security

If you run a Node.js application, it will have full access to files/folders, networks, and environment variables. Obviously, this can be a security risk if you accidentally run a project that contains malicious code, or attackers can exploit this to compromise Node.js servers.

The Build System (GYP)

GYP

The father of Node.js shared that GYP is a very difficult tool to build with, but because V8 of Chrome initially used GYP, Chrome eventually removed it, leaving Node.js as the only user of GYP.

To perform tasks outside the Event Loop, we have to directly interact with V8 by building C++ Addons. Many people complained about this and suggested switching to a more user-friendly solution like the Foreign Function Interface (FFI), but unfortunately, he overlooked them.

He also shared that he didn't like libuv because it uses autotools!?

Conclusion

Some mistakes can be fixed, but some cannot. This article presents 5 mistakes that the father of Node.js shares with us to let us know what he regrets. But no matter what, Node.js has grown and has a solid position in the global community and industry.

References:

Premium
Hello

5 profound lessons

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

Every product comes with stories. The success of others is an inspiration for many to follow. 5 lessons learned have changed me forever. How about you? Click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (3)

Leave a comment...
Avatar
Thành Đỗ2 years ago
Có một sự thật là Ryan đã khắc phục tất cả vấn đề trên với Deno. Mà de-no <=> no-de 😁
Reply
Avatar
Long Domi2 years ago
Cái node gyp kia luôn là ác mộng, lúc build lỗi ấy
Reply
Avatar
Vũ Mạnh Đức2 years ago
Node_modules so sánh với black hole hài hước
Reply
Scroll or click to go to the next page