<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Adrian Carter</title>
    <description>The latest articles on Forem by Adrian Carter (@adrvnc).</description>
    <link>https://forem.com/adrvnc</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%2F840597%2F26c9bc61-d6e7-403a-8edf-5e97bdefd216.jpg</url>
      <title>Forem: Adrian Carter</title>
      <link>https://forem.com/adrvnc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/adrvnc"/>
    <language>en</language>
    <item>
      <title>Setting up a Development Environment: A Guide for New Web Developers</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Sun, 08 Oct 2023 16:14:50 +0000</pubDate>
      <link>https://forem.com/adrvnc/setting-up-a-development-environment-a-guide-for-new-web-developers-bl0</link>
      <guid>https://forem.com/adrvnc/setting-up-a-development-environment-a-guide-for-new-web-developers-bl0</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choosing an Operating System&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Text Editors and IDEs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Programming Languages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Version Control System&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Package Managers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Browser Developer Tools&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Testing Frameworks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Database Management System&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Setting up a developer environment refers to providing a computer system with all the tools, software, and settings required to write, test, and deploy code effectively. It's a digital workspace where developers can create, edit, and run software projects.&lt;/p&gt;

&lt;p&gt;This list will go through the foundational elements of setting up a developer environment. Depending on your specific project, you might need additional tools and frameworks. &lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing an Operating System
&lt;/h2&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%2F3fillxz42p4exhr3o6uc.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%2F3fillxz42p4exhr3o6uc.png" alt="Windows, macOS, and Linux Logos"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An operating system (OS) is the software that makes your electronic device function properly and helps run other programs. It manages your desktop, laptop, tablet, or mobile device. &lt;/p&gt;

&lt;p&gt;Some of the most popular operating systems, for web developers, include Microsoft Windows, macOS, and Linux. &lt;/p&gt;

&lt;h2&gt;
  
  
  Text Editors and IDEs
&lt;/h2&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%2F19050lf671sr5kh393nf.jpg" 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%2F19050lf671sr5kh393nf.jpg" alt="Text Editor Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A text editor and an Integrated Developer Environment (IDE) are both software tools developers use. However, they serve different purposes and have different features.  &lt;/p&gt;

&lt;p&gt;IDEs are more of a comprehensive package for software development. It typically includes a text editor, a debugger, version control, and more. IDEs are best for building a big project with lots of parts. Some common examples of IDEs include Visual Studio, Eclipse, and PyCharm. &lt;/p&gt;

&lt;p&gt;Text editors are versatile tools for writing code, creating documents, taking notes, and more. They don't have the same complexities that IDEs typically do. Text editors are best for building smaller, less complex projects. Some common examples of Text Editors include Visual Studio Code, Sublime Text, and Atom. &lt;/p&gt;

&lt;p&gt;Visual Studio is unique because it has the features of a text editor and an IDE. &lt;/p&gt;

&lt;h2&gt;
  
  
  Programming Languages
&lt;/h2&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%2Fnzctazyzq734nkrfqb5p.jpg" 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%2Fnzctazyzq734nkrfqb5p.jpg" alt="Programming Languages"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Depending on the project you work on and its requirements, you will need to install the appropriate programming language and its associated packages and dependencies. For example, if you are working with JavaScript and its frameworks, such as React for front-end development, you would need to install Node.js as the runtime environment and use a package manager like npm to install necessary libraries like React, Redux, and other supporting modules. &lt;/p&gt;

&lt;h2&gt;
  
  
  Version Control System
&lt;/h2&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%2Fmgrwausv94tv7z9hzec0.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%2Fmgrwausv94tv7z9hzec0.png" alt="Git Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Version Control Systems (VCS) are tools that allow you to track and manage changes to your code or files over time with commands. They also provide a way to collaborate on projects with other developers. Git is one of the most widely used version control systems. &lt;/p&gt;

&lt;p&gt;To perform git commands on your computer, you'll need to open a terminal or command-line interface (CLI). Each operating system comes with a built-in terminal. &lt;/p&gt;

&lt;p&gt;To learn more about git and the command line, &lt;a href="https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html" rel="noopener noreferrer"&gt;read the documentation on GitLab&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Package Managers
&lt;/h2&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%2Fdd2ygktr28bpwkogudem.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%2Fdd2ygktr28bpwkogudem.png" alt="npm logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As briefly mentioned, these tools manage libraries, dependencies, and third-party packages needed for your projects. Examples include npm for JavaScript, pip for Python, and Maven for Java. &lt;/p&gt;

&lt;h2&gt;
  
  
  Browser Developer Tools
&lt;/h2&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%2F6s6l18k74l4mzgfy7saq.jpg" 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%2F6s6l18k74l4mzgfy7saq.jpg" alt="Chrome DevTools Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Browser developer tools are built-in features in web browsers that allow developers to inspect, debug, and optimize web applications. A popular example is Chrome DevTools.&lt;/p&gt;

&lt;p&gt;You can access developer tools in your browser using two methods, depending on your operating system:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows/Linux:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press &lt;code&gt;Ctrl + Shift + I&lt;/code&gt; or &lt;code&gt;F12.&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-click on the page and select "Inspect" or "Inspect Element".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Mac:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Press &lt;code&gt;Cmd + Option + I&lt;/code&gt; or &lt;code&gt;Cmd + Option + J.&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Right-click on the page and select "Inspect" or "Inspect Element".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will open up a panel at the bottom or side of your browser window with various tabs for inspecting and modifying elements, monitoring network activity, debugging JavaScript, and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing Frameworks
&lt;/h2&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%2Ftyebmpu6785u1o40tsgw.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%2Ftyebmpu6785u1o40tsgw.png" alt="13 Types of Testing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're developing applications, it's important to have testing frameworks in place to make sure your code is working as expected. Examples include Mocha for JavaScript, JUnit for Java, and Unittest for Python.  &lt;/p&gt;

&lt;p&gt;In software engineering, there are various types of testing. While the type of testing may vary depending on the project's scope and complexity, testing is regarded as a fundamental best practice. &lt;/p&gt;

&lt;h2&gt;
  
  
  Database Management System
&lt;/h2&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%2Fsxbzi2nqsjt7fiops6ln.jpg" 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%2Fsxbzi2nqsjt7fiops6ln.jpg" alt="SQL Vs. NoSQL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Database Management System (DBMS) creates, organizes, retrieves, and manages data in a database. &lt;/p&gt;

&lt;p&gt;If your project involves databases, you need a Database Management System like MySQL, PostgreSQL, MongoDB, etc. &lt;/p&gt;

&lt;p&gt;There are two main types of databases: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relational Databases:&lt;/strong&gt; Suited for handling structured data with a specific, predefined format like a table. An example of a relational database is PostgreSQL. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Non-Relational Database (NoSQL):&lt;/strong&gt; Suited for handling unstructured data like text documents, emails, and social media posts. An example of a NoSQL database is MongoDB. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Optimizing User Interface: Understanding Media Queries and Design Approaches</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Mon, 25 Sep 2023 15:11:35 +0000</pubDate>
      <link>https://forem.com/adrvnc/optimizing-ui-understanding-media-queries-and-design-approaches-f1i</link>
      <guid>https://forem.com/adrvnc/optimizing-ui-understanding-media-queries-and-design-approaches-f1i</guid>
      <description>&lt;h2&gt;
  
  
  The Purpose of Media Queries
&lt;/h2&gt;

&lt;p&gt;Developers today face the crucial task of ensuring their applications' user interfaces (UI) adapt seamlessly to various devices and screen sizes. Neglecting this aspect can lead to reduced engagement and a subpar user experience (UX), potentially putting your product or service at a competitive disadvantage. Media queries, a cornerstone of web development, enable developers to tailor styles and layouts based on device characteristics like screen size, resolution, and orientation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mobile-First and Desktop-First Designs
&lt;/h2&gt;

&lt;p&gt;Mobile-first and desktop-first designs are two approaches to creating responsive websites or applications. A mobile-first approach begins with designing the website or application for mobile devices with smaller screens and scaling up to devices with larger screens. A desktop-first approach begins with designing the website or application for desktop or larger screens and scaling down to devices with smaller screens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yPurloOc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3vi0ortxub9iyfn80xnq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yPurloOc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3vi0ortxub9iyfn80xnq.jpg" alt="Mobile-first and Desktop-first design" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this illustration, both approaches address varying screen sizes. The desktop-first (responsive) web design begins with a larger screen layout and adapts to smaller displays, while the mobile-first web design starts with a focus on smaller screens and gracefully expands. &lt;/p&gt;

&lt;p&gt;When developing an application, the choice between utilizing a mobile-first or desktop-first design depends on your specific project requirements, target audience, and the nature of the content or functionality you're providing. Depending on your approach, you can use media queries to add additional features to larger screens or simplify and remove features for smaller screens. &lt;/p&gt;

&lt;h2&gt;
  
  
  Breakpoints
&lt;/h2&gt;

&lt;p&gt;Breakpoints in media queries are specific points at which a website's layout and styling change to adapt to different screen sizes. They act like markers that trigger different sets of styles to be applied based on the characteristics of the device or browser window.&lt;/p&gt;

&lt;p&gt;Due to the varying widths and heights of screens and devices, pinpointing precise breakpoints for each one can be challenging. To streamline this process, here are some widely-used breakpoints that accommodate a range of devices. Keep in mind that these are general guidelines and can be adjusted based on the specific needs of your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  /* Styles for extra small devices go here */
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
  /* Styles for small devices go here */
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
  /* Styles for medium devices go here */
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
  /* Styles for large devices go here */
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
  /* Styles for extra large devices go here */
}

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

&lt;/div&gt;



&lt;p&gt;In this example, we have defined different breakpoints based on the width of the screen. They adapt to varying screen sizes. Each media query applies specific styles when the screen falls within the specified range. For instance, the first media query applies to screens with a maximum width of 600 pixels, which is typically for extra small devices like phones.&lt;/p&gt;

&lt;p&gt;By using these breakpoints, you can create a responsive design that adapts smoothly to various devices, providing an optimal viewing experience for users across the board.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries"&gt;Using Media Queries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/css/css3_mediaqueries_ex.asp"&gt;CSS Media Queries - Examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3schools.com/howto/howto_css_media_query_breakpoints.asp"&gt;Typical Device Breakpoints&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
    </item>
    <item>
      <title>React Crash Course: Understanding State Management and Hooks</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Fri, 08 Sep 2023 16:35:52 +0000</pubDate>
      <link>https://forem.com/adrvnc/react-crash-course-understanding-state-management-and-hooks-1n2b</link>
      <guid>https://forem.com/adrvnc/react-crash-course-understanding-state-management-and-hooks-1n2b</guid>
      <description>&lt;p&gt;Understanding states and hooks can be confusing for beginners when learning React. To provide clarity, let's discuss what they are and when to use them: &lt;/p&gt;

&lt;p&gt;In React, "state" is used to store information that can change over time, such as user interactions or data fetched from a server. When the state of a component changes, React will automatically re-render the component to reflect those changes in the UI.&lt;/p&gt;

&lt;p&gt;"Hooks" are a feature that allow functional components to have state and other React features without using class components. They provide a cleaner and more concise way to implement state variables in functional components.&lt;/p&gt;

&lt;p&gt;One of the most commonly used hooks is the &lt;code&gt;useState&lt;/code&gt; hook. It returns an array with two elements: the current state value and a function that lets you update it.&lt;/p&gt;

&lt;p&gt;Here's an example:&lt;br&gt;
&lt;/p&gt;

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

const App = () =&amp;gt; {
  // useState returns an array with two elements: the current count and a function to update it
  const [count, setCount] = useState(0);

  const increment = () =&amp;gt; {
    setCount(count + 1);
  };

  const decrement = () =&amp;gt; {
    setCount(count - 1);
  };

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Count: {count}&amp;lt;/h1&amp;gt;
      &amp;lt;button onClick={increment}&amp;gt;Increment&amp;lt;/button&amp;gt;
      &amp;lt;button onClick={decrement}&amp;gt;Decrement&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default App;

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

&lt;/div&gt;



&lt;p&gt;In this example, we're using the &lt;code&gt;useState&lt;/code&gt; hook to create a state called &lt;code&gt;count&lt;/code&gt; and a function to update it called &lt;code&gt;setCount&lt;/code&gt;. We start with an initial value of &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;increment&lt;/code&gt; and &lt;code&gt;decrement&lt;/code&gt; functions use &lt;code&gt;setCount&lt;/code&gt; to update the value of &lt;code&gt;count&lt;/code&gt; by either increasing or decreasing it.&lt;/p&gt;

&lt;p&gt;This component renders a heading showing the current count, and two buttons to increment or decrement the count. When you click these buttons, the &lt;code&gt;count&lt;/code&gt; state will be updated and the component will re-render to reflect the new value.&lt;/p&gt;

&lt;p&gt;Additionally, states and hooks can be used to manage and update a wide range of things such as input fields, text elements, lists, and tables, among other things. &lt;/p&gt;

&lt;p&gt;These are just a few examples, but in general, states and hooks can be used to update any aspect of your React components that you want to be dynamic and responsive to user interactions or changes in data. This makes React a powerful library for building interactive and data-driven web applications.&lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Importance of Server-Side Handling: Safeguarding Sensitive Information in Web Applications</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Sat, 22 Jul 2023 04:34:05 +0000</pubDate>
      <link>https://forem.com/adrvnc/the-importance-of-server-side-handling-safeguarding-sensitive-information-in-web-applications-3m01</link>
      <guid>https://forem.com/adrvnc/the-importance-of-server-side-handling-safeguarding-sensitive-information-in-web-applications-3m01</guid>
      <description>&lt;p&gt;Handling API calls and storing sensitive information, such as API keys or other credentials, on the back-end (server-side) is an important practice in web development. This approach offers some key benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Security: Placing sensitive information on the server-side reduces the risk of exposing that information to the public, including potential malicious users. If sensitive data like API keys were stored on the front-end (client-side), they could be easily accessed by anyone with access to the client code, which could lead to unauthorized access to the API or other security issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Simplification: Placing API calls on the server-side allows for a cleaner and more simplified separation of concerns. The client-side code can focus on user interactions and presentation, while the server-side handles data processing and interactions with external services like APIs. This allows the client-side to focus on its primary responsibility, which is providing a smooth user experience. Meanwhile, the server-side handles the more technical aspects. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In a client-server setup, the server acts like a messenger between the front-end and the back-end. Below is an illustration explaining this process: &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%2Fe8tol9b6arog3hk1voyn.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%2Fe8tol9b6arog3hk1voyn.png" alt="Browser and Database Communication"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a user interacts with the browser (e.g., by clicking a button or submitting a form), the browser sends a request to the server to perform certain actions or retrieve data. The server then processes the request, which may include interacting with databases and communicating with other external services (like APIs). Once the server has completed its processing, it sends back a response to the browser. The response can contain the results of a request, data, or any error messages, which the browser uses to update the user interface and provide feedback to the user.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Deploying Code Safely: Protecting Sensitive Data in Your Projects</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Wed, 19 Jul 2023 22:22:21 +0000</pubDate>
      <link>https://forem.com/adrvnc/deploying-code-safely-protecting-sensitive-data-in-your-projects-3009</link>
      <guid>https://forem.com/adrvnc/deploying-code-safely-protecting-sensitive-data-in-your-projects-3009</guid>
      <description>&lt;p&gt;Generally, it's not a good idea to deploy code with sensitive information, such as application programming interface (API) keys or personal access token's (PAT's) to GitHub or any other public code repository. By doing so, anyone with access to your GitHub repository can see and potentially misuse that information. This could lead to unauthorized access to your accounts, data breaches, or other malicious activities.&lt;/p&gt;

&lt;p&gt;To mitigate these risks, it's important to follow security best practices, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Remove or replace sensitive information: Remove any sensitive information from your code or replace it with placeholders or environment variables.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy to cloud platforms: Deploying your code on cloud platforms like Amazon Web Services (AWS), Microsoft Azure, Heroku, or Google Cloud Platform (GCP) gives you control over the hosting environment. These platforms often provide secure deployment options and support environment variables to store sensitive information.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For simple projects that don't have sensitive information, it's best to use GitHub for deployment. It's safer to deploy projects with just the front-end (what users see) rather than more complex ones that include both the front-end, back-end, and a database (where data is stored). &lt;/p&gt;

&lt;p&gt;What are your thoughts on this? Do you have any additional tips to reduce security risks? If you have a different viewpoint, feel free to share your thoughts in the comments section.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Quick Guide: Accessing a Specific Database in PostgreSQL</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Fri, 14 Jul 2023 06:44:31 +0000</pubDate>
      <link>https://forem.com/adrvnc/quick-guide-accessing-a-specific-database-in-postgresql-faj</link>
      <guid>https://forem.com/adrvnc/quick-guide-accessing-a-specific-database-in-postgresql-faj</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Open a terminal or command prompt.&lt;/li&gt;
&lt;li&gt;Connect to the PostgreSQL server by running the following command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;psql -U username -h hostname -p port -d database_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;username&lt;/code&gt; with your PostgreSQL username, &lt;code&gt;hostname&lt;/code&gt; with the server address (usually localhost), &lt;code&gt;port&lt;/code&gt; with the PostgreSQL server port (usually 5432), and &lt;code&gt;database_name&lt;/code&gt; with the name of the specific database you want to access.&lt;/p&gt;

&lt;p&gt;With these straightforward instructions, you can navigate your PostgreSQL databases. Just remember to replace the placeholder values with your actual username, server address, port, and database name. &lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>postgres</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How To Create a Database in PostgreSQL using Git Bash</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Sat, 08 Jul 2023 04:10:16 +0000</pubDate>
      <link>https://forem.com/adrvnc/how-to-create-a-database-in-postgresql-using-git-bash-4p2c</link>
      <guid>https://forem.com/adrvnc/how-to-create-a-database-in-postgresql-using-git-bash-4p2c</guid>
      <description>&lt;p&gt;To create a database in PostgreSQL using Git Bash, you can follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Install PostgreSQL: If you haven't already, download and install PostgreSQL on your computer. Make sure it's properly installed and running.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Open Git Bash: Launch Git Bash on your computer. It provides a command-line interface to execute commands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Access PostgreSQL: In Git Bash, you need to access the PostgreSQL command-line interface (CLI) to create a database. Use the following command to connect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; psql -U postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This assumes that the default username for PostgreSQL is "postgres". If you have a different username, replace "postgres" with your username.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Enter Password: After executing the above command, it will prompt you to enter the password for the PostgreSQL user. Type the password and press Enter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Side Note:&lt;/strong&gt; For security reasons, when entering your password in the terminal, the characters you type won't be displayed. Nevertheless, the system will register what you type. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Create Database: Once you're connected to the PostgreSQL CLI, you can create a database using 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;CREATE DATABASE your_database_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace "your_database_name" with the desired name for your database. Make sure to avoid using spaces or special characters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Verify Creation: To confirm that the database was created successfully, you can list all databases using the command:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This will display a list of all databases, including the one you just created. You can also use pgAdmin4, a management tool for PostgreSQL, to view your existing databases as well. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Exit PostgreSQL CLI: When you're finished working with the PostgreSQL CLI, you can exit by typing:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;This will return you to the Git Bash command prompt.&lt;/p&gt;

&lt;p&gt;That's it! You have now created a database in PostgreSQL using Git Bash. You can use this database for your applications or further database operations.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>database</category>
      <category>postgres</category>
    </item>
    <item>
      <title>How to Resolve the "__dirname is not defined in ES module scope" Error in JavaScript</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Thu, 15 Jun 2023 00:21:16 +0000</pubDate>
      <link>https://forem.com/adrvnc/how-to-resolve-the-dirname-is-not-defined-in-es-module-scope-error-in-javascript-584</link>
      <guid>https://forem.com/adrvnc/how-to-resolve-the-dirname-is-not-defined-in-es-module-scope-error-in-javascript-584</guid>
      <description>&lt;p&gt;&lt;code&gt;__dirname&lt;/code&gt; is a Node. js-specific variable that is used to obtain the name of the directory from a given file path. This variable is specific to the CommonJS module system used in Node.js before ECMAScript (ES) modules. Now that ES modules are the standard, there is a different approach to handling modules and file paths. &lt;/p&gt;

&lt;p&gt;To resolve this issue, we can use the &lt;code&gt;import.meta.url&lt;/code&gt; property to obtain the directory name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { fileURLToPath } from 'url';
import { dirname } from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

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

&lt;/div&gt;



&lt;p&gt;This code converts &lt;code&gt;import.meta.url&lt;/code&gt; into a file path using the &lt;code&gt;{ fileURLToPath }&lt;/code&gt; function from the &lt;code&gt;url&lt;/code&gt; module and then extracts the directory name using the &lt;code&gt;{ dirname }&lt;/code&gt; function from the &lt;code&gt;path&lt;/code&gt; module.&lt;/p&gt;

&lt;p&gt;This solution should address the problem. Do you have any alternative approaches for resolving this? Feel free to share your suggestions in the comments.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Troubleshooting 'Something Is Already Running on Port 3000' Error in ReactJS (Simple Solution)</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Thu, 18 May 2023 01:11:54 +0000</pubDate>
      <link>https://forem.com/adrvnc/troubleshooting-something-is-already-running-on-port-3000-error-in-reactjs-simple-solution-57a8</link>
      <guid>https://forem.com/adrvnc/troubleshooting-something-is-already-running-on-port-3000-error-in-reactjs-simple-solution-57a8</guid>
      <description>&lt;p&gt;When developing a project with React, running &lt;code&gt;npm start&lt;/code&gt; in your terminal launches your application in a web browser. However, there may be instances where the application fails to launch, accompanied by an error message in the terminal that states:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Something is already running on port 3000.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means that another program is running on the same port, preventing your application from starting. Only one program can use a specific port at a time. &lt;/p&gt;

&lt;p&gt;To resolve this issue, simply run the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx kill-port 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will remove any program that might be using the same port. By doing so, it frees up the port, allowing you to start your application without any conflicts.&lt;/p&gt;

&lt;p&gt;Afterward, rerun &lt;code&gt;npm start&lt;/code&gt;, and your application will successfully launch. &lt;/p&gt;

</description>
      <category>react</category>
    </item>
    <item>
      <title>What's the best advice you can give to developers starting their careers?</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Thu, 06 Apr 2023 22:49:45 +0000</pubDate>
      <link>https://forem.com/adrvnc/whats-the-best-advice-you-can-give-to-developers-starting-their-careers-4oh0</link>
      <guid>https://forem.com/adrvnc/whats-the-best-advice-you-can-give-to-developers-starting-their-careers-4oh0</guid>
      <description></description>
      <category>discuss</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>Perfectionism as a Programmer</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Fri, 27 May 2022 15:32:11 +0000</pubDate>
      <link>https://forem.com/adrvnc/perfectionism-as-a-programmer-4mmp</link>
      <guid>https://forem.com/adrvnc/perfectionism-as-a-programmer-4mmp</guid>
      <description>&lt;p&gt;While working on personal projects, I find myself spending more time than I should on them because I feel like I can tweak them and make them look better. &lt;/p&gt;

&lt;p&gt;Is there any benefit to being a perfectionist in this industry, especially while starting out? Please share your thoughts. &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Open Discussion: What Tips Do You Have For Writing Clean Code?</title>
      <dc:creator>Adrian Carter</dc:creator>
      <pubDate>Wed, 27 Apr 2022 18:22:12 +0000</pubDate>
      <link>https://forem.com/adrvnc/open-discussion-what-tips-do-you-have-for-writing-clean-code-1173</link>
      <guid>https://forem.com/adrvnc/open-discussion-what-tips-do-you-have-for-writing-clean-code-1173</guid>
      <description>&lt;p&gt;Recently, I read an &lt;a href="https://jerrylowm.medium.com/alphabetize-your-css-properties-for-crying-out-loud-780eb1852153"&gt;Article&lt;/a&gt; where the author, Jerry Low,  suggested that developers write their CSS properties in alphabetical order. I think this is a great idea, and it got me thinking what some other tips for writing clean and readable code? Feel free to share your suggestions. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
