<?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: Joshua Garvey</title>
    <description>The latest articles on DEV Community by Joshua Garvey (@jgar514).</description>
    <link>https://dev.to/jgar514</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%2F1106043%2F09c37a8f-8d86-4ef5-ace9-a5b5fa0697eb.jpeg</url>
      <title>DEV Community: Joshua Garvey</title>
      <link>https://dev.to/jgar514</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jgar514"/>
    <language>en</language>
    <item>
      <title>From JavaScript to Python - Day 1</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Wed, 19 Feb 2025 04:17:05 +0000</pubDate>
      <link>https://dev.to/jgar514/from-javascript-to-python-day-1-413h</link>
      <guid>https://dev.to/jgar514/from-javascript-to-python-day-1-413h</guid>
      <description>&lt;p&gt;I'm going to be converting my notes as I learn Python into blog posts by comparing it to a language I already know - JavaScript. I'm starting with freeCodeCamp’s &lt;strong&gt;Scientific Computing with Python&lt;/strong&gt; course, diving straight into string manipulation and building a cipher.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Variables: No More &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;const&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In JavaScript, we explicitly declare variables using &lt;code&gt;let&lt;/code&gt;, &lt;code&gt;const&lt;/code&gt;, or (though not recommended) &lt;code&gt;var&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Python, on the other hand, skips the keyword entirely—just assign a value and you’re good to go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="n"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Strings: Mostly the Same&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Strings in Python and JavaScript are similar in how they’re created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;I'm a string in JavaScript&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;So am I&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="n"&gt;str1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;m a string in python&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;str2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;So am I&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, I did read that Python doesn't use template literals like in JavaScript but this isn't in the lesson so we will come back to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Printing: &lt;code&gt;print()&lt;/code&gt; vs &lt;code&gt;console.log()&lt;/code&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Printing is straightforward in both languages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello, JavaScript world!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, python world!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;String Indexing: Familiar, But With a Bonus&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;String indexing is essentially the same as in JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// "r"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# "r"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, Python allows negative indices, which makes grabbing the last character much simpler:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# "d"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In JavaScript, you’d have to do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// "d"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a nice Python feature that makes things a little cleaner.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Finding String Length &amp;amp; Type&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Python’s &lt;code&gt;len()&lt;/code&gt; function is similar to JavaScript’s &lt;code&gt;.length&lt;/code&gt; property:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# 5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, Python requires a function call &lt;code&gt;(len())&lt;/code&gt;, whereas &lt;code&gt;.length&lt;/code&gt; is a property in JavaScript.&lt;/p&gt;

&lt;p&gt;Checking a variable’s type is also slightly different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "string"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# &amp;lt;class 'str'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Methods vs Functions: The &lt;code&gt;.find()&lt;/code&gt; Method&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Like JavaScript, Python has built-in methods for string manipulation. I used &lt;code&gt;.find()&lt;/code&gt; to locate characters in a string, which works similarly to JavaScript’s &lt;code&gt;.indexOf()&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// JavaScript Example&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;My brain hurts!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;r&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// 4&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="n"&gt;sentence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;My brain hurts!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sentence&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# 4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both return the index of the first occurrence of a character.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Caesar Cipher &amp;amp; The Power of Python’s Simplicity&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The first project was implementing a Caesar cipher, where each letter in a message is shifted by a fixed amount in the alphabet.&lt;/p&gt;

&lt;p&gt;This involved:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finding a letter’s position using &lt;code&gt;.find()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Shifting the position by a set value&lt;/li&gt;
&lt;li&gt;Grabbing the new letter using indexing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One key thing I learned was that Python’s string methods are &lt;strong&gt;case-sensitive&lt;/strong&gt;. Running &lt;code&gt;.find()&lt;/code&gt; on an uppercase letter failed since my alphabet string only contained lowercase letters. The fix? Using &lt;code&gt;.lower()&lt;/code&gt; to convert the text before searching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Python Example
&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello World&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;alphabet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;abcdefghijklmnopqrstuvwxyz&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;alphabet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# 7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This is where we paused - We will continue with this lesson on Day 2.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>python</category>
    </item>
    <item>
      <title>Super cool portfolio site!</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Tue, 18 Jun 2024 00:51:08 +0000</pubDate>
      <link>https://dev.to/jgar514/super-cool-portfolio-site-569a</link>
      <guid>https://dev.to/jgar514/super-cool-portfolio-site-569a</guid>
      <description>&lt;p&gt;Try it out and let me know what you think!&lt;br&gt;
Live: &lt;a href="https://joshuagarvey.com/"&gt;Josh Garvey Website&lt;/a&gt;&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%2Fitpd952uubf40tecl5xl.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%2Fitpd952uubf40tecl5xl.png" alt="Josh Garvey Website" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A portfolio website coded with React, Three.js, React Three Fiber, and deployed to Netlify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Jgar514/JoshandEllie/blob/modbranch/README.md"&gt;github repo&lt;/a&gt;&lt;br&gt;
(current code is under modbranch)&lt;/p&gt;

&lt;p&gt;Created by: Josh Garvey - &lt;a class="mentioned-user" href="https://dev.to/jgar514"&gt;@jgar514&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>Building a Full-Stack Web Application with Free Resources</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Tue, 11 Jun 2024 01:34:56 +0000</pubDate>
      <link>https://dev.to/jgar514/building-a-full-stack-web-application-with-free-resources-54eg</link>
      <guid>https://dev.to/jgar514/building-a-full-stack-web-application-with-free-resources-54eg</guid>
      <description>&lt;h1&gt;
  
  
  A full-stack web application using all free resources.
&lt;/h1&gt;

&lt;p&gt;This project includes the following: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Payment Processing&lt;/li&gt;
&lt;li&gt;Database&lt;/li&gt;
&lt;li&gt;Content Management System (CMS)&lt;/li&gt;
&lt;li&gt;Blogs&lt;/li&gt;
&lt;li&gt;Domain Name Availability Search Tool&lt;/li&gt;
&lt;li&gt;User Authentication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It can be viewed live here: &lt;br&gt;
&lt;a href="https://homie.mobi/"&gt;https://homie.mobi/&lt;/a&gt;&lt;br&gt;
The code can be viewed here: &lt;br&gt;
&lt;a href="https://github.com/HomieMobi/Homie.Mobi"&gt;Github Repository&lt;/a&gt; &lt;br&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%2Fjnsqtrbijkmo1xo9hvuf.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%2Fjnsqtrbijkmo1xo9hvuf.png" alt="homie and mobi definition" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Front End
&lt;/h2&gt;

&lt;p&gt;The front-end of our application is built using a combination of modern tools and frameworks to ensure a seamless development experience and efficient styling.&lt;br&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%2Ffywtgi5nyci89p0kuyrq.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%2Ffywtgi5nyci89p0kuyrq.png" alt="Home screen and products" width="800" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
We chose React for our front-end development. React is a JavaScript library that allows you to write JavaScript syntax (JSX) inside functional components.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://react.dev/learn"&gt;React Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Vite&lt;/strong&gt;&lt;br&gt;
To kickstart the project, we utilized Vite, a modern build tool offering a fast development environment with instant server start, fast hot module replacement (HMR), and an optimized build process.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://vitejs.dev/guide/"&gt;Vite Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tailwind CSS&lt;/strong&gt;&lt;br&gt;
To expedite the styling process, we incorporated Tailwind CSS. Tailwind CSS is a utility-first CSS framework that allows for rapid custom design directly within your HTML.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/installation"&gt;Tailwind CSS Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hosting&lt;/strong&gt;&lt;br&gt;
After developing the front-end, we hosted our website for free using Google's Firebase Hosting. Firebase Hosting provides fast and secure static hosting for web apps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/hosting"&gt;Firebase Hosting Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Back End
&lt;/h2&gt;

&lt;p&gt;Initially, the back-end was written using Node.js and Express. To reduce costs, we transitioned to &lt;strong&gt;Firebase Functions&lt;/strong&gt;, allowing our server-side logic to run only when called, significantly reducing server space requirements. Firebase Functions integrate seamlessly with Firebase features and Google Cloud.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/functions"&gt;Firebase Functions Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2F630wcr5zn15dgmpo8cc7.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%2F630wcr5zn15dgmpo8cc7.png" alt="App architecture" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Domain Name Availability Search
&lt;/h3&gt;

&lt;p&gt;One of the features of our website allows users to search for a domain name to see if it's available to purchase. A &lt;strong&gt;Firebase Function&lt;/strong&gt; takes the user's input and uses &lt;strong&gt;Name.com's API&lt;/strong&gt; to check if the domain name is available and under $25. If the input passes these checks then the function returns back available and allows the user to purchase it for $25.&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%2F781fjml38i8nplrosuf2.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%2F781fjml38i8nplrosuf2.png" alt="Domain Search" width="678" height="110"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Database - Storing Customers
&lt;/h3&gt;

&lt;p&gt;The first step of the checkout allows the user to input their email and name and then, after checking the information is valid, we use my pushFormDataToDatabase function to send it, along with their product selection, to a &lt;strong&gt;Firebase Realtime Database&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/database"&gt;Firebase Realtime Database Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2Flqpk5hz0jrp1ke19mouq.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%2Flqpk5hz0jrp1ke19mouq.png" alt="stripe checkout step one" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Accepting Payment
&lt;/h3&gt;

&lt;p&gt;We added Stripe Payment Processing directly into our website using the &lt;strong&gt;Stripe API&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.stripe.com/development"&gt;Stripe Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To communicate with Stripe we wrote our logic inside of a &lt;strong&gt;Firebase Function&lt;/strong&gt;. The function gets triggered when the user selects buy and requests to create a payment intent.&lt;/p&gt;

&lt;p&gt;In the second step of our checkout form, the user pays with their card information. This gets sent safely to Stripe who then confirms the payment and sends back that confirmation.&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%2F9w634xhvgcflynygquhf.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%2F9w634xhvgcflynygquhf.png" alt="Stripe checkout step two" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Blog
&lt;/h3&gt;

&lt;p&gt;We used Route and Routes from 'react-router-dom' to add a /blog route to our website. To write and publish new blogs, we incorporated &lt;strong&gt;Sanity.io&lt;/strong&gt; to be used as our &lt;strong&gt;Headless Content Management System (CMS)&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.sanity.io/docs"&gt;Sanity.io Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2Fwxv1zzumj49hxk79sfem.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%2Fwxv1zzumj49hxk79sfem.png" alt="homie mobi blog" width="800" height="1355"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Authentication
&lt;/h3&gt;

&lt;p&gt;To offer certain capabilities to authenticated users we added &lt;strong&gt;Firebase Authentication&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;We wrapped our project with an AuthProvider component using Firebase Auth. The user has the option to sign up with an email and password and they get stored as a user in our Firebase authentication tab in our Firebase console.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/auth"&gt;Firebase Auth Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2F7i5fp6nihra00glr1b41.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%2F7i5fp6nihra00glr1b41.png" alt="Firebase Authentication" width="800" height="274"&gt;&lt;/a&gt;&lt;br&gt;
This process included adding a /login route and a /register route to our project. &lt;/p&gt;

&lt;p&gt;Now down the road, we can conditionally render content and privileges based on whether the user is logged in or not.&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%2Fh8qureyf080vfaxsphii.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%2Fh8qureyf080vfaxsphii.png" alt="Register User" width="500" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Additional Tools and Features
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Email
&lt;/h3&gt;

&lt;p&gt;We wanted to have an official business email attached to our domain. After trying a few different technologies we landed on &lt;strong&gt;Zoho Mail&lt;/strong&gt;. We were able to create and register an email with our domain name.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.zoho.com/mail/"&gt;Zoho Mail&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2F5be2t4rphhep52a325c9.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%2F5be2t4rphhep52a325c9.png" alt="support@homie.mobi" width="678" height="110"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Code
&lt;/h3&gt;

&lt;p&gt;We use &lt;strong&gt;Visual Studio Code&lt;/strong&gt; to write and edit our code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/docs"&gt;Visual Studio Code Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We push our updates to a &lt;strong&gt;Github Repository&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/about"&gt;About Github&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We use &lt;strong&gt;Node Package Manager (NPM)&lt;/strong&gt; to install and add dependencies and packages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.npmjs.com/about-npm"&gt;About NPM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Updating, Building, and Deploying
&lt;/h3&gt;

&lt;p&gt;With this setup we can easily make adjustments to our website and push these changes to production thanks to &lt;strong&gt;Firebase's CLI&lt;/strong&gt; (Command Line Interface).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://firebase.google.com/docs/cli"&gt;Firebase CLI Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After making changes to our frontend application all we need to do is build it by running: &lt;br&gt;
&lt;code&gt;npm run build&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If we are satisfied with the build we can push it to production with a simple command from firebase:&lt;br&gt;
&lt;code&gt;firebase deploy --only hosting&lt;/code&gt;&lt;br&gt;
This allows us to separate the different parts of our projects and avoid having to deploy everything, every time.&lt;/p&gt;

&lt;p&gt;If instead, we want to make changes to our functions all we need to do is edit the code, save our changes, and run the command:&lt;br&gt;
&lt;code&gt;firebase deploy --only functions&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Sanity Studio can be accessed on a local server. We just navigate inside our sanity folder and run:&lt;br&gt;
&lt;code&gt;sanity start&lt;/code&gt;&lt;br&gt;
Blogs added will become live once you publish them in the studio.&lt;/p&gt;

&lt;p&gt;Version Control is done the same as any other project. Once you make your changes and save, you run the commands:&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 . // adds all the files to staging
git commit -m "this is your commit message" // commits your changes
git push origin main // pushes the updated code to our github repository. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>programming</category>
      <category>devops</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>helloworld</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Mon, 08 Apr 2024 06:15:44 +0000</pubDate>
      <link>https://dev.to/jgar514/helloworld-33bm</link>
      <guid>https://dev.to/jgar514/helloworld-33bm</guid>
      <description>&lt;h2&gt;
  
  
  yo
&lt;/h2&gt;

</description>
    </item>
    <item>
      <title>Understanding Git: A Short Guide</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Fri, 17 Nov 2023 05:21:52 +0000</pubDate>
      <link>https://dev.to/jgar514/understanding-git-a-short-guide-2pk8</link>
      <guid>https://dev.to/jgar514/understanding-git-a-short-guide-2pk8</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Git is a powerful version control system that plays a crucial role in modern software development. In this comprehensive guide, we'll explore key concepts and best practices associated with Git.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Basics
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Git?
&lt;/h3&gt;

&lt;p&gt;Git is a distributed version control system that enables collaboration and tracking of changes in software projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Components
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Working Directory:&lt;/strong&gt; The area where you make changes to your files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Staging Area (Index):&lt;/strong&gt; A middle ground to selectively prepare changes for the next commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit:&lt;/strong&gt; Captures staged changes and stores them in the version history.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Git Workflow
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Staging Changes
&lt;/h3&gt;

&lt;p&gt;Staging changes allows for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selective committing.&lt;/li&gt;
&lt;li&gt;Reviewing changes before making them permanent.&lt;/li&gt;
&lt;li&gt;Creating atomic commits for better version history readability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Make changes to files&lt;/span&gt;
&lt;span class="c"&gt;# ...&lt;/span&gt;

&lt;span class="c"&gt;# Stage specific changes&lt;/span&gt;
git add file1.js

&lt;span class="c"&gt;# Stage all changes&lt;/span&gt;
git add &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;# Commit the changes&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Your commit message"&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;If there are changes in the remote repository that you need to incorporate into your local branch, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git pull origin your_branch_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>The Power of React: Simplifying Single Page Application Development</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Fri, 10 Nov 2023 07:55:28 +0000</pubDate>
      <link>https://dev.to/jgar514/-the-power-of-react-simplifying-single-page-application-development-2dhm</link>
      <guid>https://dev.to/jgar514/-the-power-of-react-simplifying-single-page-application-development-2dhm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the ever-evolving landscape of web development, Single Page Applications (SPAs) have gained immense popularity for delivering seamless user experiences. However, with the rise of SPAs comes the need for more efficient tools to tackle their complexities. This is where React.js, a powerful JavaScript library, enters the scene, revolutionizing the way we build SPAs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is React?
&lt;/h2&gt;

&lt;p&gt;React.js, often simply referred to as React, is an open-source JavaScript library maintained by Facebook. It is designed for building user interfaces, specifically for creating reusable UI components. React's component-based architecture and declarative syntax make it an ideal choice for handling the dynamic nature of SPAs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Benefits of Using React for SPAs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Declarative Syntax
&lt;/h3&gt;

&lt;p&gt;React adopts a declarative approach to building UIs. Developers describe the desired outcome, and React takes care of updating the DOM efficiently. This simplifies the process of defining and updating the application's state, reducing the likelihood of bugs and making code more readable.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Component Reusability
&lt;/h3&gt;

&lt;p&gt;One of React's key strengths is its emphasis on component-based development. React components are modular and encapsulated, promoting reusability across the application. This not only streamlines the development process but also makes it easier to maintain and scale the application.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Virtual DOM
&lt;/h3&gt;

&lt;p&gt;React introduces the concept of a Virtual DOM, a lightweight copy of the actual DOM. When changes occur, React first updates the Virtual DOM and then efficiently determines the minimal number of updates needed to synchronize it with the real DOM. This optimization significantly enhances the performance of SPAs by minimizing unnecessary DOM manipulations.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Unidirectional Data Flow
&lt;/h3&gt;

&lt;p&gt;React's one-way data binding ensures a clear and predictable data flow within the application. This makes it easier to trace the flow of data and understand how changes to the state affect the UI. Developers can avoid common pitfalls associated with bidirectional data binding, leading to more maintainable code.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. React Router for Navigation
&lt;/h3&gt;

&lt;p&gt;React Router is a powerful library for handling navigation in SPAs. It enables the creation of dynamic and seamless user experiences by allowing developers to define the navigation structure declaratively. With React Router, transitioning between views becomes a smooth and predictable process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-world Examples
&lt;/h2&gt;

&lt;p&gt;Numerous successful applications have been built using React for SPAs. Facebook, Instagram, and Airbnb are just a few examples of large-scale applications that leverage React's capabilities to deliver a responsive and engaging user experience. These real-world examples highlight React's versatility and reliability in handling complex SPA requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overcoming Challenges
&lt;/h2&gt;

&lt;p&gt;While SPAs offer many advantages, they also present challenges such as initial loading times and SEO concerns. React, however, provides solutions to these challenges. Techniques like code splitting and server-side rendering can be employed to optimize performance and enhance SEO for React-based SPAs.&lt;/p&gt;

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

&lt;p&gt;In conclusion, React has proven to be a game-changer in the realm of web development, particularly for building SPAs. Its declarative syntax, component reusability, Virtual DOM, unidirectional data flow, and the support for efficient navigation through React Router make it an invaluable tool for developers seeking to simplify the complexities of SPA development. As you embark on your SPA journey, consider exploring React and tapping into its capabilities to create modern, responsive, and maintainable applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://react.dev/learn"&gt;React Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Hello World</title>
      <dc:creator>Joshua Garvey</dc:creator>
      <pubDate>Fri, 10 Nov 2023 06:28:46 +0000</pubDate>
      <link>https://dev.to/jgar514/hello-world-4e33</link>
      <guid>https://dev.to/jgar514/hello-world-4e33</guid>
      <description>&lt;p&gt;Hello world.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code block 
&amp;lt;div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 w-full"&amp;gt;
                    {gallery.map((item, index) =&amp;gt; (
                        &amp;lt;div key={index} className="group relative overflow-hidden rounded-lg hover:shadow-lg transition-transform transform hover:scale-105 p- bg-gray-500  h-96"&amp;gt;
                            &amp;lt;img src={item.imgUrl} alt={`Gallery Item ${index}`} className="w-full h-auto border-0 border-black" /&amp;gt;
                        &amp;lt;/div&amp;gt;
                    ))}
                &amp;lt;/div&amp;gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Test Quote&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;
&amp;gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Test Heading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;unordered list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;bold&lt;/strong&gt;&lt;br&gt;
_italic&lt;/p&gt;



&lt;p&gt;_&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"test"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
yo
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
  </channel>
</rss>
