🚀Day 2/200-Exploring Node.js Processes & Environment Variables Today I worked on understanding how parent and child processes behave in Node.js. 🔹 What I learned: A child process is a completely separate process, not a thread fork() creates a new Node process and runs the file automatically By default, environment variables are inherited from parent → child We can also inject custom env variables into the child process 🔹 Experiment: I created a custom variable (MY_VAR) that: ❌ Does not exist in the parent ✅ Exists only in the child process 🔹 Key Insight: Environment variables are process-specific, not global 🔹 Challenges I faced: Tried accessing process.env in the terminal (wrong context ❌) Confused between terminal vs Node runtime Debugging child process separately from parent 🔹 Solution: Used console.log and debugger inside child.js Understood the difference between system env vs process env 💡 This helped me clearly understand how Node.js handles processes internally. #NodeJS #BackendDevelopment #JavaScript #LearningInPublic #Debugging #WebDevelopment
Node.js Processes & Environment Variables Explained
More Relevant Posts
-
I got tired of console.log debugging React hooks. So I built something to make the invisible visible. The React Runtime Observatory instruments every major hook and shows you a live color-coded timeline, exactly when state changes, when effects fire, when components re-render and why. Some things I only understood better after building this: → useEffect runs after the render, not before. You can see the ordering in the timeline. → React.memo only prevents re-renders when props are referentially equal — not just equal in value. → useState and useReducer both trigger re-renders, but reducer centralizes the transition logic. → Writing instrumentation code taught me more about React internals than any tutorial ever did. Built with React + TypeScript. Live demo in the comments. #React #Frontend #WebDevelopment #TypeScript #JavaScript https://lnkd.in/dvY8KKhE
To view or add a comment, sign in
-
I spent 2 hours debugging my React code today. The problem? I forgot to add a key prop inside .map() 2 hours. Gone. We always check the big things first — API calls, state management, component logic... But the bug is always something embarrassing Here are 3 mistakes I make almost every week — ❌ Forgetting key prop in .map() ❌ Calling setState and expecting instant update ❌ Spending 1 hour on a bug that console.log solves in 2 minutes 3 years of experience and I still do this Tell me your most embarrassing bug in the comments 👇 I promise I won't judge. We have ALL been there. #reactjs #javascript #frontenddeveloper #webdevelopment #coding #100daysofcode #programminghumor
To view or add a comment, sign in
-
-
I spent 3 hours fixing a React bug yesterday. The issue wasn’t complex. My approach was. Earlier, whenever something broke in my app, I used to: ❌ randomly change code ❌ refresh again and again ❌ search Stack Overflow immediately Now I follow a simple process: ✅ check component re-renders ✅ inspect props and state flow ✅ verify API response structure ✅ use console logs step-by-step And honestly, debugging became much faster. One thing I’m learning as a developer: Writing code is important. But understanding why code breaks is what actually improves your skills. Curious to know — what’s the toughest bug you fixed recently? #ReactJS #WebDevelopment #JavaScript #FrontendDevelopment #CodingJourney #FullStackDeveloper #MERN
To view or add a comment, sign in
-
-
💡 Lesson Learned Today: While working on implementing search functionality in a React + Redux application, I faced an issue where the search input was updating correctly… but the results were not filtered at all 🤔 After debugging, I discovered an important insight: 👉 Not every “search issue” comes from the frontend. ✔️ The request was being sent correctly ✔️ The search parameter was included in the API call ❌ But the backend endpoint didn’t support filtering with that parameter 🔍 What I learned: Always verify: Is the correct parameter name being sent? Is the backend actually using it? Check the Network tab before assuming the issue 🚀 Sometimes the best debugging skill is knowing where the problem is NOT. #FrontendDevelopment #React #Redux #Debugging #WebDevelopment #LearningJourney
To view or add a comment, sign in
-
🚀 React Series - Day 9 Handling Forms in React (Controlled + Modern Approach) Forms are a core part of almost every application - login pages, registrations, search, and more. In React, forms are typically handled using a controlled approach. This means: • Form data is stored in state • Inputs are controlled by that state • Changes are handled using events like onChange This gives full control over user input and makes validation easier. However, as forms grow more complex, managing state manually can become repetitive and harder to scale. That’s why many developers use modern solutions like React Hook Form. It provides: • Better performance (fewer re-renders) • Easy validation • Cleaner and less repetitive code 👉 The idea is simple: Start with controlled components to understand the basics, then use tools like React Hook Form to handle real-world, complex forms efficiently. #reactjs #javascript #frontenddeveloper #webdevelopment #codinginterview #learnreact #30daysofcode #programming #reactinterview #react #coding
To view or add a comment, sign in
-
Mastering the Node.js Event Loop is essential for anyone working with this technology. Understanding the Event Loop can be a game changer. The Event Loop is what makes Node.js non-blocking and highly scalable. It handles operations in several phases: - Timers: Executes setTimeout and setInterval - Pending Callbacks: Handles I/O callbacks - Idle/Prepare: For internal use - Poll: Fetches new I/O events - Check: Executes setImmediate - Close Callbacks: Manages cleanup operations A key insight to remember is that Node.js doesn’t run everything at once; it smartly queues tasks and executes them phase by phase, ensuring efficient performance. As a bonus tip, understanding the difference between setTimeout, setImmediate, and process.nextTick can significantly enhance your debugging and optimization skills. #NodeJS #JavaScript #BackendDevelopment #EventLoop #WebDevelopment #CodingTips
To view or add a comment, sign in
-
-
I Thought This Was Easy ! Date: 9/4/2026 Today, I tried another React.js project: Transfer List. When I saw it for the first time, I realized this is too easy—only a game with array, and state updates. 😎 But? When I tried it, I got stuck ! 🤣 🤣 The first two functionalities—moving all items from the left box to the right box and vice versa—I made easily. 😊 But moving only checked items was the most challenging part of this project.🤔 Disabling buttons based on conditions (most time-consuming). After making this project, what I learned: 👉 Improved logical thinking about states. 👉 I learned why the Double-Bang operator is important. 👉 Strong command of filtering. And from what I know, these are the weak areas where improvement is required: 👉 Controlled Components 👉 I always use useState; I need to practice useReducer more. Github Repo - https://lnkd.in/gK9cqYxm #ReactJS #WebDevelopment #CodingJourney #JavaScript #CodeNewbie
To view or add a comment, sign in
-
Stop the console.log madness. 🛑 We’ve all been there: chasing a bug for hours, littering the code with console.log('here'), and accidentally pushing those logs to production. 🤦♂️ After 2 years of Full Stack development, I finally found a better way. The Fix: VS Code JavaScript Debug Terminal 🛠️ Instead of a standard terminal: Open the Terminal dropdown. Select "JavaScript Debug Terminal." Run your service normally (npm start). Why it’s a game changer: Breakpoints: Pause code execution instantly. Live Inspection: Hover over variables to see real-time data. Cleaner Code: Zero logs to delete before you push. Simple, clean, and much faster. Your production logs will thank you. #Javascript #NodeJS #VSCode #WebDev #CodingTips #FullStack
To view or add a comment, sign in
-
-
Recently, taught Redux, a powerful JavaScript library used for global state management in modern applications. 💡 Key Concepts Covered: 1. Understanding what Redux is and why it is used 2. Core building blocks: Reducer, Action, and Initial State 3. How reducers process actions and update the state 4. How the store maintains and manages the global state 5. How the UI interacts using useSelector and useDispatch 🧠 Deep Dive Learnings: 1. Explained in detail what a reducer function is and how it works internally Introduced Redux Toolkit (@reduxjs/toolkit), where creating and configuring a slice automatically generates reducer logic 2. Understood how react-redux bindings provide hooks like useDispatch to dispatch actions and useSelector to access state Below is the diagram from the session conducted #Redux #ReactJS #JavaScript #StateManagement #WebDevelopment #Learning #CodingJourney #TechEducation
To view or add a comment, sign in
-
-
I noticed most Node.js logging solutions are either too heavy or too minimal. So I built my own — logpaint 🎨 A lightweight, zero-dependency colored logger with built-in levels and TypeScript support. Instead of adding another heavy logging library, I wanted something: • Minimal • Zero config • Typed • Colorful output • Runtime level switching 💻 Website - https://lnkd.in/gp3HgeBX 🔴 NPM - https://lnkd.in/gNuSPXd4 ♐ GitHub - https://lnkd.in/gVXkyu-P Would love feedback from fellow developers 🙌 What feature should I add next? #opensource #nodejs #typescript #javascript #buildinpublic #developers #webdev #programming
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development