<?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>DEV Community: Bilal Haider</title>
    <description>The latest articles on DEV Community by Bilal Haider (@bilal_haider_697f82e123f3).</description>
    <link>https://dev.to/bilal_haider_697f82e123f3</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%2F3332615%2Fedaa7ea4-2026-47f9-aeb9-858af7c564e0.jpg</url>
      <title>DEV Community: Bilal Haider</title>
      <link>https://dev.to/bilal_haider_697f82e123f3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bilal_haider_697f82e123f3"/>
    <language>en</language>
    <item>
      <title>Free invoice generator tools</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Wed, 25 Feb 2026 14:56:23 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/free-invoice-generator-tools-285c</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/free-invoice-generator-tools-285c</guid>
      <description>&lt;p&gt;Managing billing manually can quickly become overwhelming as your business grows. From invoices to contracts and recurring payments, handling everything efficiently requires the right tools.&lt;/p&gt;

&lt;p&gt;Today, modern online platforms make it easy to manage your entire billing workflow in one place — saving time and reducing errors.&lt;/p&gt;

&lt;p&gt;All-in-one billing and client management solution&lt;/p&gt;

&lt;p&gt;A complete invoice maker should do more than just generate invoices. It should help businesses manage clients, create proposals, and automate recurring billing.&lt;/p&gt;

&lt;p&gt;You can try this all-in-one billing platform here:&lt;br&gt;
👉 &lt;a href="https://invoicegeneratorhub.com/" rel="noopener noreferrer"&gt;Free invoice generator platform&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Key features&lt;/p&gt;

&lt;p&gt;This tool provides a full suite of features designed for freelancers, agencies, and small businesses:&lt;/p&gt;

&lt;p&gt;📄 Invoice creation&lt;/p&gt;

&lt;p&gt;Create professional invoices quickly with customizable fields and instant download options.&lt;/p&gt;

&lt;p&gt;🔁 Recurring invoices&lt;/p&gt;

&lt;p&gt;Automate billing for subscription clients and save time with recurring invoice scheduling.&lt;/p&gt;

&lt;p&gt;📑 Proposals and quotations&lt;/p&gt;

&lt;p&gt;Generate proposals and quotations to send to clients before starting projects.&lt;/p&gt;

&lt;p&gt;📜 Contracts management&lt;/p&gt;

&lt;p&gt;Create and manage contracts to keep agreements organized and professional.&lt;/p&gt;

&lt;p&gt;👥 Client management&lt;/p&gt;

&lt;p&gt;Store client details securely in the database for easy access and faster invoice generation.&lt;/p&gt;

&lt;p&gt;🔗 Quick sharing&lt;/p&gt;

&lt;p&gt;Share invoices and documents instantly with clients using simple sharing options.&lt;/p&gt;

&lt;p&gt;Who is this tool best for?&lt;/p&gt;

&lt;p&gt;This platform is ideal for:&lt;/p&gt;

&lt;p&gt;Freelancers&lt;/p&gt;

&lt;p&gt;Agencies&lt;/p&gt;

&lt;p&gt;Consultants&lt;/p&gt;

&lt;p&gt;Developers&lt;/p&gt;

&lt;p&gt;Small businesses&lt;/p&gt;

&lt;p&gt;Startups&lt;/p&gt;

&lt;p&gt;It eliminates the need for multiple tools by combining everything into one streamlined system.&lt;/p&gt;

&lt;p&gt;Why use an all-in-one billing platform?&lt;/p&gt;

&lt;p&gt;Using a unified system helps improve productivity, maintain accurate records, and create a more professional experience for your clients.&lt;/p&gt;

&lt;p&gt;Instead of juggling spreadsheets and multiple apps, you can manage invoices, contracts, proposals, and client information in one place.&lt;/p&gt;

&lt;p&gt;Final thoughts&lt;/p&gt;

&lt;p&gt;If you want a simple yet powerful solution to manage your billing workflow, create recurring invoices, and store client data securely, this platform is a great choice.&lt;/p&gt;

&lt;p&gt;Check it out here:&lt;br&gt;
👉 &lt;a href="https://invoicegeneratorhub.com/" rel="noopener noreferrer"&gt;Free invoice generator platform&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>freelancing</category>
      <category>tools</category>
      <category>saas</category>
    </item>
    <item>
      <title>The Future of Programming Languages: Where Are We Headed?"</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 12:23:52 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/the-future-of-programming-languages-where-are-we-headed-582m</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/the-future-of-programming-languages-where-are-we-headed-582m</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Programming languages are the lifeblood of modern software development. From the creation of websites and mobile apps to AI systems and embedded devices, every digital innovation is powered by code. But as technology evolves rapidly, so do the tools used to build it. What will the future of programming languages look like?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Current Landscape
&lt;/h2&gt;

&lt;p&gt;Today, languages like JavaScript, Python, Java, and C# dominate the development world. JavaScript powers the web, Python fuels AI and automation, and Java and C# continue to anchor enterprise-level systems.&lt;/p&gt;

&lt;p&gt;Meanwhile, new challengers like Go, Rust, and TypeScript are gaining momentum—offering features like safety, speed, and scalability that address modern development needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Trends Shaping the Future
&lt;/h2&gt;

&lt;p&gt;AI-Assisted Development&lt;br&gt;
With tools like GitHub Copilot and ChatGPT, developers can now write code faster, debug smarter, and even generate entire functions automatically. This shift will influence how languages are designed—focusing more on readability and collaboration between humans and machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-Platform Expectations
&lt;/h2&gt;

&lt;p&gt;Developers want tools that let them build once and deploy everywhere. Languages that support cross-platform development (like Dart with Flutter or Kotlin Multiplatform) are expected to grow in popularity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory Safety and Performance
&lt;/h2&gt;

&lt;p&gt;C and C++ gave us power—but also vulnerabilities. Languages like Rust are leading the way by offering the same performance with built-in safety features. Expect more focus on preventing security issues through better language design.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer Experience
&lt;/h2&gt;

&lt;p&gt;A language that’s hard to write or maintain won’t last. The future belongs to languages that reduce boilerplate, offer strong typing (when needed), and have excellent tooling support.&lt;/p&gt;

&lt;h2&gt;
  
  
  Languages on the Rise
&lt;/h2&gt;

&lt;p&gt;Rust: Already loved for its memory safety and performance. Used by companies like Microsoft and Dropbox.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go:&lt;/strong&gt; Backed by Google, it’s great for concurrent systems and microservices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TypeScript:&lt;/strong&gt; JavaScript with types. It's now the default for large-scale front-end projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mojo:&lt;/strong&gt; A new language aiming to bring Python-like simplicity with C-level performance for AI and ML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Traditional Code on the Decline?
&lt;/h2&gt;

&lt;p&gt;Not entirely. Java, C++, and PHP still have massive codebases and communities. But their dominance is being challenged. Developers prefer newer languages with cleaner syntax, modern features, and safer defaults.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Role of AI
&lt;/h2&gt;

&lt;p&gt;AI isn't just changing how we write code—it's also reshaping what code is. AI-specific languages, libraries, and DSLs (Domain Specific Languages) like Julia, Mojo, or TensorFlow DSLs are emerging. Even more exciting? The potential for natural language programming, where developers can describe what they want in plain English.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speculative Glimpse: Will We Even Need to Code?
&lt;/h2&gt;

&lt;p&gt;With no-code and low-code platforms growing, and AI tools becoming increasingly powerful, it's possible that many tasks traditionally done by developers could be automated. But developers won’t disappear—they’ll evolve into system designers, prompt engineers, and architects.&lt;/p&gt;

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

&lt;p&gt;The future of programming languages is not about replacing one language with another. It's about evolution—toward safer, faster, and more intuitive tools. As AI becomes a co-pilot, and languages become more abstract or high-level, the best developers will be those who adapt, learn, and stay curious.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>productivity</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
    <item>
      <title>Top 20 React.JS interview questions.</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 11:54:06 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/top-20-reactjs-interview-questions-33j4</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/top-20-reactjs-interview-questions-33j4</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 20 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;Let's get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  01. What is React and what are its benefits?
&lt;/h2&gt;

&lt;p&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. Explain the concept of Components in React?
&lt;/h2&gt;

&lt;p&gt;Ans: A React component is a JavaScript function or class that returns a React element, which describes the UI for a piece of the application. Components can accept inputs called "props", and manage their own state.&lt;/p&gt;

&lt;h2&gt;
  
  
  05. What is JSX and why is it used in React?
&lt;/h2&gt;

&lt;p&gt;Ans: JSX is a syntax extension for JavaScript that allows embedding HTML-like syntax in JavaScript. It is used in React to describe the UI, and is transpiled to plain JavaScript by a build tool such as Babel.&lt;/p&gt;

&lt;h2&gt;
  
  
  06. 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;
  
  
  07. What is the difference between controlled and uncontrolled components in React?
&lt;/h2&gt;

&lt;p&gt;Ans: In React, controlled and uncontrolled components refer to the way that forms are handled. A controlled component is a component where the state of the form is controlled by React, and updates to the form's inputs are handled by event handlers. An uncontrolled component, on the other hand, relies on the default behavior of the browser to handle updates to the form's inputs.&lt;/p&gt;

&lt;p&gt;A controlled component is a component where the value of input fields is set by state and changes are managed by React's event handlers, this allows for better control over the form's behavior and validation, and it makes it easy to handle form submission.&lt;/p&gt;

&lt;p&gt;On the other hand, an uncontrolled component is a component where the value of the input fields is set by the default value attribute, and changes are managed by the browser's default behavior, this approach is less performant and it's harder to handle form submission and validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  08. What is Redux and how does it work with React?
&lt;/h2&gt;

&lt;p&gt;Ans: Redux is a predictable state management library for JavaScript applications, often used with React. It provides a centralized store for the application's state, and uses pure functions called reducers to update the state in response to actions.&lt;/p&gt;

&lt;p&gt;In a React app, Redux is integrated with React via the react-redux library, which provides the connect function for connecting components to the Redux store and dispatching actions. The components can access the state from the store, and dispatch actions to update the state, via props provided by the connect function.&lt;/p&gt;

&lt;h2&gt;
  
  
  09. 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;
  
  
  10. 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;
  
  
  11. What are React Hooks and how do they work?
&lt;/h2&gt;

&lt;p&gt;Ans: React Hooks are a feature in React that allow functional components to have state and other lifecycle methods without using class components. They make it easier to reuse state and logic across multiple components, making code more concise and easier to read. Hooks include useState for adding state and useEffect for performing side effects in response to changes in state or props. They make it easier to write reusable, maintainable code.&lt;/p&gt;

&lt;h2&gt;
  
  
  12. How does React handle state management?
&lt;/h2&gt;

&lt;p&gt;Ans: React handles state management through its state object and setState() method. The state object is a data structure that stores values that change within a component and can be updated using the setState() method. The state updates trigger a re-render of the component, allowing it to display updated values dynamically. React updates the state in an asynchronous and batched manner, ensuring that multiple setState() calls are merged into a single update for better performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  13. 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;
  
  
  14. Can you explain the concept of server-side rendering in React?
&lt;/h2&gt;

&lt;p&gt;Ans: Server-side rendering (SSR) in React is the process of rendering components on the server and sending fully rendered HTML to the browser. SSR improves the initial loading performance and SEO of a React app by providing a fully rendered HTML to the browser, reducing the amount of JavaScript that needs to be parsed and executed on the client, and improving the indexing of a web page by search engines. In SSR, the React components are rendered on the server and sent to the client as a fully formed HTML string, improving the initial load time and providing a more SEO-friendly web page.&lt;/p&gt;

&lt;h2&gt;
  
  
  15. 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;
  
  
  16. Can you explain the concept of React context?
&lt;/h2&gt;

&lt;p&gt;Ans: React context is a way to share data between components without passing props down manually through every level of the component tree. The context is created with a provider and consumed by multiple components using the useContext hook.&lt;/p&gt;

&lt;h2&gt;
  
  
  17. How does React handle routing and what are some popular routing libraries for React?
&lt;/h2&gt;

&lt;p&gt;Ans: React handles routing by using React Router library, which provides routing capabilities to React applications. Some popular routing libraries for React include React Router, Reach Router, and Next.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  18. 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;
  
  
  19. 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;h2&gt;
  
  
  20. How do you handle asynchronous data loading in React?
&lt;/h2&gt;

&lt;p&gt;Ans: Asynchronous data loading in React can be handled using various methods such as the fetch API, Axios, or other network libraries. It can also be handled using the useState and useEffect hooks to trigger a state update when data is returned from the API call. It is important to handle loading and error states properly to provide a good user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In conclusion,&lt;/strong&gt; this blog post covers the top 20 major questions that a React developer should know in 2023. The questions cover a wide range of topics from the basics of React, its benefits and architecture, to more advanced concepts such as JSX, state and props, controlled and uncontrolled components, Redux, Higher Order Components, and more. By trying to answer each question yourself before looking at the answers, you can gain a deeper understanding of the React framework and become a better React developer&lt;/p&gt;

</description>
      <category>react</category>
      <category>nextjs</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Highly Effective 7 Habits for Developers</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 11:50:10 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/highly-effective-7-habits-for-developers-483p</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/highly-effective-7-habits-for-developers-483p</guid>
      <description>&lt;p&gt;As a software developer, success doesn't just come from luck or chance. It is the result of years of hard work, continuous learning and development, and forming good habits. In the fast-paced world of technology, software developers must always be learning and adapting to keep up with the latest trends and advancements in their field. In this article, we will discuss 7 habits that can help you become a highly effective software developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;01 Map out a timetable:&lt;/strong&gt; Just like in school, having a timetable is essential for software developers. It helps you keep track of your daily activities and make sure you're using your time efficiently. When you're learning a new programming language, it's important to have a schedule in place that outlines when you'll be working on it and for how long. This way, you can stay focused and avoid distractions, and make the most of your learning time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;02 Embrace mistakes and learn from experiences:&lt;/strong&gt; No one is perfect, and as a software developer, you will make mistakes. It's important to embrace these mistakes and use them as opportunities to learn and grow. When you make a mistake, take time to reflect on what went wrong and what you can do better next time. This way, you'll be able to avoid making the same mistake in the future and become a better developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;03 Be consistent:&lt;/strong&gt; Consistency is key when it comes to software development. By setting aside time every day to work on your craft, you'll be able to make steady progress and become more skilled over time. Consistency also helps you identify areas that need improvement and gives you the time and motivation to work on them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;04 Find a mentor:&lt;/strong&gt; Having a mentor can be incredibly beneficial for software developers. A mentor can offer guidance, and advice, and help you overcome challenges. They can provide you with a fresh perspective and share their experiences and insights, which can be valuable when working on complex projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;05 Work on projects:&lt;/strong&gt; Learning by doing is one of the most effective ways to become a better software developer. By working on projects, you'll have the opportunity to put your skills to the test and gain real-world experience. It's important to choose projects that are aligned with your skill level and gradually increase the difficulty as you grow more comfortable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;06 Don't be a jack of all trades:&lt;/strong&gt; As a software developer, it's tempting to try and learn as many programming languages and technologies as possible. However, it's important to remember that being a jack of all trades won't necessarily make you a master of any. Instead, focus on mastering one area, and then move on to the next once you feel comfortable. This way, you'll be able to become a more specialized and in-demand developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;07 Stay up to date&lt;/strong&gt; with the latest advancements: The world of technology is constantly changing, and software developers must keep up with the latest advancements in their field. Read articles, attend webinars and conferences, and follow industry leaders on social media to stay informed and up to date with the latest trends and advancements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In conclusion,&lt;/strong&gt; forming good habits as a software developer can greatly enhance your career and lead to long-term success. By following these 7 habits, you'll be able to become a more effective, knowledgeable, and in-demand developer in no time.&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>health</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Git Cheatsheet that will make you a master in Git</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 11:39:14 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/git-cheatsheet-that-will-make-you-a-master-in-git-39d8</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/git-cheatsheet-that-will-make-you-a-master-in-git-39d8</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to Git
&lt;/h2&gt;

&lt;p&gt;Git is a widely used version control system that allows developers to track changes and collaborate on projects. It has become an essential tool for managing code changes, whether working solo or in a team. However, mastering Git can be a challenge, especially for beginners who are not familiar with its commands and features. In this Git cheatsheet, we will cover both the basic and advanced Git commands that every developer should know. From creating a repository to branching, merging, and beyond, this cheatsheet will serve as a handy reference guide for anyone looking to improve their Git skills and become a more proficient developer. Whether you are just starting with Git or looking to enhance your existing knowledge, this cheatsheet will help you make the most out of Git and optimize your workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Git commands
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Initialization&lt;/strong&gt;&lt;br&gt;
To initialize a new Git repository in the current directory, run the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This creates a hidden .git directory in the current directory that tracks changes to your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloning
&lt;/h2&gt;

&lt;p&gt;To clone an existing Git repository to your local machine, run the following command:&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 &amp;lt;repository URL&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a new directory on your computer with a copy of the repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Staging changes
&lt;/h2&gt;

&lt;p&gt;Before you commit changes to your code, you need to stage them using the git add command. This tells Git which changes you want to include in your commit.&lt;br&gt;
To stage a file or directory, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add &amp;lt;file/directory&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also stage all changes in the current directory by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Committing changes
&lt;/h2&gt;

&lt;p&gt;To commit the changes in the staging area with a commit message, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m "&amp;lt;commit message&amp;gt;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The commit message should briefly describe the changes you made in the commit.&lt;/p&gt;

&lt;p&gt;Checking status&lt;br&gt;
To check the current status of your repository, run the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This will show you which files have been modified, which files are staged for commit, and which files are untracked.&lt;/p&gt;

&lt;p&gt;Viewing changes&lt;br&gt;
To view the changes between the working directory and the staging area, run the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;To view the changes between the staging area and the last commit, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git diff --cached
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Branching
&lt;/h2&gt;

&lt;p&gt;Git allows you to create multiple branches of your code so that you can work on different features or fixes without affecting the main codebase. The default branch in Git is called master.&lt;br&gt;
To create a new branch with the specified name, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To switch to the specified branch, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also create and switch to a new branch in one command by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To merge the specified branch into the current branch, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git merge &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pushing changes&lt;br&gt;
To push changes to a remote repository, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push &amp;lt;remote&amp;gt; &amp;lt;branch&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; is the name of the remote repository, and  is the name of the branch you want to push.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pulling changes
&lt;/h2&gt;

&lt;p&gt;To pull changes from a remote repository, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull &amp;lt;remote&amp;gt; &amp;lt;branch&amp;gt;

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

&lt;/div&gt;



&lt;p&gt; is the name of the remote repository, and  is the name of the branch you want to pull.&lt;/p&gt;

&lt;h2&gt;
  
  
  Viewing history
&lt;/h2&gt;

&lt;p&gt;To view the commit history, run the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This will show you a list of all the commits in the repository, along with the commit message, author, and date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Git commands
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Reverting changes
&lt;/h2&gt;

&lt;p&gt;If you need to undo a commit, you can use the git revert command. This creates a new commit that undoes the changes made in the specified commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resetting changes
&lt;/h2&gt;

&lt;p&gt;If you want to undo a commit and remove it from the commit history, you can use the git reset command. This removes the specified commit and all subsequent commits from the commit history. There are three options for git reset: --soft, --mixed, and --hard.&lt;br&gt;
--soft only resets the commit history and leaves the changes in the staging area.&lt;br&gt;
--mixed resets the commit history and unstages the changes.&lt;br&gt;
--hard resets the commit history, unstages the changes, and discards all changes made after the specified commit.&lt;/p&gt;

&lt;p&gt;To reset the last commit using --soft, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --soft HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To reset the last commit using --mixed, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --mixed HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To reset the last commit using --hard, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git reset --hard HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Rebasing&lt;br&gt;
If you want to apply your changes to a different branch, you can use the git rebase command. This command applies your changes on top of the specified branch.&lt;br&gt;
To rebase the current branch onto the specified branch, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git rebase &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Stashing
&lt;/h2&gt;

&lt;p&gt;If you want to save changes without committing them, you can use the git stash command. This saves the changes in a stack of temporary commits, allowing you to switch to a different branch or work on something else.&lt;br&gt;
To stash your changes, run the following command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;To apply your changes again, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git stash apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Cherry-picking
&lt;/h2&gt;

&lt;p&gt;If you want to apply a specific commit from one branch to another, you can use the git cherry-pick command. This command applies the specified commit on top of the current branch.&lt;br&gt;
To cherry-pick the specified commit, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git cherry-pick &amp;lt;commit hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Git hooks
&lt;/h2&gt;

&lt;p&gt;Git hooks are scripts that run automatically before or after specific Git commands, allowing you to customize the behavior of Git. Git comes with a set of built-in hooks, but you can also create your own custom hooks.&lt;br&gt;
To create a custom Git hook, navigate to the .git/hooks directory in your Git repository and create a new file with the name of the hook you want to create (e.g., pre-commit, post-merge). The file should be executable and contain the script you want to run.&lt;/p&gt;
&lt;h2&gt;
  
  
  Git aliases
&lt;/h2&gt;

&lt;p&gt;Git aliases are shortcuts for Git commands, allowing you to save time and type less. You can create your own custom aliases using the git config command.&lt;br&gt;
To create a new alias, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global alias.&amp;lt;alias name&amp;gt; '&amp;lt;command&amp;gt;'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt; is the name of the alias you want to create, and  is the Git command you want to alias.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git workflows
&lt;/h2&gt;

&lt;p&gt;Git workflows are strategies for using Git to manage code changes in a team. There are several popular Git workflows, including the centralized workflow, the feature branch workflow, and the Gitflow workflow.&lt;br&gt;
The centralized workflow is a simple workflow that involves a single main branch, with all changes made directly to that branch.&lt;br&gt;
The feature branch workflow involves creating a new branch for each feature or bug fix, and merging those branches back into the main branch when the changes are complete.&lt;br&gt;
The Gitflow workflow is a more complex workflow that involves multiple branches, including a develop branch for ongoing development, a release branch for preparing releases, and feature branches for individual features.&lt;/p&gt;

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

&lt;p&gt;In conclusion, Git is a powerful tool for version control and managing code changes. It allows developers to collaborate on projects, track changes, and revert to previous versions when necessary. While the basic Git commands are essential to know, the advanced Git commands discussed in this cheat sheet can help you be more efficient and effective when working with Git.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>cheatsheet</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to create a Popover using React and Tailwind CSS</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 11:07:02 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/how-to-create-a-popover-using-react-and-tailwind-css-g53</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/how-to-create-a-popover-using-react-and-tailwind-css-g53</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;h2&gt;
  
  
  The Popover component:
&lt;/h2&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;h2&gt;
  
  
  Use the Popover component:
&lt;/h2&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>webdev</category>
      <category>tailwindcss</category>
      <category>react</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>How does ChatGPT generate human-like text?</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 11:03:04 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/how-does-chatgpt-generate-human-like-text-bl0</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/how-does-chatgpt-generate-human-like-text-bl0</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;p&gt;&lt;strong&gt;In summary,&lt;/strong&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;p&gt;&lt;strong&gt;disclaimer&lt;/strong&gt;: This post is also written using ChatGPT.&lt;/p&gt;

</description>
      <category>chatgpt</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Asynchronous programming in Javascript</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Thu, 10 Jul 2025 10:47:30 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/asynchronous-programming-in-javascript-32fl</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/asynchronous-programming-in-javascript-32fl</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;br&gt;
For example, consider the following code:&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.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Callback function executed.&lt;/p&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;p&gt;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;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, 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;
  
  
  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;br&gt;
Here is an example to demonstrate the use of async/await in JavaScript:&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;br&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;br&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>web3</category>
      <category>crypto</category>
      <category>blockchain</category>
      <category>asyn</category>
    </item>
    <item>
      <title>GitHub and EC2 manual deployment with Deploy keys</title>
      <dc:creator>Bilal Haider</dc:creator>
      <pubDate>Mon, 07 Jul 2025 19:29:10 +0000</pubDate>
      <link>https://dev.to/bilal_haider_697f82e123f3/github-and-ec2-manual-deployment-with-deploy-keys-112e</link>
      <guid>https://dev.to/bilal_haider_697f82e123f3/github-and-ec2-manual-deployment-with-deploy-keys-112e</guid>
      <description>&lt;p&gt;For those looking to quickly deploy a project, whether it’s a prototype or a solo endeavor, manual deployment with GitHub and AWS EC2 is a reliable and efficient method. Here’s a comprehensive guide to setting up your deployment using deploy keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Your EC2 Instance
&lt;/h2&gt;

&lt;p&gt;Begin by launching an on-demand EC2 instance on AWS. Access this instance via SSH, and use Git to clone or pull your repository. This setup will be similar to your local development environment, except you’ll need to configure environment variables specific to your server.&lt;/p&gt;

&lt;p&gt;To ensure your server is secure, configure nginx with SSL certificates. This adds a layer of security and professionalism to your deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using GitHub Deploy Keys
&lt;/h2&gt;

&lt;p&gt;Deploy keys provide a secure, read-only connection between your EC2 instance and your GitHub repository. Here’s how to set them up:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Generate SSH Keys
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -f ~/.ssh/my_project_deploy_key -C "your_email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using ed25519 instead of the more common RSA provides better security. The -C flag is optional but useful if you plan to use the key for commit signing in addition to deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Add the Public Key to GitHub
&lt;/h2&gt;

&lt;p&gt;In your GitHub repository, navigate to Settings &amp;gt; Deploy keys. Click Add Deploy Key, provide a descriptive title like "EC2 Deployment Key", and paste the contents of your public key file (~/.ssh/my_project_deploy_key.pub). For most deployment scenarios, you won’t need to enable write access&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Configure SSH for Git
&lt;/h2&gt;

&lt;p&gt;To allow your EC2 instance to access multiple repositories without using the default id_rsa key name, configure your SSH client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vim ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add the following entries to the file:&lt;br&gt;
Host github.com-my_project&lt;br&gt;
HostName github.com&lt;br&gt;
IdentityFile ~/.ssh/my_project_deploy_key&lt;br&gt;
User git&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host github.com-other_project
  HostName github.com
  IdentityFile ~/.ssh/other_deploy_key
  User git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration allows you to manage multiple repositories with different keys.&lt;/p&gt;

&lt;p&gt;To clone your repository, use the configured host:&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 git@github.com-my_project:your_github_org/your_repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then use git pull as needed to update your project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improving Your Deployment Process
&lt;/h2&gt;

&lt;p&gt;While this manual setup is quick and effective, it does have some limitations, such as downtime during updates. To minimize downtime, consider using a process manager like pm2, which supports zero-downtime restarts.&lt;/p&gt;

&lt;p&gt;As your project grows, SSH-based manual deployments might become cumbersome. Automating your deployment process can save time and reduce errors. You can use GitHub webhooks to trigger automatic deployments or configure your server as a Git remote to push updates directly. This approach can streamline your workflow and enhance efficiency.&lt;/p&gt;

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

&lt;p&gt;Deploying with GitHub and EC2 using deploy keys is a straightforward and effective way to manage your projects, especially for quick prototypes and solo projects. This method allows you to leverage the power of AWS and GitHub without the overhead of more complex deployment strategies. Stay tuned for future posts where we’ll explore advanced deployment techniques and best practices.&lt;/p&gt;

</description>
      <category>portfolio</category>
      <category>developer</category>
      <category>github</category>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
