Techletter #79 | June 29, 2024
Understanding environment variables in nodejs
- Starting from Node.js version 20.6.0, the runtime has built-in support for loading environment variables from a
.env
file. - You can load the
.env
file by running your Node.js script with the-env-file
flag, like this:node --env-file=.env your-script.js
. - Previously, we used the dotenv package for reading env variables, still, you can use it, however, node now can read env variables from a file without any package as well.
Use AI to complete boring tasks quickly
I am not sure about AI replacing a human software engineer completely, because, software engineering is not just about coding, several tasks need a significant amount of business context understanding. And the context is highly subjective.
However, all the manual tasks that can be automated will be automated using AI.
I use AI to better understand the code and write the documentation. Writing code documentation for other developers to use is a highly tedious task. Why? You not only develop your package but also write documentation along with it, any code change, will change the documentation. So to tackle this task I have started using AI completely. Of course, I still need to go through each line that it has written, but, it reduces my work by ~80%.
I would like to take a moment and thank you for reading this newsletter. Every week I write a newsletter that adds value to software engineers. If you find this helpful, do spread the word about this newsletter on your favorite social platform. It would mean a lot to me!
How tools ⚒️ that are built with no databases are adding significant value?
Every day I come across several tools that use no database, but help in software development a lot. For example, Code Editors & Programming Languages help craft wonderful software, just like a hammer and chisel for a beautiful sculpture. I believe every software engineer is just a sculptor.
Just like the person who makes a hammer or a chisel, there are people who build code editors, programming languages, operating systems, etc. Especially open-source software, without which there wouldn’t be much growth in the field of software engineering.
I personally use VS Code, TypeScript, nodejs, rollup (Module bundler), React, and many more which are all open source. When I look at their source code, they are just awesome. There are still many open-source applications that are awesome. There is a lot to learn in this field. Can you learn everything in this field? You can’t, you can explore several things but can master only a few. That’s the tradeoff in every field. At least I have experienced it. I am really grateful to all those people and the tools that exist. Because we build on the shoulders of giants.
A thought on productivity
“Productivity is most important for things you don’t want to be doing. Most people want to increase productivity so they can spend less time on the task.
But before you worry about being more productive, think about being more selective. Rather than focusing on increasing productivity, it may be worth asking, “What would I be delighted to spend time on, even if it went slowly?”
Direct your energy toward figuring out how to start what you want to do rather than thinking about how to shorten what you don’t want to do.”
- By James Clear, Author of Atomic Habits