<?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: CodingWith-Adam</title>
    <description>The latest articles on DEV Community by CodingWith-Adam (@codingwithadam).</description>
    <link>https://dev.to/codingwithadam</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%2F468103%2Fa8f17528-0538-46fe-b479-8570f1bb2491.jpeg</url>
      <title>DEV Community: CodingWith-Adam</title>
      <link>https://dev.to/codingwithadam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codingwithadam"/>
    <language>en</language>
    <item>
      <title>Getting Started with Server-Sent Events (SSE) using Express.js and EventSource</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 24 Jun 2024 22:08:45 +0000</pubDate>
      <link>https://dev.to/codingwithadam/getting-started-with-server-sent-events-sse-using-expressjs-and-eventsource-2c01</link>
      <guid>https://dev.to/codingwithadam/getting-started-with-server-sent-events-sse-using-expressjs-and-eventsource-2c01</guid>
      <description>&lt;p&gt;Server-Sent Events (SSE) is a technology that allows a server to push updates to the client over a single HTTP connection. It's a great way to handle real-time data in web applications, offering a simpler alternative to WebSockets for many use cases.&lt;/p&gt;

&lt;p&gt;If you prefer watching a tutorial, you can watch the accompanying video here. The video provides a step-by-step guide and further explanations to help you understand SSE better. It goes into more details than the written tutorial below.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ieUsuDsQY0o"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding HTTP Requests and Responses
&lt;/h2&gt;

&lt;p&gt;First, let's take a look at how a typical set of HTTP requests and responses work. In the diagram below, you can see that the client opens a connection for a resource such as an image, HTML file, or API call. The client then receives a response, and the connection closes. The client can then open another connection to make another request and receive a response, at which point the connection closes again.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksfcw9g5nbsjdb935bk1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksfcw9g5nbsjdb935bk1.png" alt="HTTP Request Response Diagram" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Server-Sent Events (SSE)
&lt;/h2&gt;

&lt;p&gt;With Server-Sent Events (SSE), a client can open a connection with a request and keep that connection open to receive multiple responses from the server. Once the connection is open, the communication direction is one-way: from the server to the client. The client cannot make additional requests over the same connection.&lt;/p&gt;

&lt;p&gt;The client initiates the connection with a request using an &lt;code&gt;Accept&lt;/code&gt; header of &lt;code&gt;text/event-stream&lt;/code&gt;. The server responds with a &lt;code&gt;Content-Type&lt;/code&gt; of &lt;code&gt;text/event-stream&lt;/code&gt; and typically uses &lt;code&gt;Transfer-Encoding: chunked&lt;/code&gt;. This encoding allows the server to send multiple chunks of data without knowing the total size of the response beforehand.&lt;/p&gt;

&lt;p&gt;In the diagram below, you can see how the SSE connection is established and how data flows from the server to the client:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tkayop0rl7syzluxr7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7tkayop0rl7syzluxr7v.png" alt="Server Sent Events Diagram" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Structure
&lt;/h2&gt;

&lt;p&gt;We'll be organizing our project into two main folders: server for the backend and client for the frontend.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sse-example/
├── client/
│   ├── index.html
│   └── index.js
└── server/
    ├── index.js
    └── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting Up the Server
&lt;/h2&gt;

&lt;p&gt;First, we'll create an Express.js server that can handle SSE connections. You'll need Node.js installed on your machine. Navigate to the server folder and initialize a new Node.js project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir server
cd server
npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the necessary dependencies:&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 express cors
npm install --save-dev nodemon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To use ES6 imports, make sure your package.json includes "type": "module":&lt;/p&gt;

&lt;p&gt;package.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "sse-example",
  "version": "1.0.0",
  "main": "index.js",
  "type": "module",
  "scripts": {
    "start": "nodemon index.js"
  },
  "dependencies": {
    "express": "^4.17.1",
    "cors": "^2.8.5"
  },
  "devDependencies": {
    "nodemon": "^2.0.7"
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, create a file called index.js in the server folder and add 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;import express from 'express';
import cors from 'cors';

const app = express();
const port = 3000;

app.use(cors());

app.get('/currentTime', (req, res) =&amp;gt; {
    res.setHeader('Content-Type', 'text/event-stream');
    res.setHeader('Cache-Control', 'no-cache');
    res.setHeader('Connection', 'keep-alive');

    const intervalId = setInterval(() =&amp;gt; {
        res.write(`data: ${new Date().toLocaleTimeString()}\n\n`);
    }, 1000);

    req.on('close', () =&amp;gt; {
        clearInterval(intervalId);
        res.end();
    });
});

app.listen(port, () =&amp;gt; {
    console.log(`Server running at http://localhost:${port}`);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we create an Express.js server that listens for GET requests on the /currentTime endpoint. The server sets the necessary headers for SSE and sends a timestamp to the client every second as a simple string. We also handle client disconnections by clearing the interval and ending the response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Client
&lt;/h2&gt;

&lt;p&gt;For the client side, we'll use a simple HTML file and JavaScript to handle the SSE stream. Create a client folder and create the following files index.html and index.js as per the file structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sse-example/
├── client/        &amp;lt;-- Here
│   ├── index.html &amp;lt;-- Here
│   └── index.js   &amp;lt;-- Here
└── server/
    ├── index.js
    └── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;index.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
    &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
    &amp;lt;script defer src="index.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;style&amp;gt;
      body {
        background-color: black;
        color: white;
      }
    &amp;lt;/style&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1 id="time"&amp;gt;Time&amp;lt;/h1&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;index.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const eventSource = new EventSource('http://localhost:3000/currentTime');

eventSource.onmessage = function(event) {
    document.getElementById('time').textContent = `${event.data}`;
};

eventSource.onerror = function() {
    console.log("EventSource failed.");
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this HTML and JavaScript setup, we create a connection to the server using EventSource and update the time displayed in the DOM as new messages are received. We also handle any errors that might occur with the EventSource connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the Example
&lt;/h2&gt;

&lt;p&gt;To run the example, start the Express.js server by executing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd server
npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, open index.html using VS Code Live Server extension. Install VS  Code Live server if you have not already by going to the extensions tab and finding &lt;code&gt;live server&lt;/code&gt; and clicking install. Once installed right click the index.Html file and click &lt;code&gt;Open With Live Server&lt;/code&gt;. Your default browser will open and you should see see the time being updated every second.&lt;/p&gt;

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

&lt;p&gt;Server-Sent Events provide an efficient way to handle real-time updates in web applications. With just a few lines of code, you can set up an SSE server and client to stream data seamlessly. Give it a try in your next project and enjoy the simplicity and power of SSE!&lt;/p&gt;

&lt;p&gt;Feel free to reach out with any questions or feedback in the comments below. Happy coding!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>html</category>
    </item>
    <item>
      <title>GitHub Copilot Top Features</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 13 May 2024 16:35:27 +0000</pubDate>
      <link>https://dev.to/codingwithadam/github-copilot-top-features-1p1</link>
      <guid>https://dev.to/codingwithadam/github-copilot-top-features-1p1</guid>
      <description>&lt;p&gt;GitHub Copilot is an AI pair programmer right in your IDE. By learning how to use GitHub Copilot you can increase your productivity. &lt;/p&gt;

&lt;p&gt;In this article we cover 12 amazing features of GitHub Copilot. For a video walkthrough check out the video linked at the bottom of the article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real Time Suggestions&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://media.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%2F9eorg2fqs0wabxxy6sau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F9eorg2fqs0wabxxy6sau.png" alt="real time suggestions"&gt;&lt;/a&gt;&lt;br&gt;
As you type code into your IDE Github copilot will give you suggestions in the form of ghost text. When this text appears you can choose to accept it, cycle through different options or decline it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inline Chat&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fyi1t4srcx4l01fpl2ae3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fyi1t4srcx4l01fpl2ae3.png" alt="inline chat"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The inline chat allows you to ask Copilot to modify code in the current open file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Voice Input&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fnz87rljtqlhrewe5hlfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnz87rljtqlhrewe5hlfa.png" alt="voice input"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is something satisfying about being able to communicate with your IDE verbally to complete a task. With the inline chat open click the microphone button and ask copilot a question or to perform a task on the open file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test Generation Command&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Faarcc3olzslmvhwpcly5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Faarcc3olzslmvhwpcly5.png" alt="Test Generation Command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not only can you ask Copilot to generate tests for you but you can do it quicker by using the &lt;code&gt;/tests&lt;/code&gt; command. You can ask it to generate tests for an entire file or a single function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Documentation Generation Command&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Feq2x7qrffyzdjo3c7r3q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Feq2x7qrffyzdjo3c7r3q.png" alt="doc generation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Documentation can be easily generated by using the &lt;code&gt;/doc&lt;/code&gt; command&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix Errors Command&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fm4zu1t38110h2b3ynujr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fm4zu1t38110h2b3ynujr.png" alt="fix error command"&gt;&lt;/a&gt;&lt;br&gt;
With the &lt;code&gt;/fix&lt;/code&gt; command you can ask Github copilot to find and fix issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explain Command&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fz9lzvcw7vqgk77g8a0zk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fz9lzvcw7vqgk77g8a0zk.png" alt="explain command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Working on a new code base you that you don't understand? Problem solved you can use the &lt;code&gt;/explain&lt;/code&gt; command to explain how the code works. Highlight the code you want explain and ask in the inline chat or ask it to explain the entire file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chat Panel&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Flswcilodfffo16f3arng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Flswcilodfffo16f3arng.png" alt="chat panel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The chat panel is an interactive chat where you can ask questions back and forth with GitHub Copilot. It's the same as using Chat GPT except that you can only ask questions that are related to software development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commit Message Generation&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2F4yoentetfz2m48onobjm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F4yoentetfz2m48onobjm.png" alt="commit message generation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub copilot makes it easy to generate commit messages from within VS Code. Just click the sparkle icon next to the commit message text box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agents&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fgmwkvkupeazmzscg06ec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fgmwkvkupeazmzscg06ec.png" alt="Agents"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the time of this article there are three agents Workspace, VS Code and Terminal. Agents setup the context for the chat panel and allow copilot work in a sandboxed environment of your code. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workspace Agent&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fttm42112nkdufbcj2nn5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fttm42112nkdufbcj2nn5.png" alt="workspace agent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The GitHub Copilot &lt;code&gt;@workspace&lt;/code&gt; agent enhances code suggestion capabilities by analyzing and understanding the entire context of your workspace, enabling it to make informed recommendations that align with your project's architecture and dependencies. It supports project-specific customization and advanced refactoring, improving code consistency and quality across multiple files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VSCode Agent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fmwgpok3t2hvqizkieaa1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fmwgpok3t2hvqizkieaa1.png" alt="vscode agent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@vscode&lt;/code&gt; agent allows you to ask questions about VS Code. It uses the documentation for VS Code to find your answer and guide you with instructions. For example you could ask &lt;code&gt;@vscode how do I change my theme&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal agent&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fwcpfvaw5riwm97v6o28i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fwcpfvaw5riwm97v6o28i.png" alt="terminal agent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@terminal&lt;/code&gt; agent allows you to ask question about terminal commands or even create commands. For example you could ask &lt;code&gt;@terminal how do I commit using git&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Follow the Sparkles&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.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%2F5u39kgtvozaebnu7u1m4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F5u39kgtvozaebnu7u1m4.png" alt="Copilot Sparkle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last feature is to follow the sparkles. Anywhere you see a sparkle give it a click and see what GitHub copilot can do for you.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/KjyMQzoJo8Y"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>githubcopilot</category>
      <category>ai</category>
      <category>github</category>
      <category>productivity</category>
    </item>
    <item>
      <title>React Hooks Explained - Crash Course</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 28 Aug 2023 17:56:30 +0000</pubDate>
      <link>https://dev.to/codingwithadam/react-hooks-explained-crash-course-5c9h</link>
      <guid>https://dev.to/codingwithadam/react-hooks-explained-crash-course-5c9h</guid>
      <description>&lt;p&gt;Learn all these react hooks in one short video: useState, useEffect, useContext, useMemo, useCallback, useRef, useReducer, useImperativeHandle. This tutorial also briefly covers forwardRef and memo.&lt;/p&gt;

&lt;p&gt;This is a crash course with quick explanations for each hook.&lt;br&gt;
Check out the video to learn more.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UWrSMWI8wbQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>react</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>21 Amazing VSCode Extensions</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 21 Aug 2023 18:50:45 +0000</pubDate>
      <link>https://dev.to/codingwithadam/21-amazing-vscode-extensions-101p</link>
      <guid>https://dev.to/codingwithadam/21-amazing-vscode-extensions-101p</guid>
      <description>&lt;p&gt;These are some of my favorite VSCode extensions that I use to increase my productivity. Checkout my video to learn more and see a demo of each extension.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/YjhkcvS1xKU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prettier&lt;/strong&gt; is an opinionated code formatter. I have it setup so that every time I save it formats my code. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Spell Checker&lt;/strong&gt; This extension is an awesome spell checker.  It really cuts down spelling mistakes and prevents those embarrassing spelling mistakes in pull requests. It supports English and many more languages. You can even add custom dictionaries&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker"&gt;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;EsLint&lt;/strong&gt; is a static code analysis tool for identifying problems in your javaScript code. With this extension it will highlight those problems provided you have ESLiint installed in the workspace or globally.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint"&gt;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error lens&lt;/strong&gt; is a perfect companion to ESLint  and other extensions that add language diagnostics. It will highlight the entire line when possible and show the error message inline.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens"&gt;https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Material Icons&lt;/strong&gt; The Material icon theme extension updates your explorer icons to material icons. The Icons look much nicer than the default icons and it even adds a folder icon.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme"&gt;https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;live server&lt;/strong&gt; extension allows you to launch a local development server with live reload. This extension is awesome for development with JavaScript, Html and CSS. I personally use it for javascript game development. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto Rename Tag&lt;/strong&gt; will automatically rename the closing tag for HTML or XML. In my opinion this is an overlooked feature that should be built into VSCode. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Peacock&lt;/strong&gt; - Have you ever worked on more than one project with different vsCode windows. It can get confusing which is which. Here is a simple solution to have a different color for each VSCode window using an extension called Peacock. With peacock we can easily set a different color for each VSCode project by opening the command palate and selecting peacock change favorite color.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock"&gt;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auto-open Markdown&lt;/strong&gt; is a great extension that will automatically open the preview of a MD file next to the edit version.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=hnw.vscode-auto-open-markdown-preview"&gt;https://marketplace.visualstudio.com/items?itemName=hnw.vscode-auto-open-markdown-preview&lt;/a&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Markdown All In One&lt;/strong&gt; adds keyboard shortcuts and more for markdown.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one"&gt;https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code runner&lt;/strong&gt; can run code snippets right in VSCode. It supports many languages. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner"&gt;https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jest extension&lt;/strong&gt; a fully featured test runner for Jest.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest"&gt;https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jest Runner&lt;/strong&gt; is a great alternative to the jest extension that adds a run and debug button above each test plus various context menus to run tests.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner"&gt;https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simple React Snippets&lt;/strong&gt; helps to speed up react development with many popular code snippets to write react code faster.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=burkeholland.simple-react-snippets"&gt;https://marketplace.visualstudio.com/items?itemName=burkeholland.simple-react-snippets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Github Copilot&lt;/strong&gt; is an AI pair programmer right in your IDE. It can suggest lines or entire functions to write. GitHub Copilot uses a special version of GPT-3 that has been trained on a large body of public source code. I have used it in the past and found it very useful unfortunately it is no longer free and requires a monthly subscription.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot"&gt;https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;IntelliCode extension&lt;/strong&gt; is an AI Assistant for python typescript, javascript and java. IntelliCode is an AI-boosted upgrade to the built in intelliSense code completion feature of VSCode. It uses AI to provide more accurate suggestions for code completion. It does this by analyzing a developer's code context to make these better suggestions. It is not as powerful as GitHub Copilot, however the price tag is free.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode"&gt;https://marketplace.visualstudio.com/items?itemName=VisualStudioExptTeam.vscodeintellicode&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;YAML&lt;/strong&gt; - if you write any YAML install this for its awesome autocompletion and validation of YAML. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml"&gt;https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitLens - Git Supercharged&lt;/strong&gt; as you can tell from the name adds a ton of git features to VSCode. The best feature is the git blame feature. It adds text to every line letting you know the last developer to modify the line of code.  Unfortunately some of the features require a subscription.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git Graph&lt;/strong&gt; is a graphical representation of your git log and allows you to perform actions from the graph.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph"&gt;https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git History&lt;/strong&gt; is a graphical representation of your git log and allows you to perform actions from the graph.&lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"&gt;https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;VSCode Pets&lt;/strong&gt; adds cute pixelated pets to VSCode. Each pet has a different animation that can amuse you while you code. You can even throw a ball for them to chase. &lt;br&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=tonybaloney.vscode-pets"&gt;https://marketplace.visualstudio.com/items?itemName=tonybaloney.vscode-pets&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>vscode</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Build an Awesome Version of Tic Tac Toe in React</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 14 Aug 2023 17:50:51 +0000</pubDate>
      <link>https://dev.to/codingwithadam/build-an-awesome-version-of-tic-tac-toe-in-react-5fbe</link>
      <guid>https://dev.to/codingwithadam/build-an-awesome-version-of-tic-tac-toe-in-react-5fbe</guid>
      <description>&lt;h3&gt;
  
  
  Try the game here:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://codingwith-adam.github.io/tic-tac-toe-react/"&gt;https://codingwith-adam.github.io/tic-tac-toe-react/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this Tutorial we are going to build an awesome version of Tic Tac Toe using React.&lt;/p&gt;

&lt;p&gt;Learn React concepts such as thinking in components, useState hook and useEffect hook. We also cover JS audio, CSS concepts such as flex-box and grid layouts for display and more to create a delightful UI.&lt;/p&gt;

&lt;p&gt;The following component diagram is used to help us think in components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8s2u1flK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ci75d8u3m24b4qzk4gu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8s2u1flK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ci75d8u3m24b4qzk4gu.png" alt="Tic Tac Toe React Component Diagram" width="800" height="804"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take the tutorial on youTube here: &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4Gt_YyGf6B0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Easily Change VSCode Color Theme</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 12 Jun 2023 19:06:05 +0000</pubDate>
      <link>https://dev.to/codingwithadam/how-to-easily-change-vscode-color-theme-1oka</link>
      <guid>https://dev.to/codingwithadam/how-to-easily-change-vscode-color-theme-1oka</guid>
      <description>&lt;p&gt;In this video I will show you how to easily change VSCode color theme with an extension called Peacock. This extension changes the color of the title bar, status bar and activity bar.&lt;/p&gt;

&lt;p&gt;Once installed the extension can be accessed from the command palette. Simply open the command palette and search for peacock. You can select from a list of predefined favorite colors. You can darken or lighten a selected color.  You can even save a favorite color.&lt;/p&gt;

&lt;p&gt;This extension is great for identifying different VSCode windows at a glance. If you work with other developers  and do not want to commit your color settings you can easily remove and reapply your changes when switching between branches.&lt;/p&gt;

&lt;p&gt;To learn more check out the wonderful documentation at &lt;a href="https://www.peacockcode.dev/guide/#overview"&gt;https://www.peacockcode.dev/guide/#overview&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock"&gt;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xmeV31LE0R8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
    </item>
    <item>
      <title>VS Code Pets!</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 20 Mar 2023 17:11:47 +0000</pubDate>
      <link>https://dev.to/codingwithadam/vs-code-pets-o18</link>
      <guid>https://dev.to/codingwithadam/vs-code-pets-o18</guid>
      <description>&lt;p&gt;Increase your productivity and happiness with the VSCode Pets extension!&lt;/p&gt;

&lt;p&gt;A fun extension that adds pets to your VSCode editor. Never be lonely again while working remote. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=tonybaloney.vscode-pets"&gt;https://marketplace.visualstudio.com/items?itemName=tonybaloney.vscode-pets&lt;/a&gt;&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/shorts/FdZoEWxviWU" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--UQXIxY_W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ytimg.com/vi/FdZoEWxviWU/hq2.jpg%3Fsqp%3D-oaymwEoCOADEOgC8quKqQMcGADwAQH4AbYIgAKAD4oCDAgAEAEYXyATKH8wDw%3D%3D%26rs%3DAOn4CLAGj-lyvWIMlIpQVBASwRV2eyQ-Bg" height="360" class="m-0" width="480"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/shorts/FdZoEWxviWU" rel="noopener noreferrer" class="c-link"&gt;
          VS Code Pets! - YouTube
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Increase your productivity and happiness with the VSCode Pets extension!A fun extension that adds pets to your VSCode editor. Never be lonely again while wor...
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZmwnVoMQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/00d32223/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>vscode</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How to Code Chrome Dino Game with JavaScript and a HTML Canvas</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Wed, 11 Jan 2023 00:29:38 +0000</pubDate>
      <link>https://dev.to/codingwithadam/how-to-code-chrome-dino-game-with-javascript-and-a-html-canvas-l17</link>
      <guid>https://dev.to/codingwithadam/how-to-code-chrome-dino-game-with-javascript-and-a-html-canvas-l17</guid>
      <description>&lt;p&gt;In this exciting tutorial we are going to build a clone of the chrome dinosaur game with Javascript and a HTML Canvas. This version of the game can be played on a touch screen or with a keyboard. The game will scale to fit on any size screen.&lt;/p&gt;

&lt;p&gt;Try the game out &lt;a href="https://codingwith-adam.github.io/dino-game/index.html" rel="noopener noreferrer"&gt;here.&lt;/a&gt; On a mobile device play in landscape orientation for the best experience.&lt;/p&gt;

&lt;p&gt;The goal of the game is for the dinosaur to avoid the obstacles by jumping over them. As the dinosaur runs along the desert it will encounter cactuses. If you don't jump over them it's game over. Our dino can perform a low or high jump. A low jump is achieved with a quick tap of the screen or quick press of the space bar. A high jump requires taping the screen longer or pressing the space bar longer.&lt;/p&gt;

&lt;h2&gt;
  
  
  We will cover the following topics and more:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Game loop&lt;/li&gt;
&lt;li&gt;Animation&lt;/li&gt;
&lt;li&gt;Collision detection&lt;/li&gt;
&lt;li&gt;Scaling a game to fit to any size screen.&lt;/li&gt;
&lt;li&gt;How to take into account different frame rates.&lt;/li&gt;
&lt;li&gt;Randomly generating enemy sprites(cactuses)&lt;/li&gt;
&lt;li&gt;and much more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you enjoy this tutorial please subscribe, like and share on YouTube.&lt;/p&gt;

&lt;h3&gt;
  
  
  YouTube Tutorial:
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ooru4pyEv1I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>How to use ChatGPT AI to Create the Game Snake in JavaScript</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 19 Dec 2022 22:56:11 +0000</pubDate>
      <link>https://dev.to/codingwithadam/how-to-use-chatgpt-ai-to-create-the-game-snake-in-javascript-113i</link>
      <guid>https://dev.to/codingwithadam/how-to-use-chatgpt-ai-to-create-the-game-snake-in-javascript-113i</guid>
      <description>&lt;p&gt;In this video we use ChatGPT an AI assistant to help us create the game snake in javascript. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UEwnv3F8JlA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Introduction to Lexers, Parsers and Interpreters with Chevrotain</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Mon, 28 Nov 2022 19:40:24 +0000</pubDate>
      <link>https://dev.to/codingwithadam/introduction-to-lexers-parsers-and-interpreters-with-chevrotain-5c7b</link>
      <guid>https://dev.to/codingwithadam/introduction-to-lexers-parsers-and-interpreters-with-chevrotain-5c7b</guid>
      <description>&lt;p&gt;In this exciting tutorial we are going to learn how to use a library called Chevrotain. It can be used to build parsers/compilers/interpreters for various use cases ranging from simple config files to full fledged programming languages. If you ever wondered how programming languages are built this is a great introduction. We will start with an intro to lexers(tokenization), parsers, grammars and much more. Then build a simple calculator that uses all these concepts. &lt;/p&gt;

&lt;p&gt;Other than building a simple calculator using chevrotain the concepts that we will learn here are those that are used to build programming languages like javascript, .net, SQL and much more. Perhaps one day you will make your own language. There is a lot to understand and this tutorial will give you an idea of further areas to explore.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fb1d3fu7q6vw4o1ckpkst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fb1d3fu7q6vw4o1ckpkst.png" alt="Lexer Parser Interpreter Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are 3 primary concepts in the diagram above.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The lexer which takes input as a string and converts the input into a set of tokens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Parser which takes the tokens from the lexer and returns a syntax tree based on a grammar. The grammar is often expressed in a meta language such as Backus-Naur Form (BNF). The grammar is the language of languages and provides the rules and syntax.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The interpreter which takes in the syntax tree and evaluates the result. In this case we return the result of calculator input. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check out the video tutorial to learn more:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/l-jMsoAY64k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;To learn more about Chevrotain visit: &lt;br&gt;
&lt;a href="https://chevrotain.io/" rel="noopener noreferrer"&gt;https://chevrotain.io/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>computerscience</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to use JS Gamepad API and Build a Gamepad Tester in 12 minutes</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Wed, 23 Nov 2022 00:43:26 +0000</pubDate>
      <link>https://dev.to/codingwithadam/how-to-use-js-gamepad-api-and-build-a-gamepad-tester-in-12-minutes-26if</link>
      <guid>https://dev.to/codingwithadam/how-to-use-js-gamepad-api-and-build-a-gamepad-tester-in-12-minutes-26if</guid>
      <description>&lt;p&gt;An easy to build gamepad tester using the JavaScript Gamepad API. This gamepad tester displays a controller and highlights the buttons being pressed. It can even show the position of the analog sticks in real time.&lt;/p&gt;

&lt;p&gt;Check out the video to learn more:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UXTOXF8Y2Cs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>gamedev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to use JavaScript Gamepad API to Build a Simple Game</title>
      <dc:creator>CodingWith-Adam</dc:creator>
      <pubDate>Wed, 16 Nov 2022 23:21:14 +0000</pubDate>
      <link>https://dev.to/codingwithadam/how-to-use-javascript-gamepad-api-to-build-a-simple-game-12am</link>
      <guid>https://dev.to/codingwithadam/how-to-use-javascript-gamepad-api-to-build-a-simple-game-12am</guid>
      <description>&lt;p&gt;In this exciting tutorial we will use the JavaScript Gamepad API to build a simple game to move a player around on the screen using a controller.&lt;/p&gt;

&lt;p&gt;We will be programming the direction pad and left analog stick to move the player on the screen. We will also use the face buttons to change the color of the player depending on the button pressed.&lt;/p&gt;

&lt;p&gt;The JS Gamepad API allows developers to use a gamepad as an input device. The most common usage would be for game development. The Gamepad API has 2 events. One event for when a controller is connected and another for when it is disconnected. There is no event for when a button is pressed on the controller. However the developer can ask the Gamepad for the state of the buttons at any time. Included in this state is the list of buttons and a list of axes that represent the analog sticks if there are any. Checking for the controller state can be done in a loop or on a timer. For game development this will happen in the game loop. At the start of each game loop you can retrieve the state of the buttons and then use that information to manipulate your game.&lt;/p&gt;

&lt;p&gt;Learn more in this tutorial:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/GOjMP6WY8CU"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>gamedev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
