<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ambrish Goswami</title>
    <description>The latest articles on Forem by Ambrish Goswami (@ambrishgoswami80).</description>
    <link>https://forem.com/ambrishgoswami80</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2134559%2Fdede6949-dabf-4b33-8d9a-ce7227feb2fd.jpeg</url>
      <title>Forem: Ambrish Goswami</title>
      <link>https://forem.com/ambrishgoswami80</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ambrishgoswami80"/>
    <language>en</language>
    <item>
      <title>Highly Effective 7 Habits for Developers</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Fri, 07 Nov 2025 17:02:41 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/highly-effective-7-habits-for-developers-ckm</link>
      <guid>https://forem.com/ambrishgoswami80/highly-effective-7-habits-for-developers-ckm</guid>
      <description>&lt;p&gt;In the fast-paced world of technology, developers must constantly adapt and evolve to stay ahead.&lt;br&gt;&lt;br&gt;
Here are &lt;strong&gt;7 habits&lt;/strong&gt; that can help you become a &lt;em&gt;highly effective&lt;/em&gt; software developer 👇&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 1. Map Out a Timetable
&lt;/h2&gt;

&lt;p&gt;Just like in school, having a &lt;strong&gt;timetable&lt;/strong&gt; is essential for software developers.&lt;br&gt;&lt;br&gt;
It helps you track your daily progress and use time efficiently.&lt;/p&gt;

&lt;p&gt;When learning a new programming language or framework, create a schedule that defines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you’ll study or code
&lt;/li&gt;
&lt;li&gt;How long each session will be
&lt;/li&gt;
&lt;li&gt;What specific topics you’ll cover
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consistency in following your timetable builds discipline and focus — key traits for long-term success.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 2. Embrace Mistakes and Learn from Experiences
&lt;/h2&gt;

&lt;p&gt;No one writes perfect code the first time.&lt;br&gt;&lt;br&gt;
Instead of getting frustrated, &lt;strong&gt;analyze your mistakes&lt;/strong&gt; — understand &lt;em&gt;why&lt;/em&gt; something broke and &lt;em&gt;how&lt;/em&gt; to fix it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every bug you solve teaches you something new.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Learning from failures not only strengthens your technical skills but also improves your problem-solving mindset.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔁 3. Be Consistent
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Consistency beats intensity.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Spending one focused hour every day on coding is better than 10 hours of irregular effort.&lt;/p&gt;

&lt;p&gt;Regular practice helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retain what you learn
&lt;/li&gt;
&lt;li&gt;Build muscle memory for syntax
&lt;/li&gt;
&lt;li&gt;Develop confidence in tackling challenges
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even small, steady progress compounds into mastery over time.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧓 4. Find a Mentor
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;mentor&lt;/strong&gt; can accelerate your growth like nothing else.&lt;/p&gt;

&lt;p&gt;They offer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-world insights
&lt;/li&gt;
&lt;li&gt;Feedback on your code
&lt;/li&gt;
&lt;li&gt;Guidance during tough decisions
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don’t hesitate to reach out to experienced developers or community leaders — most are happy to help if you show initiative.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 5. Work on Projects
&lt;/h2&gt;

&lt;p&gt;Theory is good, but &lt;strong&gt;real learning happens through projects.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Start small — maybe a portfolio site, a mini-game, or an API integration.&lt;/p&gt;

&lt;p&gt;Working on real projects helps you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apply what you learn
&lt;/li&gt;
&lt;li&gt;Face real-world debugging
&lt;/li&gt;
&lt;li&gt;Build a strong GitHub profile
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;“The best way to learn to code is by coding.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  🎯 6. Don’t Be a Jack of All Trades
&lt;/h2&gt;

&lt;p&gt;It’s tempting to learn every language and framework out there.&lt;br&gt;&lt;br&gt;
But trying to master everything at once spreads you too thin.&lt;/p&gt;

&lt;p&gt;Instead, &lt;strong&gt;go deep, not wide&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pick one stack (e.g., MERN, Python-Django, etc.)
&lt;/li&gt;
&lt;li&gt;Master its fundamentals
&lt;/li&gt;
&lt;li&gt;Then gradually explore new areas like blockchain or Web3
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Expertise in one field often opens doors to others.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ 7. Stay Up to Date with the Latest Advancements
&lt;/h2&gt;

&lt;p&gt;The tech world evolves daily — staying current is part of your job.  &lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow top developers on X (Twitter) or LinkedIn
&lt;/li&gt;
&lt;li&gt;Subscribe to dev newsletters
&lt;/li&gt;
&lt;li&gt;Attend webinars and hackathons
&lt;/li&gt;
&lt;li&gt;Explore new trends like &lt;strong&gt;AI&lt;/strong&gt;, &lt;strong&gt;Web3&lt;/strong&gt;, or &lt;strong&gt;blockchain&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Continuous learning ensures you stay relevant and in-demand.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 In Conclusion
&lt;/h2&gt;

&lt;p&gt;Forming good habits as a developer doesn’t just make you productive — it makes you &lt;strong&gt;unstoppable&lt;/strong&gt;.&lt;br&gt;&lt;br&gt;
By practicing these 7 habits, you’ll be able to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stay consistent
&lt;/li&gt;
&lt;li&gt;Learn from every experience
&lt;/li&gt;
&lt;li&gt;Build meaningful projects
&lt;/li&gt;
&lt;li&gt;And grow into a confident, world-class developer 🌟&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;💬 &lt;em&gt;What’s one habit that’s helped you grow as a developer?&lt;/em&gt;&lt;br&gt;&lt;br&gt;
Share your thoughts in the comments — let’s learn from each other!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>programming</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Finally, I Found The Best AI IDE! (And It Might Surprise You...)</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Mon, 10 Feb 2025 06:41:37 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/finally-i-found-the-best-ai-ide-and-it-might-surprise-you-1eib</link>
      <guid>https://forem.com/ambrishgoswami80/finally-i-found-the-best-ai-ide-and-it-might-surprise-you-1eib</guid>
      <description>&lt;p&gt;For months, I've been on a quest. A quest for something that felt like a true leap forward in software development. I've dabbled with AI-powered code completion, experimented with clunky plugins, and even considered selling a kidney to afford some of the pricier "AI-enhanced" IDEs. I was starting to think the perfect blend of power, flexibility, and (crucially) affordability was a myth.&lt;/p&gt;

&lt;p&gt;Then, I stumbled upon a constellation of tools that changed everything. Forget incremental improvements – we're talking about a paradigm shift. Let's dive into the world of AI IDEs, and I'll reveal the combination that finally made me say, "This is it!"&lt;/p&gt;

&lt;h2&gt;
  
  
  The Frustration is Real (and Familiar)
&lt;/h2&gt;

&lt;p&gt;Let's be honest. Traditional coding can be... tedious. We spend countless hours wrestling with syntax, debugging obscure errors, and searching Stack Overflow for that one line of code that'll fix everything. The promise of AI assistance is tantalizing:&lt;/p&gt;

&lt;h2&gt;
  
  
  Imagine:
&lt;/h2&gt;

&lt;p&gt;Code that practically writes itself.&lt;br&gt;
 ## Imagine: &lt;br&gt;
Bugs that are squashed before they even hatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Imagine:
&lt;/h2&gt;

&lt;p&gt;An IDE that understands your intent, not just your syntax.&lt;/p&gt;

&lt;p&gt;But the reality, until now, has often fallen short. Many "AI" tools felt like glorified autocomplete, offering suggestions that were more distracting than helpful. Others were locked behind hefty paywalls, making them inaccessible to many developers.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>ai</category>
      <category>programming</category>
    </item>
    <item>
      <title>Make an Image drag and drop with CSS in React</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Sat, 04 Jan 2025 15:21:47 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/make-an-image-drag-and-drop-with-css-in-react-359i</link>
      <guid>https://forem.com/ambrishgoswami80/make-an-image-drag-and-drop-with-css-in-react-359i</guid>
      <description>&lt;p&gt;React is a popular JavaScript library for building user interfaces, and its flexibility and versatility make it a great choice for building interactive applications. In this tutorial, we will show you how to create a drag-and-drop feature for images using only CSS in React.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 —
&lt;/h2&gt;

&lt;p&gt;To start, let's set up a React project. You can use either Create React App or any other setup method that works best for you. Let's make a React application using create-react-app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app drag-and-drop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 —
&lt;/h2&gt;

&lt;p&gt;Replace App.js and App.css with the below code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './App.css';

function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;h2 className="heading"&amp;gt;Select Image:&amp;lt;/h2&amp;gt;
      &amp;lt;div className="image-area"&amp;gt;

      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;App.css&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.App {
  text-align: center;
  width: 100vw;
  height: 100vh;

}

.heading {
  font-size: 32px;
  font-weight: 500;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3 —
&lt;/h2&gt;

&lt;p&gt;Now create a new file and component ImageContainer.js in the src directory and take a div for drag and drop container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ImageContainer.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';

const ImageContainer = () =&amp;gt; {

    return (
        &amp;lt;div className="image-container"&amp;gt;

        &amp;lt;/div&amp;gt;
    );
};

export default ImageContainer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then make a CSS file ImageContainer.css in the src directory and add some styles in the image container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ImageContainer.css&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.image-container {
    width: 60%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(0, 0, 0, .3);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4 —
&lt;/h2&gt;

&lt;p&gt;Now we will take a div with an input field and input text title inside the .image-container class and add some style in the ImageContainer.css file. We will also take a state for the image URL and an onChage function for the update state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ImageContainer.js will be&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import './ImageContainer.css';

const ImageContainer = () =&amp;gt; {
    const [url, setUrl] = React.useState('');

    const onChange = (e) =&amp;gt; {
        const files = e.target.files;
        files.length &amp;gt; 0 &amp;amp;&amp;amp; setUrl(URL.createObjectURL(files[0]));
    };

    return (
        &amp;lt;div className="image-container"&amp;gt;
            &amp;lt;div className="upload-container"&amp;gt;
                &amp;lt;input
                    type="file"
                    className="input-file"
                    accept=".png, .jpg, .jpeg"
                    onChange={onChange}
                /&amp;gt;
                &amp;lt;p&amp;gt;Drag &amp;amp; Drop here&amp;lt;/p&amp;gt;
                &amp;lt;p&amp;gt;or&amp;lt;/p&amp;gt;
                &amp;lt;p&amp;gt;Click&amp;lt;/p&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    );
};

export default ImageContainer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ImageContainer.css will be&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.image-container {
    width: 60%;
    height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(0, 0, 0, .3);
}

.upload-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.upload-container&amp;gt;p {
    font-size: 18px;
    margin: 4px;
    font-weight: 500;
}

.input-file {
    display: block;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5 —
&lt;/h2&gt;

&lt;p&gt;Now we will preview the image file conditionally. If you have dropped an image will render the image and or render the drag-and-drop area.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ImageContainer.js will be&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import './ImageContainer.css';

const ImageContainer = () =&amp;gt; {
    const [url, setUrl] = React.useState('');

    const onChange = (e) =&amp;gt; {
        const files = e.target.files;
        files.length &amp;gt; 0 &amp;amp;&amp;amp; setUrl(URL.createObjectURL(files[0]));
    };

    return (
        &amp;lt;div className="image-container"&amp;gt;
            {
                url ?
                    &amp;lt;img
                        className='image-view'
                        style={{ width: '100%', height: '100%' }}
                        src={url} alt="" /&amp;gt;
                    :
                    &amp;lt;div className="upload-container"&amp;gt;
                        &amp;lt;input
                            type="file"
                            className="input-file"
                            accept=".png, .jpg, .jpeg"
                            onChange={onChange}
                        /&amp;gt;
                        &amp;lt;p&amp;gt;Drag &amp;amp; Drop here&amp;lt;/p&amp;gt;
                        &amp;lt;p&amp;gt;or &amp;lt;span style={{ color: "blue" }} &amp;gt;Browse&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;

                    &amp;lt;/div&amp;gt;
            }
        &amp;lt;/div&amp;gt;
    );
};

export default ImageContainer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6 —
&lt;/h2&gt;

&lt;p&gt;Now we will import the ImageContainer component in our App.js and run our application using the npm start command and have fun while coding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;App.js will be&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './App.css';
import ImageContainer from './ImageContainer';

function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;h2 className="heading"&amp;gt;Select Image:&amp;lt;/h2&amp;gt;
      &amp;lt;div className="image-area"&amp;gt;
        &amp;lt;ImageContainer /&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this tutorial, we showed you how to create a drag-and-drop feature for images using only CSS in React.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>css</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Asynchronous programming in Javascript</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Sat, 04 Jan 2025 15:03:51 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/asynchronous-programming-in-javascript-3adl</link>
      <guid>https://forem.com/ambrishgoswami80/asynchronous-programming-in-javascript-3adl</guid>
      <description>&lt;p&gt;JavaScript, being a single-threaded language, can only process one task at a time. This can result in long wait times for complex tasks, as the script will be blocked from executing any other tasks until it has been completed. To tackle this, JavaScript offers asynchronous programming, which allows the script to continue executing other tasks while it waits for an asynchronous task to complete. In this blog, we’ll explore the basics of asynchronous programming in JavaScript and how it can be achieved through the use of callback functions, promises, and async/await.&lt;/p&gt;

&lt;h2&gt;
  
  
  Callback Functions
&lt;/h2&gt;

&lt;p&gt;A callback function is a function that is passed as an argument to another function and is executed after the main function has been completed. Callbacks are used in asynchronous programming to wait for a task to complete before executing the next step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example, consider the following code:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function slowTask(callback) {
  setTimeout(() =&amp;gt; {
    console.log("Slow task completed.");
    callback();
  }, 1000);
}

function runProgram() {
  console.log("Program started.");
  slowTask(() =&amp;gt; {
    console.log("Callback function executed.");
  });
  console.log("Program ended.");
}

runProgram();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the slowTask function takes a callback as an argument. The slowTask function uses setTimeout to delay the execution of a task for one second. The runProgram function calls slowTask and passes a callback function as an argument. The runProgram function also logs "Program started" and "Program ended". When the slowTask function has been completed, it logs "Slow task completed" and executes the callback function, which logs "Callback function executed".&lt;br&gt;
The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program started.
Program ended.
 Slow task completed.
Callback function executed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Promises
&lt;/h2&gt;

&lt;p&gt;Promises are a more modern approach to asynchronous programming in JavaScript. A promise represents the result of an asynchronous operation and can be in one of three states: pending, fulfilled, or rejected. A promise can be created using the Promise constructor, and its state can be determined using the then and catch methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  For example:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const slowTask = new Promise((resolve, reject) =&amp;gt; {
  setTimeout(() =&amp;gt; {
    resolve("Slow task completed.");
  }, 1000);
});

function runProgram() {
  console.log("Program started.");
  slowTask
    .then((result) =&amp;gt; {
      console.log(result);
    })
    .catch((error) =&amp;gt; {
      console.error(error);
    });
  console.log("Program ended.");
}

runProgram();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, slowTask is a promise that is resolved after one second with the result "Slow task completed.". The runProgram function calls slowTask and uses the then method to log the result when the promise is fulfilled.&lt;br&gt;
The output will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Program started.
Program ended.
Slow task completed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Async/Await
&lt;/h2&gt;

&lt;p&gt;Async/await is the latest and most readable way to handle asynchronous operations in JavaScript. It allows developers to write asynchronous code that looks like synchronous code, making it easier to understand and maintain. The async keyword is used to declare an asynchronous function, and the await keyword is used to wait for a promise to be resolved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here is an example to demonstrate the use of async/await in JavaScript:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function fetchData() {
  const response = await fetch("https://api.example.com/data");
  const data = await response.json();
  console.log(data);
}

fetchData();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the fetchData function is declared as asynchronous using the async keyword. The function uses fetch to retrieve data from an API, and await is used to wait for the fetch operation to complete. The resolved response is then transformed into a JSON object using response.json(). The await keyword is used to wait for the JSON transformation to complete, and the final result is logged to the console.&lt;/p&gt;

&lt;p&gt;It's important to note that the code within an asynchronous function will be executed asynchronously, but the code outside of the function will still be executed synchronously. Also, the await keyword can only be used within an asynchronous function.&lt;/p&gt;

&lt;p&gt;In conclusion, asynchronous programming in JavaScript allows the script to continue executing other tasks while it waits for an asynchronous task to complete. Callback functions, promises, and async/await are three ways to achieve asynchronous programming in JavaScript. Callback functions are the simplest and most basic way to handle asynchronous operations, while promises offer a more modern and flexible approach. Async/await provides the most readable way to handle asynchronous operations and is the recommended method for modern JavaScript programming. Understanding asynchronous programming in JavaScript is important for creating efficient and responsive applications, and is a must-have skill for any JavaScript developer.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>react</category>
      <category>gftwhackathon</category>
    </item>
    <item>
      <title>How does ChatGPT generate human-like text?</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Sat, 04 Jan 2025 04:17:00 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/how-does-chatgpt-generate-human-like-text-1dd</link>
      <guid>https://forem.com/ambrishgoswami80/how-does-chatgpt-generate-human-like-text-1dd</guid>
      <description>&lt;p&gt;ChatGPT, developed by OpenAI, is a cutting-edge language model that has made a significant impact in the field of natural language processing. It uses deep learning algorithms to generate human-like text based on the input it receives, making it an excellent tool for chatbots, content creation, and other applications that require natural language processing. In this post, we will explore the workings of ChatGPT to understand how it generates human-like text.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core of ChatGPT :
&lt;/h2&gt;

&lt;p&gt;The backbone of ChatGPT is a transformer-based neural network that has been trained on a massive amount of text data. This training allows the model to understand the patterns and relationships between words in a sentence and how they can be used to generate new text that is coherent and meaningful. The transformer-based architecture is a novel approach to machine learning that enables the model to learn and make predictions based on the context of the input. This makes it ideal for language models that need to generate text that is relevant to the context of a conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How ChatGPT Generates Text :
&lt;/h2&gt;

&lt;p&gt;ChatGPT uses an autoregressive language modeling approach to generate text. When you provide input to ChatGPT, the model first encodes the input into a vector representation. This representation is then used to generate a probability distribution over the next word in the sequence. The model selects the most likely next word and generates a new vector representation based on the new input. This process is repeated until the desired length of text has been developed.&lt;/p&gt;

&lt;p&gt;One of the key strengths of ChatGPT is its ability to handle context. The model has been trained to understand the context of a conversation and can generate text that is relevant to the current topic. This allows it to respond to questions and generate text that is relevant to the context of the conversation. This makes it an excellent tool for chatbots, as it can understand the user's intention and respond accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scalability and Fine-tuning :
&lt;/h2&gt;

&lt;p&gt;Another critical aspect of ChatGPT is its scalability. The model can be fine-tuned for specific use cases by training it on specific data sets. This allows it to generate text that is more tailored to the needs of the application. For example, if ChatGPT is being used in a customer service chatbot, it can be fine-tuned on data that is relevant to customer service queries to generate more accurate and relevant responses. This fine-tuning process can be done by using transfer learning, where the model is trained on a smaller data set, leveraging the knowledge it gained from its training on the larger data set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world Applications :
&lt;/h2&gt;

&lt;p&gt;ChatGPT has a wide range of real-world applications, from content creation to customer service. It can be used to generate news articles, creative writing, and even poetry. In customer service, ChatGPT can be used as a chatbot to respond to customer queries, freeing up human agents to handle more complex issues. Additionally, ChatGPT can be used in language translation, as it has the ability to understand the context of a conversation and translate text accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  In summary
&lt;/h2&gt;

&lt;p&gt;ChatGPT's ability to generate human-like text and understand context makes it a versatile tool with endless potential applications. Its deep learning algorithms and transformer-based architecture allow it to generate coherent and meaningful text, making it an exciting development in the field of natural language processing. Whether it's being used in customer service, content creation, or language translation, ChatGPT has the potential to revolutionize the way we interact with machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion :
&lt;/h2&gt;

&lt;p&gt;In conclusion, this blog has explored the workings of ChatGPT, a cutting-edge language model developed by OpenAI. We have seen that the model is based on a transformer-based neural network that has been trained on massive amounts of text data, allowing it to generate human-like text based on the context of a conversation. Its scalability and fine-tuning capabilities make it a valuable tool for a wide range of applications, from customer service to content creation. With its ability to understand the context and generate coherent and meaningful text, ChatGPT has the potential to revolutionize the way we interact with machines and will play a crucial role in the development of AI-powered applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  disclaimer:
&lt;/h2&gt;

&lt;p&gt;This post is also written using ChatGPT.&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>webdev</category>
      <category>openai</category>
      <category>ai</category>
    </item>
    <item>
      <title>Build an awesome developer portfolio website</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Sat, 04 Jan 2025 04:00:29 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/build-an-awesome-developer-portfolio-website-13d1</link>
      <guid>https://forem.com/ambrishgoswami80/build-an-awesome-developer-portfolio-website-13d1</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;As a software developer, it's important to have a robust portfolio website that can display our abilities and experiences. To assist other developers, I have designed a portfolio website using Next, Tailwind CSS, and EmailJS. In this article, I will provide a step-by-step guide on the setup process, along with the GitHub link.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here is the live:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://portfolioambrish.netlify.app" rel="noopener noreferrer"&gt;Live preview url&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2tdqjrpqvp4m6augnic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2tdqjrpqvp4m6augnic.png" alt=" " width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  STEP 01:
&lt;/h2&gt;

&lt;p&gt;Clone the Repository using GitHub link and change the directory to the developer-portfolio.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/ambrishgoswami80/github-portfolio.git
cd github-portfolio
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  STEP 02:
&lt;/h2&gt;

&lt;p&gt;Now install all packages using npm or yarn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
# or
yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After installation, all packages, Now change all data on utils/data/* according to you. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; export const userData = {
  githubUser: 'ambrishgoswami',
  devUsername: "ambrishgoswami80",
  github: 'https://github.com/ambrishgoswami',
  instagram: 'https://www.instagram.com/divine.ambrish/',
  linkedIn: 'https://www.linkedin.com/in/goswamiambrish/',
  twitter: 'https://twitter.com/AmbrishGos76042',
  stackOverflow: 'https://stackoverflow.com/users/16840768/ambrish-goswami',
  leetcode: "https://leetcode.com/Ambrishgoswami/",
  resume: "https://drive.google.com/file/d/1-e5tfmd6SO48jAEaSOp1P1uMZAMEyeiB/view?usp=drive_link",
  skills: ['React', 'NodeJS', 'React', 'Express', 'NextJS', 'MySql', 'MongoDB', 'AWS'],
  timezone: '+6'
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The devusername properties replace it with your dev.to username and it will fetch all blogs from your dev.to website.&lt;/p&gt;

&lt;h2&gt;
  
  
  STEP 03:
&lt;/h2&gt;

&lt;p&gt;Now we will make a .env file and set up our Email.JS credential in a .env file. I am using EmailJs in this project for the user to send mail to me and It's free. The .env file will be the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_GTM = ""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  STEP 04:
&lt;/h2&gt;

&lt;p&gt;Now the portfolio website is ready for the run. You can run it using npm or yarn.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm run dev
# or
yarn dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Disclaimer: In this repository, I have used some open-source APIs. All credits go to the owners of those repositories.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>portfolio</category>
      <category>devpolio</category>
      <category>webdev</category>
      <category>nestjs</category>
    </item>
    <item>
      <title>How to create a Popover using React and Tailwind CSS</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Fri, 27 Sep 2024 18:19:28 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/hi-1ahg</link>
      <guid>https://forem.com/ambrishgoswami80/hi-1ahg</guid>
      <description>&lt;p&gt;Popover is a common UI element in web applications, providing a way to display additional information or options when interacting with a particular element. With React and TailwindCSS, most of the time developers use an npm library for the Popover or Popover. You know, when we use an npm library, it increases the project build sizes.&lt;br&gt;
In this article, I will create a reusable Popover component using Tailwind CSS. We will use click and hover triggers for the Popover.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Popover component:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// @flow strict
"use client"
import { useEffect, useRef, useState } from "react";

function ReactPopover({
  children,
  content,
  trigger = "click"
}) {
  const [show, setShow] = useState(false);
  const wrapperRef = useRef(null);

  const handleMouseOver = () =&amp;gt; {
    if (trigger === "hover") {
      setShow(true);
    };
  };

  const handleMouseLeft = () =&amp;gt; {
    if (trigger === "hover") {
      setShow(false);
    };
  };

  useEffect(() =&amp;gt; {
    function handleClickOutside(event) {
  if (wrapperRef.current &amp;amp;&amp;amp; !wrapperRef.current.contains(event.target)) {
        setShow(false);
      }
    }

    if (show) {
      // Bind the event listener
      document.addEventListener("mousedown", handleClickOutside);
      return () =&amp;gt; {
        // Unbind the event listener on clean up
        document.removeEventListener("mousedown", handleClickOutside);
      };
    }
  }, [show, wrapperRef]);

  return (
    &amp;lt;div
      ref={wrapperRef}
      onMouseEnter={handleMouseOver}
      onMouseLeave={handleMouseLeft}
      className="w-fit h-fit relative flex justify-center"&amp;gt;
      &amp;lt;div
        onClick={() =&amp;gt; setShow(!show)}
      &amp;gt;
        {children}
      &amp;lt;/div&amp;gt;
      &amp;lt;div
        hidden={!show}
 className="min-w-fit w-[200px] h-fit absolute bottom-[100%] z-50 transition-all"&amp;gt;
        &amp;lt;div className="rounded bg-white p-3 shadow-[10px_30px_150px_rgba(46,38,92,0.25)] mb-[10px]"&amp;gt;
          {content}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default ReactPopover;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this component the trigger default value is click and you can pass hover as an attribute. When you click outside of the Popover, the Popover will be closed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the Popover component:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import ReactPopover from "@/components/common/react-popover";

const Page = () =&amp;gt; {
  return (
    &amp;lt;div className="w-screen h-screen flex justify-center items-center gap-4"&amp;gt;
      &amp;lt;ReactPopover
        content={
          &amp;lt;p&amp;gt;This Content Will be render in Popover.&amp;lt;/p&amp;gt;
        }
      &amp;gt;
        &amp;lt;button className="bg-indigo-500 px-4 py-1.5 border rounded text-white"&amp;gt;
          Click me
        &amp;lt;/button&amp;gt;
      &amp;lt;/ReactPopover&amp;gt;
      &amp;lt;ReactPopover
        trigger="hover"
        content={
          &amp;lt;p&amp;gt;This Content Will be render in Popover.&amp;lt;/p&amp;gt;
        }
      &amp;gt;
        &amp;lt;button className="bg-indigo-500 px-4 py-1.5 border rounded text-white"&amp;gt;
          Hover me
        &amp;lt;/button&amp;gt;
      &amp;lt;/ReactPopover&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Page;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>tailwindcss</category>
      <category>react</category>
      <category>nextjs</category>
      <category>css</category>
    </item>
    <item>
      <title>Top 10 React js interview questions.</title>
      <dc:creator>Ambrish Goswami</dc:creator>
      <pubDate>Fri, 27 Sep 2024 16:56:38 +0000</pubDate>
      <link>https://forem.com/ambrishgoswami80/top-10-react-js-interview-questions-7ii</link>
      <guid>https://forem.com/ambrishgoswami80/top-10-react-js-interview-questions-7ii</guid>
      <description>&lt;p&gt;As a React developer, it is important to have a solid understanding of the framework's key concepts and principles. With this in mind, I have put together a list of 10 important questions that every React developer should know, whether they are interviewing for a job or just looking to improve their skills.&lt;/p&gt;

&lt;p&gt;Before diving into the questions and answers, I suggest trying to answer each question on your own before looking at the answers provided. This will help you gauge your current level of understanding and identify areas that may need further improvement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's get started!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;## 01. What is React and what are its benefits?&lt;br&gt;
Ans: React is a JavaScript library for building user interfaces. It is used for building web applications because it allows developers to create reusable UI components and manage the state of the application in an efficient and organized way.&lt;/p&gt;

&lt;h2&gt;
  
  
  02. What is the virtual DOM and how does it work?
&lt;/h2&gt;

&lt;p&gt;Ans: The Virtual DOM (Document Object Model) is a representation of the actual DOM in the browser. It enables React to update only the specific parts of a web page that need to change, instead of rewriting the entire page, leading to increased performance.&lt;/p&gt;

&lt;p&gt;When a component's state or props change, React will first create a new version of the Virtual DOM that reflects the updated state or props. It then compares this new version with the previous version to determine what has changed.&lt;/p&gt;

&lt;p&gt;Once the changes have been identified, React will then update the actual DOM with the minimum number of operations necessary to bring it in line with the new version of the Virtual DOM. This process is known as "reconciliation".&lt;/p&gt;

&lt;p&gt;The use of a Virtual DOM allows for more efficient updates because it reduces the amount of direct manipulation of the actual DOM, which can be a slow and resource-intensive process. By only updating the parts that have actually changed, React can improve the performance of an application, especially on slow devices or when dealing with large amounts of data.&lt;/p&gt;

&lt;h2&gt;
  
  
  03. How does React handle updates and rendering?
&lt;/h2&gt;

&lt;p&gt;Ans: React handles updates and rendering through a virtual DOM and component-based architecture. When a component's state or props change, React creates a new version of the virtual DOM that reflects the updated state or props, then compares it with the previous version to determine what has changed. React updates the actual DOM with the minimum number of operations necessary to bring it in line with the new version of the virtual DOM, a process called "reconciliation". React also uses a component-based architecture where each component has its own state and render method. It re-renders only the components that have actually changed. It does this efficiently and quickly, which is why React is known for its performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  04. What is the difference between state and props?
&lt;/h2&gt;

&lt;p&gt;Ans: State and props are both used to store data in a React component, but they serve different purposes and have different characteristics.&lt;/p&gt;

&lt;p&gt;Props (short for "properties") are a way to pass data from a parent component to a child component. They are read-only and cannot be modified by the child component.&lt;/p&gt;

&lt;p&gt;State, on the other hand, is an object that holds the data of a component that can change over time. It can be updated using the setState() method and is used to control the behavior and rendering of a component.&lt;/p&gt;

&lt;h2&gt;
  
  
  05. Can you explain the concept of Higher Order Components (HOC) in React?
&lt;/h2&gt;

&lt;p&gt;Ans: A Higher Order Component (HOC) in React is a function that takes a component and returns a new component with additional props. HOCs are used to reuse logic across multiple components, such as adding a common behavior or styling.&lt;/p&gt;

&lt;p&gt;HOCs are used by wrapping a component within the HOC, which returns a new component with the added props. The original component is passed as an argument to the HOC, and receives the additional props via destructuring. HOCs are pure functions, meaning they do not modify the original component, but return a new, enhanced component.&lt;/p&gt;

&lt;p&gt;For example, an HOC could be used to add authentication behavior to a component, such as checking if a user is logged in before rendering the component. The HOC would handle the logic for checking if the user is logged in, and pass a prop indicating the login status to the wrapped component.&lt;/p&gt;

&lt;p&gt;HOCs are a powerful pattern in React, allowing for code reuse and abstraction, while keeping the components modular and easy to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  06. What is the difference between server-side rendering and client-side rendering in React?
&lt;/h2&gt;

&lt;p&gt;Ans: Server-side rendering (SSR) and client-side rendering (CSR) are two different ways of rendering a React application.&lt;/p&gt;

&lt;p&gt;In SSR, the initial HTML is generated on the server, and then sent to the client, where it is hydrated into a full React app. This results in a faster initial load time, as the HTML is already present on the page, and can be indexed by search engines.&lt;/p&gt;

&lt;p&gt;In CSR, the initial HTML is a minimal, empty document, and the React app is built and rendered entirely on the client. The client makes API calls to fetch the data required to render the UI. This results in a slower initial load time, but a more responsive and dynamic experience, as all the rendering is done on the client.&lt;/p&gt;

&lt;h2&gt;
  
  
  07. How do work useEffect hook in React?
&lt;/h2&gt;

&lt;p&gt;Ans: The useEffect hook in React allows developers to perform side effects such as data fetching, subscription, and setting up/cleaning up timers, in functional components. It runs after every render, including the first render, and after the render is committed to the screen. The useEffect hook takes two arguments - a function to run after every render and an array of dependencies that determines when the effect should be run. If the dependency array is empty or absent, the effect will run after every render.&lt;/p&gt;

&lt;h2&gt;
  
  
  08. How does React handle events and what are some common event handlers?
&lt;/h2&gt;

&lt;p&gt;Ans: React handles events through its event handling system, where event handlers are passed as props to the components. Event handlers are functions that are executed when a specific event occurs, such as a user clicking a button. Common event handlers in React include onClick, onChange, onSubmit, etc. The event handler receives an event object, which contains information about the event, such as the target element, the type of event, and any data associated with the event. React event handlers should be passed&lt;br&gt;
as props to the components, and the event handlers should be defined within the component or in a separate helper function.&lt;/p&gt;

&lt;h2&gt;
  
  
  09. What are some best practices for performance optimization in React?
&lt;/h2&gt;

&lt;p&gt;Ans: Best practices for performance optimization in React include using memoization, avoiding unnecessary re-renders, using lazy loading for components and images, and using the right data structures.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. How does React handle testing and what are some popular testing frameworks for React?
&lt;/h2&gt;

&lt;p&gt;Ans: React handles testing using testing frameworks such as Jest, Mocha, and Enzyme. Jest is a popular testing framework for React applications, while Mocha and Enzyme are also widely used.&lt;/p&gt;

&lt;p&gt;In conclusion, understanding key concepts and principles of React is crucial for every React developer. This article provides answers to 10 important questions related to React including what is React, the virtual DOM, how React handles updates and rendering, the difference between state and props, Higher Order Components, server-side rendering and client-side rendering, and more. Understanding these topics will help developers to build efficient and effective web applications using React.&lt;/p&gt;

&lt;p&gt;Connect with me on Linkedin : &lt;a href="https://www.linkedin.com/in/goswamiambrish/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/goswamiambrish/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>node</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
