How web GDE Erick Wendel forever changed Node.js with the support of the open-source community

how-web-gde-erick-wendel-forever-changed-node.js-with-the-support-of-the-open-source-community
Erick Wendel, Web GDE, speaking at the FrontInSampa conference

Have you ever faced bugs on technologies known worldwide? What did you do?

If you are Erick Wendel, Web GDE, you roll up your sleeves and find a solution to a bug that has been plaguing big tech companies.

Erick is a community-driven developer who got his start in the field through a software community that used to offer free courses in his home country of Brazil. This experience sparked a passion for open-source projects and collaboration that helped him solve an issue within Node.js that affected how subprocesses work in the runtime. Erick continued with his spirit of sharing knowledge by outlining exactly how he solved the bug in a detailed YouTube video (in Portuguese).

The bug

In Node.js, there’s a module called child process which allows you to create tasks in other functions so you process data in the background. This process harnesses more power from your machine and in web pages, allowing pages to load faster. When trying to import modules in JavaScript, there are two main ways to load those modules:

  1. CommonJS: scripts need to be loaded in a certain sequence. This method blocks the program until all modules are loaded in that sequence.
  2. ECMAScript Modules: allows for JavaScript to load modules asynchronously, thus preventing the blocking of the program as it’s loading files.

While creating an educational class for his students, Erick was using Node.js’ child process module and trying to schedule a function that would be executed in the background. Working correctly, the parent process should’ve sent messages to the program running in the background as soon as calling the function. While doing this, he noticed that he was receiving an error and even rewrote his code multiple times. Erick was 100% certain that his code should’ve been working but despite his confidence, he continued to receive an error. So he thought to himself, “What if I put a setTimeout function here just to wait a bit and then ask for the events. Then it worked!” Erick realized this was in fact a real bug and went straight to the Node.js’ GitHub repo to open up an issue and worked with other contributors to figure out the best solution.

Finding a solution

After Erick’s Eureka moment, he wanted to be sure that this wasn’t an issue that was only affecting him. “When I Googled this problem, I found these issues on Facebook Jest, Yarn, and other big libraries that anyone running JavaScript might use,” he discovered. As a champion of open-source projects and collaboration, Erick created an issue on Node.js’ GitHub and discussed the issue while other contributors also participated.

When asked about the resources he used to fix this bug, Erick quickly mentions the open-source community. He spoke to Anna Henningsen, one of the most important Node.js contributors, in his opinion. His proposed idea was to introduce a new event in the child process module that would’ve alerted users when the event was “ready”. However, as Anna pointed out, this would’ve led to changes that would’ve required the community to learn how to use this new process. Instead she proposed, “What if you just enqueue all the messages and when the child process is ready, you dispatch them all?” This was the kind of collaboration that he strives for and this solution by Anna would’ve fixed the bug without breaking all applications that use Node.js.

Anna offered immense support and immediately after opening the discussion in GitHub, members of the community commented on the project and gave their input. He recalls, “After I submitted the first version of my solution, many contributors were reviewing my code and saying, ‘No, no, this is not the right way, you should fix this, this is a performance problem, etc.’ So I got a lot of feedback, learned a lot, and it was finally approved!” Without the help of the open-source community, he would’ve worked on a solution that would’ve created more issues. Instead, the community pointed out his blind spots and this collaboration allowed for a seamless solution.

With Erick’s solution, Node.js can effectively run background tasks using ECMAScript modules and large companies have Erick and the open-source community to thank for solving an issue that has been around since the beginning of Node.js.

Impact

Since solving this issue, Erick has become a Node.js core member where he reviews pull requests, attends discussions, and is regarded as an influential developer in the space. Erick has also been invited to conferences all around the world to speak about open-source development and his experience.

Erick wants to add visibility to the power of open-source projects and implores everyone, students and professionals alike, to help out with open-source. These projects have helped him with his goals of making an imprint in the world and he states, “I want to put my name on something that people will remember forever. I would say this is the power of open-source. You can add ideas or try fixing something and this can make you a better developer and a better person.”

Erick is continuing to solve problems (his newest solution fixed a bug in Node.js with a single line of code), learn, educate through his YouTube channel, and is looking forward to the next big challenge.

Erick’s thank yous

Erick would like to thank the open-source community and in particular, Anna Henningsen and Rich Trott for their support and contributions to this solution. In his words, “I know that for those experienced Node.js collaborators, this bug would have been fixed in just a matter of minutes and they let me help and give my best. This is a lesson I’ll always remember.”

You can find Erick on Twitter, GitHub and YouTube where he published a step-by-step tutorial (in Brazilian Portuguese) on how he fixed this bug and also gave a summarized tech talk sharing his journey.

The Google Developer Experts (GDE) program is a global network of highly experienced technology experts, influencers, and thought leaders who actively support developers, companies, and tech communities by speaking at events and publishing content.


How web GDE Erick Wendel forever changed Node.js with the support of the open-source community was originally published in Google Developer Experts on Medium, where people are continuing the conversation by highlighting and responding to this story.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
what-businesses-get-wrong-about-content-marketing-in-2023-[expert-tips]

What Businesses Get Wrong About Content Marketing in 2023 [Expert Tips]

Next Post
aapi-heritage-month:-how-web-gde-vickie-li-views-the-importance-of-diversity

AAPI Heritage Month: How Web GDE Vickie Li views the importance of diversity

Related Posts

「設計ミス」の社会を再編する:AIと共創する未来の働き方とシステム思考

こんにちは、Soraです。この記事をお読みいただき、ありがとうございます。突然ですが、少しだけ想像してみてください。朝、もう少しだけ布団の温もりを感じていたいのに、「仕事だから」と自分にムチを打って起き上がる。満員電車に身体を押し込まれ、会社に着けば成果を求められ、同僚のフォローに追われる。気づけば形式だけの会議が続き、帰宅する頃には自分のための時間はほとんど残っていない…。もし、こうした日々に少しでも心当たりがあるなら、ふと胸の奥で「このままで、本当にいいのだろうか?」という静かな声が聞こえることがあるのではないでしょうか。本稿では、その胸のざわめきを「個人の怠け」や「甘え」として片付けるのではなく、私たちを取り巻く社会そのものの「設計ミス」のシグナルとして捉え直すことを提案します。そして、その設計をどうすれば再編できるのか、具体的なデータも交えながら、皆さんと一緒に考えていきたいと思います。### 第一章|「労働=価値」という虚構の検証私たちはいつの間にか、「働くことが人間の価値を決める」という前提を内面化しています。しかし、この考え方は本当に自明なのでしょうか。いくつかのデータは、この前提が現代において大きな歪みを生んでいる可能性を示唆しています。 **異常に低い仕事への熱意:米ギャラップ社の調査によると、日本の「熱意あふれる社員」の割合はわずか5%。これは調査した139カ国中、最下位レベルです。多くの人が、仕事に対してポジティブな感情を持てずにいる現状が伺えます。* 構造的な高ストレス状態:厚生労働省の調査では、仕事で強いストレスを感じている労働者の割合は、常に半数を超えています。これは個人の精神的な強さの問題ではなく、労働環境そのものに構造的な問題が潜んでいることの現れです。* 先進国で低位の労働生産性:日本の時間当たり労働生産性は、OECD加盟38カ国中30位(2022年)と、長年低い水準にあります。長時間働き、高いストレスを感じているにもかかわらず、それが必ずしも高い成果に結びついていないのです。これらの事実は、「個人の努力が足りない」からではなく、「努力の方向性を規定する社会の設計そのもの」に無理が生じていることを示しているのではないでしょうか。### 第二章|人生を“準備期間”にしてしまうプログラム私たちの多くは、無意識のうちに次のような人生のレールに乗せられています。 **学生時代:より良い大学に入るための「準備」* 大学時代:より良い会社に入るための「準備」* 社会人時代:昇進や老後のための「準備」* 老後:人生の終わりを迎えるための「準備」人生が常に何かの「準備」の連続で、「今、この瞬間を生きる」ことが後回しにされてしまう。この構造を支えているのが、「安定こそが正義」「みんなと同じが安心」といった、思考停止を促す“プログラム”です。このプログラムは、私たちの感性を少しずつ麻痺させ、構造への疑問を抱かせないように作用します。**### 第三章|思考のOSを更新する「言語の再設計」社会のプログラムから抜け出し、自分自身の思考を取り戻す第一歩は、言葉を意識的に変えることです。固定観念を強化する言葉を、私は「毒語」と呼んでいます。この毒語を、本質を捉えた「対抗語彙」に置き換えることで、世界の見え方は大きく変わります。| 毒語(思考停止を招く言葉) | 対抗語彙(本質を捉える言葉) | 置き換えの狙い || :—…
Read More