<?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: Godswill Umukoro</title>
    <description>The latest articles on Forem by Godswill Umukoro (@godswillumukoro).</description>
    <link>https://forem.com/godswillumukoro</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%2F100725%2F86175b26-1e87-444a-8798-82389269828d.jpg</url>
      <title>Forem: Godswill Umukoro</title>
      <link>https://forem.com/godswillumukoro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/godswillumukoro"/>
    <language>en</language>
    <item>
      <title>Getting started with Netlify forms</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Mon, 05 Dec 2022 11:39:39 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/getting-started-with-netlify-forms-hii</link>
      <guid>https://forem.com/godswillumukoro/getting-started-with-netlify-forms-hii</guid>
      <description>&lt;p&gt;Netlify is awesome! You can deploy static websites, single-page applications, serverless functions, and more.&lt;/p&gt;

&lt;p&gt;They have also made it easy to collect form submissions from your website. The &lt;a href="https://docs.netlify.com/forms/setup"&gt;documentation page&lt;/a&gt; contains all you need to get started.&lt;/p&gt;

&lt;p&gt;At the end of this article you will be able to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Submit forms to your Netlify account&lt;/li&gt;
&lt;li&gt;Setup spam protection&lt;/li&gt;
&lt;li&gt;Get an HTTP response from the Netlify API using AJAX&lt;/li&gt;
&lt;li&gt;Display custom success and error notification messages on the current web page&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If any of these sound exciting to you, let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic form Setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt; &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Getting Started"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;data-netlify=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;data-netlify-honeypot=&lt;/span&gt;&lt;span class="s"&gt;"bot-field"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"bot-field"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dnone"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"firstname"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"fn"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"First name"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"em"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Email address"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Get started&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;data-netlify="true"&lt;/code&gt; This informs Netlify that you wish to receive submissions in your Netlify site admin panel.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data-netlify-honeypot="bot-field"&lt;/code&gt; This is a hidden spam protection form field that lures bot users into completing a field that human users can’t detect. Be sure to hide the corresponding &lt;code&gt;input&lt;/code&gt; field using CSS. I hid mine in this example by declaring "display: none" within the &lt;code&gt;dnone&lt;/code&gt; class.&lt;/p&gt;

&lt;p&gt;At this point, you can submit forms to Netlify and view them in your site admin panel under the "Forms" tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GntnKXEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1670240500/Blog/netlify-form-blog/Screenshot_from_2022-12-04_18-43-33.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GntnKXEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1670240500/Blog/netlify-form-blog/Screenshot_from_2022-12-04_18-43-33.png" alt="Screenshot from 2022-12-04 18-43-33.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Display Success or Error Messages
&lt;/h2&gt;

&lt;p&gt;Next, we need a way to notify users about the status of their form submission. &lt;br&gt;
Was the form sent successfully or not? This is the question almost every person asks after filling out an online form. &lt;/p&gt;

&lt;p&gt;To achieve this, we will be using AJAX&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;form&lt;/span&gt;&lt;span class="dl"&gt;'&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;successElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#success&lt;/span&gt;&lt;span class="dl"&gt;'&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;errorElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;preventDefault&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;myForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&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;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myForm&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;successElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/x-www-form-urlencoded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;URLSearchParams&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;successElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using Javascript, we select the &lt;code&gt;form&lt;/code&gt;, success, and error message HTML elements.&lt;/p&gt;

&lt;p&gt;Next, we target the form to override the &lt;code&gt;form&lt;/code&gt; submission event with JavaScript. To do this, we add a submit event listener to the &lt;code&gt;form&lt;/code&gt; and prevent its default behavior with &lt;code&gt;event.preventDefault()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Using the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/FormData"&gt;FormData Interface&lt;/a&gt;, we were able to derive the values of every input in the &lt;code&gt;form&lt;/code&gt;. We could skip this step if we were sending the HTML form directly to the server. However, in this case, we would be sending the form with JavaScript, so we build the body of the request using &lt;code&gt;formData&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we make a &lt;code&gt;POST&lt;/code&gt; request to submit the form using the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/fetch"&gt;global fetch method&lt;/a&gt;. It takes the resource URL we are submitting to. In the case of Netlify, that will be the current root page which can be simply represented by &lt;code&gt;/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The fetch method takes a second parameter to specify the &lt;code&gt;request method&lt;/code&gt;, &lt;code&gt;headers&lt;/code&gt;, and &lt;code&gt;body&lt;/code&gt; of the request. We can pass &lt;code&gt;POST&lt;/code&gt; as the request method in this case since it is a POST request. Netlify needs the content-type headers so we specify that as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;headers: { "Content-Type": "application/x-www-form-urlencoded" }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, we can pass our body as the query string which was built with &lt;code&gt;FormData&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body: new URLSearchParams(formData).toString(),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Fetch API&lt;/code&gt; will asynchronously process our request and return a response. &lt;br&gt;
We use the &lt;code&gt;.catch&lt;/code&gt; to handle failures on the request, and the &lt;code&gt;.then&lt;/code&gt; to handle a successful response. There's a possibility of getting an unsuccessful server response like a &lt;code&gt;4xx&lt;/code&gt; or &lt;code&gt;5xx&lt;/code&gt; error within the &lt;code&gt;.then&lt;/code&gt; method, so we make sure to check for a &lt;code&gt;2xx&lt;/code&gt; success response by using &lt;code&gt;response.ok&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="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;successElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&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;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KV0vel5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1670239945/Blog/netlify-form-blog/Screenshot_from_2022-12-05_11-55-26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KV0vel5y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1670239945/Blog/netlify-form-blog/Screenshot_from_2022-12-05_11-55-26.png" alt="Screenshot from 2022-12-05 11-55-26.png" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Code
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv=&lt;/span&gt;&lt;span class="s"&gt;"X-UA-Compatible"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"IE=edge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Getting started with Netlify Forms&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
        &lt;span class="nf"&gt;#success&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nf"&gt;#error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nc"&gt;.dnone&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Getting Started"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;data-netlify=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;data-netlify-honeypot=&lt;/span&gt;&lt;span class="s"&gt;"bot-field"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"bot-field"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dnone"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"firstname"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"fn"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"First name"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"em"&lt;/span&gt; &lt;span class="na"&gt;placeholder=&lt;/span&gt;&lt;span class="s"&gt;"Email address"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Get started&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

        &lt;span class="c"&gt;&amp;lt;!-- sign up notification message --&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"success"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dnone"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Thanks! You’ve been registered successfully.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"error"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dnone"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sorry, we had an issue connecting to the server.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;form&lt;/span&gt;&lt;span class="dl"&gt;'&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;successElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#success&lt;/span&gt;&lt;span class="dl"&gt;'&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;errorElement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;submit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;preventDefault&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;myForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&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;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myForm&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="nx"&gt;successElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/x-www-form-urlencoded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
                &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;URLSearchParams&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;successElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
                &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;errorElement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;classList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;remove&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dnone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Find the &lt;a href="https://github.com/godswillumukoro/netlify-forms"&gt;Github Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;View the &lt;a href="https://netlify-forms-article.netlify.app/"&gt;Live Demo&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Did you find this article helpful? &lt;br&gt;
Help spread the word so more people can get started with Netlify forms... and hey, check out my &lt;a href="https://www.youtube.com/channel/UC2vJBc9AzljnTXVxnSK4qEw"&gt;Youtube videos&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>netlify</category>
      <category>forms</category>
    </item>
    <item>
      <title>Working with the Node.js File System</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Mon, 13 Jun 2022 11:21:29 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/working-with-nodejs-file-system-2c7d</link>
      <guid>https://forem.com/godswillumukoro/working-with-nodejs-file-system-2c7d</guid>
      <description>&lt;p&gt;Firstly, we'll import the file system core module&lt;br&gt;
&lt;code&gt;const fs = require('fs');&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next, Let's read data from a file&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="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./notes.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, we'll see how to write to files next, this code will create a new file if the referenced one does not exist&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="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./note.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I am a new file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;created a new file succesfully&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Awesome, now let's delete the file if it already exists, or create it if it does not&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./note.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;unlink&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./note.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file deleted&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./note.md&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;I am a new file&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file created&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let's work with directories. We'll see how to create a new directory or delete it if it already exists.&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;existsSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./new-folder&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rmdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./new-folder&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;folder deleted&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mkdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./new-folder&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;folder deleted&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Did you find this article helpful? Help spread the word so more people can learn how to work with the file system in Node.js. &lt;a href="https://twitter.com/umuks_"&gt;Follow me on Twitter&lt;/a&gt; and tell me how you found this useful.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>The Myths and Principles of Productivity</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Mon, 03 Jan 2022 19:40:38 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/the-myths-and-principles-of-productivity-31i8</link>
      <guid>https://forem.com/godswillumukoro/the-myths-and-principles-of-productivity-31i8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was curated from my personal notes while studying the &lt;a href="https://www.skillshare.com/classes/Productivity-Masterclass-Principles-and-Tools-to-Boost-Your-Productivity/647318269/reviews"&gt;Productivity Masterclass - Principles and Tools to Boost Your Productivity by Ali Abdaal&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The 3 Myths of Productivity
&lt;/h2&gt;

&lt;h3&gt;
  
  
  #1 The Myth of “I Don’t Have Time”
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Time is what we want most but use worst -  William Penn.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We are not limited by time, we are limited by the choices we make with our time.&lt;/p&gt;

&lt;p&gt;When presented with an invitation you can not engage with at the moment, instead of responding by saying "Sorry, I don't have time", you might say “ I’m sorry, I’ve got a lot on my plate right now, I don’t quite have the bandwidth.”&lt;/p&gt;

&lt;p&gt;This is because we do have time, but we're consciously avoiding doing that specific task. It simply means that we would rather spend time working on something else other than that specific task.&lt;/p&gt;

&lt;h3&gt;
  
  
  #2 The Motivation Myth
&lt;/h3&gt;

&lt;p&gt;Motivation is fundamentally a feeling. Relying on our feelings as a way of setting our course in life and getting what we need to be done is a recipe for disaster because feelings are fleeting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Discipline&lt;/strong&gt; enables us to go directly from thought to action regardless of how we’re feeling at the current time.&lt;/p&gt;

&lt;p&gt;A professional doctor wakes up in the morning, prepares his day, and proceeds to go to the hospital irrespective of his current state of motivation.&lt;/p&gt;

&lt;p&gt;We tend to rely on motivation when we don’t get the outcomes from our actions immediately.&lt;/p&gt;

&lt;p&gt;A Procrastinator's mindset: &lt;code&gt;Thought&lt;/code&gt; &amp;gt; &lt;code&gt;Motivation&lt;/code&gt; &amp;gt; &lt;code&gt;Action&lt;/code&gt;&lt;br&gt;
A Disciplined person's mindset: &lt;code&gt;Thought&lt;/code&gt; &amp;gt; &lt;code&gt;Action&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Become More Disciplined
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Make the &lt;code&gt;Action&lt;/code&gt; fun and more pleasureable&lt;/li&gt;
&lt;li&gt;Make the consequences of &lt;code&gt;Inaction&lt;/code&gt; more painful&lt;/li&gt;
&lt;li&gt;Shorten your feedback loop&lt;/li&gt;
&lt;li&gt;Keep the outcome clearly in mind&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  #3 The Myth of Multitasking
&lt;/h3&gt;

&lt;p&gt;Focusing on one thing at a time is infinitely better than trying to multitask. &lt;/p&gt;

&lt;p&gt;Task switching, ie. trying to do multiple things at one go is a lot less productive than focusing on just the one thing we need to get done.&lt;/p&gt;

&lt;p&gt;Doing tasks one at a time helps put you in flow state where we perform and feel our best.&lt;/p&gt;

&lt;p&gt;When we are in the flow state, we report high levels of productivity, life satisfaction, and happiness.&lt;/p&gt;

&lt;p&gt;Avoid distractions when you’re in the flow state. Keep your phone away from your study spot.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Comfort zone&lt;/code&gt; | &lt;code&gt;Stretch zone&lt;/code&gt; (The Flow State) | &lt;code&gt;Panic zone&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Three Laws of Productivity
&lt;/h2&gt;

&lt;h3&gt;
  
  
  #1 Parkison’s Law
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;work expands so as to fill the time available for its completion - Northcote Parkinson.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Think about your 10-year plan, stop and think about how you could achieve it in 6 months.&lt;/p&gt;

&lt;p&gt;Creating an artificial constraint will push you to achieve your goal sooner.&lt;/p&gt;

&lt;h3&gt;
  
  
  #2 Pareto Principle
&lt;/h3&gt;

&lt;p&gt;Also known as the 80/20 rule, the Pareto Principle states that 80 percent of results come from 20 percent effort.&lt;/p&gt;

&lt;p&gt;A student having a forthcoming exam and having to study 10 topics may decide to study each topic sequentially. A much better approach would be to study the basics of every topic ie. 80/20 on the basics, then go another 80/20 on deeper topics and keep going 80/20 on every iteration of the study session.&lt;/p&gt;

&lt;h3&gt;
  
  
  #3 Newton’s First Law of Motion
&lt;/h3&gt;

&lt;p&gt;An object is at rest or traveling at a constant velocity unless it’s acted on by an external imbalanced force.&lt;/p&gt;

&lt;p&gt;If we are still, it requires an external force to push us into action. But if we are moving already, it no longer requires any external force to keep us moving, we will keep moving by default.&lt;/p&gt;

&lt;p&gt;This is why it’s much harder to start something than to continue doing something once we’ve already started. All we need to that one bit of push to get started, and then we can just keep on going.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this far. Did you find this article helpful? Help spread the word so more people understand how to spend their time more productively. &lt;a href="https://twitter.com/umuks_"&gt;Follow me on twitter&lt;/a&gt; and tell me how you found this useful.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>My Commitment to #100DaysOfCode | Part 2</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Sun, 02 Jan 2022 19:46:39 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/my-commitment-to-100daysofcode-part-2-3agb</link>
      <guid>https://forem.com/godswillumukoro/my-commitment-to-100daysofcode-part-2-3agb</guid>
      <description>&lt;p&gt;I'm starting 2022 by committing to &lt;a href="https://www.freecodecamp.org/news/2022-become-a-dev-new-years-resolution-challenge/"&gt;Quincy Larson's 2022 Become-a-Dev New Year's Resolution Challenge on Twitter.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I'm positive this will keep me accountable and focused on reaching my goals for 2022. Some of which are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Become Proficient in React and Firebase&lt;/li&gt;
&lt;li&gt;Earn a high-income monthly salary&lt;/li&gt;
&lt;li&gt;Read 10 Books&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While the curriculum in this #100DaysOfCode challenge may not directly lead me to reach those outlined goals, it's a sure-fire way to keep me on my toes and push me to code every day.&lt;/p&gt;

&lt;p&gt;The goal is to spend 30 minutes every day on the #100DaysOfCode challenge and use the momentum to hack on the specific skillset I'm trying to gain.&lt;/p&gt;

&lt;p&gt;If you would love to see my daily log for the challenge, I have a whole &lt;a href="https://github.com/godswillumukoro/100-days-of-code-part-2/blob/main/daily-log.md"&gt;Github repository dedicated to this.&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this far. Did you find this article helpful? &lt;a href="https://twitter.com/umuks_"&gt;Follow me on Twitter&lt;/a&gt; and tell me all about it.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>2021 - A Year In Review and Goals for 2022</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Sat, 01 Jan 2022 00:24:54 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/2021-a-year-in-review-and-goals-for-2022-57jj</link>
      <guid>https://forem.com/godswillumukoro/2021-a-year-in-review-and-goals-for-2022-57jj</guid>
      <description>&lt;p&gt;It is January 1st, 2021. A few weeks ago, around 1 am, I returned to Lagos - the city where I grew up. The bus I boarded from Abuja broke down a couple of times, in addition, the driver was unwell the whole time. It was my first experience traveling by road on a journey that spanned over 467 miles. What an adventure that was, I couldn't wait to see my family. It's been one year since I relocated to Uyo, Akwa Ibom State for the National Youth Service Corps (NYSC), a compulsory program set by the Nigerian government to be undertaken by every university graduate.&lt;/p&gt;

&lt;p&gt;The plan was to visit my family for two weeks and return to Abuja where I wished to reside permanently, however with every additional week spent in Lagos, the unrealistic my plan to relocate to Abuja seemed. It became certain the move would not turn into a reality. I had cast all my hopes on relatives who assured me of their financial backing in making my relocation a success. But it felt like I'd be causing myself harm if I continued to hope on their failing promises. I accepted my fate and resorted to live in Lagos.&lt;/p&gt;

&lt;p&gt;From the time I was a kid, I had the intention to move out of the house. Simply because living conditions were at the very least, unconducive. If I had to live in Lagos, I told myself, "I'll have to move into my own apartment".&lt;/p&gt;

&lt;p&gt;Throughout NYSC, I saved up all the stipend sent from the government, which was N19,800 ($48.06) every month, in addition to money made from freelance work, I had a cumulative amount of N400,000 in the bank. This still wasn't enough to rent an apartment and settle in.&lt;/p&gt;

&lt;p&gt;I began applying for local tech jobs with my bachelor's degree in Computer Science and got one interview for the role of Technical Support at a server company. The monthly salary was N55,000 ($133.51) and I was expected to work 6 days a week. I turned down the offer and continued building websites as a freelancer.&lt;/p&gt;

&lt;p&gt;Eventually, I registered my business name &lt;a href="http://gnest.tech"&gt;Gnest Tech&lt;/a&gt; and got a few clients via referrals and word of mouth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mentorship
&lt;/h2&gt;

&lt;p&gt;I wasn't satisfied with the infrequent rate at which I got clients, so my goal was to get a fully-remote tech job from abroad. That was when I focused on building connections with awesome people on Twitter.&lt;/p&gt;

&lt;p&gt;Shortly after, I found an amazing mentor, &lt;a href="https://twitter.com/LeviMeahan"&gt;Levi Meahan&lt;/a&gt; who was willing to help me reach my goal. We started 1:1 video call sessions, he'll answer any questions I had on Twitter too. It's always refreshing to know someone has got your back and is interested in seeing you reach your goal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7G1UW_GY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640988648601/RN_Gx-n0s.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7G1UW_GY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640988648601/RN_Gx-n0s.jpeg" alt="levi-godswill-first-meeting.jpeg" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The more I engaged on Twitter, the more I connected with like-minded people who were willing to help out. &lt;a href="https://twitter.com/danmall"&gt;Dan Mall&lt;/a&gt; is someone who is always happy to help out. We held video meetings where he taught me about public speaking and gave me some general advice when I needed them the most.&lt;/p&gt;

&lt;p&gt;I completely studied the &lt;a href="https://pll.harvard.edu/course/cs50-introduction-computer-science?delta=0"&gt;CS50&lt;/a&gt; course, a series of Computer Science lectures offered by Havard.&lt;/p&gt;

&lt;p&gt;During that time, I committed to the &lt;a href="https://github.com/godswillumukoro/100DaysOfCode"&gt;#100DaysOfCode Challenge.&lt;/a&gt; and completed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Got Scammed and Almost Lost it
&lt;/h2&gt;

&lt;p&gt;Some of my acquaintances introduced me to this "new opportunity". Unaware of this being a Multi-level Marketing (MLM) scheme, I jumped right into it. Of course, I wanted to move out at all costs, without doing any research on my own, I invested some of my savings, at first, I was getting a return on investment, so I proceeded to invest all my savings and even took a loan to invest even more money. Like all MLMs, the tricksters behind the show took off with all the money.&lt;/p&gt;

&lt;p&gt;At this point, I was left with a deep feeling of sadness. Not sure what steps to take next, my mental health greatly deteriorated. I had to relocate to a rural territory, where only a few people know me with the intention of clearing my mind off my losses and channeling all my feelings towards working on my skills so I can pay off my loans and live a better life.&lt;/p&gt;

&lt;h2&gt;
  
  
  Channeling the Hurt Toward Creativity
&lt;/h2&gt;

&lt;p&gt;Burning with a passion to build my skills, I consistently studied, wrote articles, and hosted Twitter Spaces. Some of the amazing people I got to feature were:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://twitter.com/burgessdryan"&gt;Ryan Burgess&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xdyzba1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640990197007/qbnk4g-lF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xdyzba1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640990197007/qbnk4g-lF.png" alt="03_ryan.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://twitter.com/jamesqquick"&gt;James Quick&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dohkpLgH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640990220103/dIfYbm6M_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dohkpLgH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640990220103/dIfYbm6M_.png" alt="6.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://twitter.com/kendalmintcode"&gt;Rob Kendal&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--empKr_77--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992454710/YMz63ziXe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--empKr_77--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992454710/YMz63ziXe.png" alt="7.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://twitter.com/AlexandriasTech"&gt;Alexandria&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zMgr6ekZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992470948/BIAJXYZUl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zMgr6ekZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992470948/BIAJXYZUl.png" alt="Twitter Space Chats (1).png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://twitter.com/SavvasStephnds"&gt;Savvas Stephanidess&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VUd9d7nq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992502391/VOhCcwSn-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VUd9d7nq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992502391/VOhCcwSn-.png" alt="5.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.linkedin.com/in/jodie-koffi-88618914a/"&gt;Jodie Koffi&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WwyvDbNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992600990/Ok3hddV-z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WwyvDbNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1640992600990/Ok3hddV-z.png" alt="01_jodie.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My blog quickly grew to over 3.5k views.&lt;/p&gt;

&lt;p&gt;I was privileged to co-organize &lt;a href="https://twitter.com/blacktechtw"&gt;Black Tech Twitter&lt;/a&gt;, a safe space where underrepresented folks come together to discuss and aid each other. Before long, this community created some buzz on Twitter, even the official &lt;a href="https://twitter.com/twitter_dev"&gt;Twitter Dev Team&lt;/a&gt; gave us a shoutout.&lt;/p&gt;

&lt;p&gt;I continue to build custom web applications for my client, while I spend other time improving my coding skills, creating content, and developing healthy habits.&lt;/p&gt;

&lt;p&gt;Three months ago, I began my Master's program, studying Information Technology at the National Open University of Nigeria.&lt;/p&gt;

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

&lt;p&gt;This has been a year filled with many twists, turns, and lessons.&lt;/p&gt;

&lt;p&gt;I'm glad I had to go through everything because it made me a much better person today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Goals for 2022
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Become proficient in React and Firebase&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make a high-income monthly salary&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Read 10 books.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Thanks for reading this far. Did you find this article helpful? &lt;a href="https://twitter.com/umuks_"&gt;Follow me on Twitter&lt;/a&gt; and tell me all about it.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>learning</category>
    </item>
    <item>
      <title>How JavaScript gets Maintained</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Tue, 28 Dec 2021 12:28:11 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/how-javascript-gets-maintained-521p</link>
      <guid>https://forem.com/godswillumukoro/how-javascript-gets-maintained-521p</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript
&lt;/h2&gt;

&lt;p&gt;JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. &lt;/p&gt;

&lt;p&gt;Javascript is different because there isn't a single JS package to download and install on your computer. Rather the implementation is done by browsers and its up various browsers to implement new features when they get released by TC39 and ECMA International. &lt;/p&gt;

&lt;p&gt;This means that different browsers will support different features at any given point in time. &lt;/p&gt;

&lt;p&gt;Websites like &lt;a href="http://caniuse.com"&gt;caniuse.com&lt;/a&gt; help us understand language implementation inconsistencies across different browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Quick History
&lt;/h2&gt;

&lt;p&gt;Javascript was first released under the name LiveScript in 1995 as the main scripting language for the Netscape browser.&lt;/p&gt;

&lt;p&gt;In 1996 Netscape submitted the programming language to a standards creation organization called &lt;strong&gt;ECMA International&lt;/strong&gt; in hopes to create a standard on how to use a language across different browsers and that standard named ECMAScript was created and released the next year, 1997.&lt;/p&gt;

&lt;p&gt;There are two parties that contribute to updating and maintaining ECMAscript, &lt;strong&gt;TC39&lt;/strong&gt; and &lt;strong&gt;The open source community&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Open Source Community
&lt;/h3&gt;

&lt;p&gt;Anyone can create a proposal and a TC39 community member can champion a proposal, who will support and try to get that proposal into the latest version of ECMAScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  ECMA
&lt;/h2&gt;

&lt;p&gt;A standards creation organization in charge of all sorts of different standards.&lt;/p&gt;

&lt;h2&gt;
  
  
  ECMAScript
&lt;/h2&gt;

&lt;p&gt;A specification for a programming language, think of it as a text reference that describes how a language should work, and not a programming language itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  TC39
&lt;/h2&gt;

&lt;p&gt;Technical Committee Number 39 is in charge of creating, maintaining, and finalizing ECMAScript proposals that will get included in newer versions of ECMAScript. &lt;/p&gt;

&lt;p&gt;40-60 delegates meet six times each year to discuss proposed changes to the spec.&lt;/p&gt;

&lt;p&gt;This is just one of the many sub-committees that reside under the ECMA International organization.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://www.youtube.com/watch?v=iMMZ4YR-2us&amp;amp;t=194s"&gt;How JavaScript is Maintained? ECMAScript vs JavaScript, ES Features, and More Explained - Ijemma Onwuzulike&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Did you find this article helpful? Help spread the word so more people understand how Javascript is maintained. &lt;a href="https://twitter.com/umuks_"&gt;Follow me on twitter&lt;/a&gt; and tell me how you found this useful.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>CSS is Awesome and Here's Why</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Fri, 22 Oct 2021 07:30:00 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/css-is-awesome-and-heres-why-21ck</link>
      <guid>https://forem.com/godswillumukoro/css-is-awesome-and-heres-why-21ck</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was curated from &lt;a href="https://www.youtube.com/watch?v=aHUtMbJw8iA"&gt;Miriam Suzanne's talk&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The entire web was originally made for linking documents together. The web is an open standard, which means everyone can contribute to its growth.&lt;/p&gt;

&lt;p&gt;Over time as the web grows, we see a dramatic move from linking documents to making games, real-time applications, art, the list goes on. Today, entire businesses exist and flourish on the web.&lt;/p&gt;

&lt;h1&gt;
  
  
  Does CSS Work on the Modern Web?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.w3.org/People/Berners-Lee/"&gt;Tim Berners Lee&lt;/a&gt; designed the web to be device agnostic. This inadvertently triggers a design problem and a radical shift in power from creators to consumers. Thus, giving the audience control over the display of content.&lt;/p&gt;

&lt;p&gt;In reality, we design for an unknown infinite canvas because we never have all the variables. &lt;/p&gt;

&lt;p&gt;Put simply; when we design for the web today, we design for change and adaptation.&lt;/p&gt;

&lt;h1&gt;
  
  
  What does Cascading Stylesheet mean?
&lt;/h1&gt;

&lt;p&gt;The cascade is a set of rules for how different styles will fit together and override each other and in the end, the browser fits all those variables together and comes out with a single final rendering style. Only the browser can do this because it has all the information required.&lt;/p&gt;

&lt;p&gt;As web designers, we are suggesting and not controlling the output.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jsxjPRJr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1634887495/Blog/css-is-awesome/Screenshot_2021-10-22_at_08.06.59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jsxjPRJr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dlwivxwf8/image/upload/v1634887495/Blog/css-is-awesome/Screenshot_2021-10-22_at_08.06.59.png" alt="css is awesome" width="707" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  A Declarative Language
&lt;/h1&gt;

&lt;p&gt;CSS is a declarative language which means that we describe the intent rather than specific steps by giving the browser as much information as possible such as subtext and implications so that the browser can make smart decisions about what to do with those styles.&lt;/p&gt;

&lt;h1&gt;
  
  
  CSS is Intentionally Contextual
&lt;/h1&gt;

&lt;p&gt;Design for the web isn't contingent on just the size of the screen. Other factors are to be considered. For example, the interface; how are you interacting with the website? Is it a keyboard, touch screen, braille keyboard, are you listening to websites with your headphones? There are so many interfaces that using one style just won't make sense. So context is very important to CSS.&lt;/p&gt;

&lt;h1&gt;
  
  
  A Pliable Presentation Layer
&lt;/h1&gt;

&lt;p&gt;CSS is a presentation layer subject to change. We can layer styles on top of each other, but they have to be optional because people are using the internet through systems where they may not see this presentation.&lt;/p&gt;

&lt;p&gt;That's why Graceful degradation and Progressive enhancement are built into CSS. The whole thing is supposed to fall apart in a graceful way. That's how the web is designed to function.&lt;/p&gt;

&lt;h1&gt;
  
  
  CSS is Different by Design
&lt;/h1&gt;

&lt;p&gt;Like theater, CSS is contextual. We can make those suggestions but can't insist on a final design. CSS is intentionally different and was created to work this way.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Web Adapts to Context
&lt;/h1&gt;

&lt;p&gt;When we build applications for the web, we get universal device support. The trade-off is we lose control, and that's a feature. CSS exists to help us with adaptive design.&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://line-mode.cern.ch/www/hypertext/WWW/TheProject.html"&gt;Browse the first website ever made&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=aHUtMbJw8iA"&gt;Why CSS is so Weird - Miriam Suzanne&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Did you find this article helpful? Help spread the word so more people understand why CSS is awesome. &lt;a href="https://twitter.com/umuks_"&gt;Follow me on twitter&lt;/a&gt; and tell me how you found this useful.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>How To Quit Vim</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Sat, 10 Jul 2021 09:59:05 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/how-to-quit-vim-3bp7</link>
      <guid>https://forem.com/godswillumukoro/how-to-quit-vim-3bp7</guid>
      <description>&lt;p&gt;Lately, I found myself playing with a lot with Amazon LightSail with the goal of hosting LAMP stack applications. At first, I didn't really like it, but the more I tinkered with LightSail did I get more comfortable with the service.&lt;/p&gt;

&lt;p&gt;Then it got to the point where I had to edit documents directly from the terminal and &lt;code&gt;vim document.php&lt;/code&gt; was the first thing that came to mind. After making all my edits, It was time to close vim and continue with my adventure in the world of terminals, then I recalled all the funny memes about the strange impossibility of quitting vim 😅&lt;/p&gt;

&lt;h2&gt;
  
  
  Step One: Remember to Escape
&lt;/h2&gt;

&lt;p&gt;Hit &lt;code&gt;esc&lt;/code&gt; key on your keyboard&lt;/p&gt;

&lt;h2&gt;
  
  
  If No Changes Were Made: Quit Vim
&lt;/h2&gt;

&lt;p&gt;Type this command &lt;code&gt;:q&lt;/code&gt; accompanied by the &lt;code&gt;enter&lt;/code&gt; key on your keyboard&lt;/p&gt;

&lt;h2&gt;
  
  
  Save changes and Quit Vim
&lt;/h2&gt;

&lt;p&gt;Type this command &lt;code&gt;:x&lt;/code&gt; accompanied by the &lt;code&gt;enter&lt;/code&gt; key on your keyboard&lt;/p&gt;

&lt;h2&gt;
  
  
  Quit Vim Without Saving Changes
&lt;/h2&gt;

&lt;p&gt;Type this command &lt;code&gt;:q!&lt;/code&gt; accompanied by the &lt;code&gt;enter&lt;/code&gt; key on your keyboard&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I hope you found this useful. Happy coding!&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>vim</category>
    </item>
    <item>
      <title>Simplest way to Add Dark Theme to any Website</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Tue, 29 Jun 2021 11:51:56 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/simplest-way-to-add-dark-theme-to-any-website-2938</link>
      <guid>https://forem.com/godswillumukoro/simplest-way-to-add-dark-theme-to-any-website-2938</guid>
      <description>&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;I like fancy websites. You know websites that have great UI/UX, impressive load time speed, pretty animations, Scalable Vector Images, Dark theme and light theme toggle button.&lt;/p&gt;

&lt;p&gt;But the problem is... I suck at CSS and JS (at this moment, I'm working on it duh 🙄). As a result, many tutorials and blog articles on how to implement these fancy features on a website aren't exactly for me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The question is&lt;/strong&gt;: what's the simplest, most basic way to add dark theme functionality to my website?&lt;br&gt;
I'm also not interested in copying code I don't understand.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Solution
&lt;/h3&gt;

&lt;p&gt;The best way to learn they say is by building, so I woke up two days ago and was like, lets do this! &lt;br&gt;
My personal website could use a redesign so I said to myself, I'll rebuild my website and add that a dark theme functionality to it.&lt;/p&gt;

&lt;p&gt;I chose to follow a minimalist design for he website. After writing some basic HTML and CSS, I added the dark theme functionality with the following CSS code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Light mode by System theme */
@media (prefers-color-scheme: light) {
    body {
        background-color: inherit;
        color: inherit;
    }
}

/* Dark mode by System theme*/
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: whitesmoke;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;prefers-color-scheme&lt;/code&gt; checks if the user has selected &lt;code&gt;light&lt;/code&gt; or &lt;code&gt;dark&lt;/code&gt; theme. The user can do this either via the operating system settings or via the browser settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does this mean?
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;You website could look different on browsers. Light or Dark.&lt;/li&gt;
&lt;li&gt;You just implemented dark theme on your website with just a few lines of CSS code.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Some Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Check my new personal &lt;a href="https://godswillumukoro.com"&gt;website here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check the full code on &lt;a href="https://github.com/godswillumukoro/godswillumukoro.com"&gt;Github&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Learn more about &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme"&gt;&lt;code&gt;prefers-color-scheme&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>Build a Calculator with PHP</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Tue, 22 Jun 2021 20:47:30 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/build-a-calculator-with-php-hl4</link>
      <guid>https://forem.com/godswillumukoro/build-a-calculator-with-php-hl4</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Prerequisites: HTML and CSS knowledge is helpful but not mandatory&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;PHP stands for Hypertext Preprocessor, you can say it has a recursive initialism 😃 It is a server-side programming language that makes it easy to build dynamic web applications.&lt;/p&gt;

&lt;p&gt;If you already know how to build websites with HTML and CSS, that's pretty damn awesome! But let's say you need to make your website more dynamic, for example, create a login system, or a social network where users can post something. You'll need a database management system to store your website's user details and posts. In order to connect your website to the database, you will need a server-side programming language. There are many different options to pick from, but in this lesson, we will use PHP.&lt;/p&gt;

&lt;p&gt;In this lesson, we will not be connecting to the database or performing user authentication. This will be a simple use of the PHP language to implement a calculator.&lt;/p&gt;

&lt;p&gt;PHP does not run on the browser, but on the server, that's why it's called a 'server-side' programming language. In other to use PHP, we will need to set up a server to host our files. Once the server runs our PHP codes, it sends the output in form of HTML, we can then style it our desired styling so our website looks nice. Don't worry, &lt;a href="https://github.com/godswillumukoro/php-calculator" rel="noopener noreferrer"&gt;I'll link the code&lt;/a&gt; to everything used in this lesson so you can check and compare with yours. Also, feel free to say hi to me on &lt;a href="https://twitter.com/umuks_" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;. Ready to build your calculator? let's go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up our local environment
&lt;/h2&gt;

&lt;p&gt;To run PHP, you need a server. You can turn our computer into a server to run our PHP code. To accomplish this, you will install a web server solution stack on your computer. There are a number of available option, I'll list my suggestions below:&lt;/p&gt;

&lt;p&gt;Windows / Linux: &lt;a href="https://www.apachefriends.org/" rel="noopener noreferrer"&gt;XAMPP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mac: &lt;a href="https://www.mamp.info/en/windows/" rel="noopener noreferrer"&gt;MAMP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have the software installed, It should look like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows / Linux&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624386554653%2FT3JaYF5uB.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624386554653%2FT3JaYF5uB.png" alt="Screenshot 2021-06-22 at 19.26.44.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mac&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624386570888%2FxwqkBSbw_.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624386570888%2FxwqkBSbw_.png" alt="Screenshot 2021-06-22 at 19.27.10.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you'll need to navigate to the &lt;em&gt;htdocs&lt;/em&gt; directory. You can find it on:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;: C:\xampp\htdocs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linux&lt;/strong&gt;: /opt/lampp/htdocs/ ~/Desktop/htdocs/&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mac&lt;/strong&gt;: /Applications/MAMP/htdocs&lt;/p&gt;

&lt;p&gt;This is where we will write our PHP code.&lt;/p&gt;

&lt;p&gt;If you are able to make it this far congrats! Now let's write some code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Writing the HTML
&lt;/h2&gt;

&lt;p&gt;Let's write some simple HTML code that displays a basic form with two text inputs, one select field with five options, and one button on the page.&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;title&amp;gt;Calculator&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;h1&amp;gt;Calculator World&amp;lt;/h1&amp;gt;
  &amp;lt;form&amp;gt;
    &amp;lt;input type="text" placeholder="operand 1"&amp;gt;
      &amp;lt;select&amp;gt;
          &amp;lt;option selected&amp;gt;None&amp;lt;/option&amp;gt;
          &amp;lt;option&amp;gt;Add&amp;lt;/option&amp;gt;
          &amp;lt;option&amp;gt;Subtract&amp;lt;/option&amp;gt;
          &amp;lt;option&amp;gt;Multiply&amp;lt;/option&amp;gt;
          &amp;lt;option&amp;gt;Divide&amp;lt;/option&amp;gt;
      &amp;lt;/select&amp;gt;
    &amp;lt;input type="text" placeholder="operand 2"&amp;gt;
    &amp;lt;button&amp;gt;=&amp;lt;/button&amp;gt;
  &amp;lt;div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your web page would look like this.&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624394553591%2Fe2uOPvIN1.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624394553591%2Fe2uOPvIN1.png" alt="Screenshot 2021-06-22 at 21.42.27.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You're doing awesome, next. we will style our page, so it looks clean to some extent. Feel free to skip this section if don't care about styling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Styling with CSS
&lt;/h2&gt;

&lt;p&gt;You can style your calculator however you want, I'll just give mine some basic styling. See code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    display: flex;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: lightgray;
}
h1 {
    margin-top: -10%;
    margin-bottom: 26px;
    font-size: 3.8rem;
    font-family: monospace;
}
form {
    display: flex;
    width: 80%;
    justify-content: space-evenly;
    align-items: center;
    background: whitesmoke;
    border-radius: 30px;
}
form input, button, select {
    padding: 20px;
    font-size: 1.2rem;
    border: none;
    background: inherit;
}
form input:focus {
    outline: 1px solid dimgray;
}

form button {
    background: dimgray;
    color: whitesmoke;
    border-radius: 50%;
}
div {
    color: dimgray;
    font-weight: 900;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 600px) {
    h1 {
        font-size: 3rem;
    }
    form {
        width: 95%;
        padding: 0 5%;
    }
    form input, button, select {
        width: 100%;
        margin: 0 5px;
        border-radius: 20px;
    }
    form button {
        /*border-radius: 0;*/
        /*padding-left: 20px;*/
        /*padding-right: 0;*/
        width: 10%;
    }
}

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

&lt;/div&gt;



&lt;p&gt;Next, let's connect our CSS to the HTML by including the link tag. See the example below:&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;link rel="stylesheet" href="./style.css"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your calculator would look similar to this if you used my style. If you styled yours differently, I'd like to see it 😃 simply tag me on &lt;a href="https://twitter.com/umuks_" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; and I'll check it out.&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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624392134210%2FPIO8Q9QSA.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%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1624392134210%2FPIO8Q9QSA.png" alt="Screenshot 2021-06-22 at 19.52.17.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, Let's enable the calculator to perform some basic calculations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Giving it Functionality
&lt;/h2&gt;

&lt;p&gt;PHP makes it easy to mix and match code within our HTML code using these tags &lt;code&gt;&amp;lt;?php ?&amp;gt;&lt;/code&gt;. Anything written within those tags is regarded as valid PHP code. Be sure to save your file with the &lt;code&gt;.php&lt;/code&gt; file extension.&lt;/p&gt;

&lt;p&gt;We want whatever value the user inputted to get displayed after the &lt;code&gt;=&lt;/code&gt; button. So within our form, just after the button element, we will write some PHP code to calculate user inputs as requested.&lt;/p&gt;

&lt;p&gt;To get user inputs, we will need to give each element inside the form a name as shown below:&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;input type="text" placeholder="operand 1" name="one"&amp;gt;
    &amp;lt;select name="operator"&amp;gt;
...
    &amp;lt;input type="text" placeholder="operand 2" name="two"&amp;gt;
    &amp;lt;button name="equals"&amp;gt;=&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we'll give the form a method that specifies what request type we will use in sending the form. For this, we have two options, &lt;code&gt;POST&lt;/code&gt; or &lt;code&gt;GET&lt;/code&gt;. We will use the latter in our code. Then we need to set an action attribute that tells the browser which file will process the form it's sending, in this case, it's going to be the same file. My file is named &lt;code&gt;index.php&lt;/code&gt;. If you named your file differently, be sure to check that it matches with the value provided in the action attribute. See the example below.&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;form action="index.php" method="GET"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we will target each element inside the form and write some logic on them. I'll show the PHP code in its entirety below, then explain what each line means afterward.&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;div&amp;gt;
      &amp;lt;?php
      if(isset($_GET['equals'])){
            $operandOne = $_GET['one'];
            $operandTwo = $_GET['two'];
            switch ($_GET['operator']){
                case 'None':
                    echo 'Select and operator';
                break;
                case 'Add':
                     echo $operandOne + $operandTwo;
                break;
                case 'Subtract':
                      echo $operandOne - $operandTwo;
                break;
                case 'Multiply':
                      echo $operandOne * $operandTwo;
                break;
                case 'Divide':
                     echo $operandOne / $operandTwo;
                break;
                default:
                    echo 'Nothing was supplied';
                break;
            }
        }else {
            echo '0';
        }
      ?&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Explaining the above PHP code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;?php&lt;/code&gt; Starts the PHP tag so anything we write within it is regarded as valid PHP code.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;if(isset($_GET['equals'])){&lt;/code&gt; Checks if the button, which has the name 'equals' has been clicked&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$operandOne = $_GET['one'];&lt;/code&gt; This statement declares a variable and initializes its value to whatever got passed in by the user into the first input field with the name 'one'.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$operandTwo = $_GET['two'];&lt;/code&gt; Creates a variable and initializes its values to what got passed into the second input field with name 'two'.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;switch ($_GET['operator']){&lt;/code&gt; A switch statement on what option got selected by the user on the select element.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;case 'None':&lt;/code&gt; This line says if the user selected None, perform the following action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo 'Select and operator';&lt;/code&gt; This string gets printed on the page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; Ends the switch statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;case 'Add':&lt;/code&gt; If the user selects Add, perform the following action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo $operandOne + $operandTwo;&lt;/code&gt; Add both values and print the sum on the page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; Ends the switch statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;case 'Subtract':&lt;/code&gt; If the user selects Subtract, perform the following action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo $operandOne - $operandTwo;&lt;/code&gt; Subtract the second value from the first and print the result on the page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; Ends the switch statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;case 'Multiply':&lt;/code&gt; If the user selects Multiply, perform the following action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo $operandOne * $operandTwo;&lt;/code&gt; Multiply both values and print the result on the page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; Ends the switch statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;case 'Divide':&lt;/code&gt; If the user selects Divide, perform the following action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo $operandOne / $operandTwo;&lt;/code&gt; Divide the second value from the first and print the result on the page&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; Ends the switch statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;default:&lt;/code&gt; If none of the above happens, do the following&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo 'Nothing was supplied';&lt;/code&gt; Prints the string&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break;&lt;/code&gt; End the program&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;}&lt;/code&gt; Ends Switch block&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;}else {&lt;/code&gt; Else statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;echo '0';&lt;/code&gt; Prints string to the screen until the if statement evaluates to true&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;}&lt;/code&gt; Ends the Else statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;?&amp;gt;&lt;/code&gt; Closes the PHP tag&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Seeing it work
&lt;/h2&gt;

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

&lt;p&gt;Thanks for reading this far, I hope you found this article helpful. If you got stuck at any point, please see the complete code on &lt;a href="https://github.com/godswillumukoro/php-calculator" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
    </item>
    <item>
      <title>How hard is it to learn how to code?</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Fri, 30 Apr 2021 06:08:16 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/how-hard-is-it-to-learn-how-to-code-m4b</link>
      <guid>https://forem.com/godswillumukoro/how-hard-is-it-to-learn-how-to-code-m4b</guid>
      <description>&lt;p&gt;Learning how to code is a topic that has been massively campaigned both by people who code, and people who do not code. &lt;/p&gt;

&lt;p&gt;There have been many misconceptions with regards to the question 'how hard is it to learn how to code?' &lt;/p&gt;

&lt;p&gt;In this video, I share my experience with learning to code and being a programmer for six years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can watch the Video here:&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>coding</category>
    </item>
    <item>
      <title>How To Self Study Technical Things</title>
      <dc:creator>Godswill Umukoro</dc:creator>
      <pubDate>Tue, 27 Apr 2021 15:09:10 +0000</pubDate>
      <link>https://forem.com/godswillumukoro/how-to-self-study-technical-things-2e37</link>
      <guid>https://forem.com/godswillumukoro/how-to-self-study-technical-things-2e37</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;You get excited about learning a new skill and suddenly got filled with so much motivation that you feel ready to crush your goals. So you sign up for a course, but after only a few weeks, all that passion and motivation just cooled off and just didn’t last.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is because learning technical things is hard, and self-learning is even harder.&lt;/p&gt;

&lt;p&gt;Just because you immensely studied through a couple of courses doesn’t necessarily make you well equipped to utilize it in the real world. Learning technical things involves a lot more than just taking courses, as that is only 20% of the effort required to succeed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Framework for Learning
&lt;/h2&gt;

&lt;p&gt;This is a sure framework to successfully self-study technical things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Learn just enough&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2. Do a project&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3. Iterate&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;4. Accountability&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now let's discuss each step in detail:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Learn Just Enough
&lt;/h3&gt;

&lt;h4&gt;
  
  
  The Probem
&lt;/h4&gt;

&lt;p&gt;The problem with learning technical things isn’t that there aren’t enough resources. The problem is that there are too many resources available and is easy to fall into the trap of the paradox of choice which often leaves you feeling overwhelmed making you abandon your goal of learning in the first place.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Solution
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Understand this:&lt;/strong&gt; It doesn’t really matter which course you pick. The market for introductory courses is oversaturated so you can get amazing courses either for free or at an incredibly discounted price. Just choose any of the best-selling courses/materials and you can be guaranteed high-quality educational material that teaches you the basics of the field.&lt;/p&gt;

&lt;p&gt;Once you start using an introductory learning material, you may face another potential problem I'll like to call 'The Learning Gap'.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Learning Gap
&lt;/h4&gt;

&lt;p&gt;Consuming information from a bunch of courses won’t get you far. There is a gap between beginner and intermediate that cannot be crossed with doing courses. We learn technical things so that we can use them. In some other fields, eg. Biology, the point of learning is to get knowledge into your head. But with technical things like programming, the focus is on application. This is why it doesn’t matter what information you have in your head if you don’t know how to implement it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Doing a bunch of theoretical courses is just about 20% of actually being able to independently implement.&lt;/strong&gt; The best way to learn is by directly practicing real-life implementation. Hence the importance of project-based learning.&lt;/p&gt;

&lt;h4&gt;
  
  
  Project-Based Learning
&lt;/h4&gt;

&lt;p&gt;Real learning begins when you work on a project. You will soon notice your theoretical knowledge come alive and start serving its purpose, helping you become a better programmer.&lt;/p&gt;

&lt;p&gt;Let's face it, it's boring when you're just learning a bunch of information. It's a surefire way of losing interest because what makes learning technical things exciting and interesting is when you're actually using the skills to build projects.&lt;/p&gt;

&lt;h4&gt;
  
  
  Learn the Minimum:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Choose an introductory course or book to learn the basic concepts and terminologies of the skills you want to learn. &lt;/li&gt;
&lt;li&gt;Don’t try to memorize or learn every single detail. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even after doing all of this, It's just the beginning of the learning process. Real learning starts with the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Work on a Project:
&lt;/h3&gt;

&lt;p&gt;Pick a project that interests you and attempt to build it by yourself. This is the best way to learn.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Iterate
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Iterate, Iterate, Iterate:&lt;/strong&gt; Now that you’ve built yourself a project, you have just opened up your path to really mastering the skill. Choose another project to do, and you will find out there are a lot of gaps in your knowledge, but that’s okay, you have the right frame of mind and you realize that’s the whole point. You 'interate' on what you learned by filling the gaps in your knowledge and diving deeper into the areas that will help you complete your project.&lt;/p&gt;

&lt;p&gt;As you become more skilled, you also have a better grasp of what projects interest you and how to choose the best projects to fill in skills that you want to learn so you can do more awesome projects. That’s what most people get wrong about learning. Learning is a cyclical process&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Accountability
&lt;/h3&gt;

&lt;p&gt;This importance of this is seen in a few weeks or months after starting the learning process when your enthusiasm and motivation starts wearing off and your goals start looking unachievable, when you become overwhelmed by all the jargon and concepts, when you’ve spent 5 hours trying to debug your code, when you hit a roadblock and all you just wanna do is give up, when you start asking your self questions like ‘is the goal really even worth it?', maybe I’m just too dumb to do this anyway. &lt;/p&gt;

&lt;p&gt;These times when you are at your weakest and most prone to give up are when accountability matters the most. It truly is your key to pushing through and succeeding. But how can you gain accountability?&lt;/p&gt;

&lt;h4&gt;
  
  
  Gaining Accountability
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Introspection:&lt;/strong&gt; Figure out what actually matters to you. It may be money, prestige, or family and friends. &lt;/p&gt;

&lt;h2&gt;
  
  
  Optional Framework Upgrade
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;How do you know when you’ve learned enough to start doing your project?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Start your learning by finding your project first!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get a job in that field or start your project with consequences that matter to you&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Take notes of only high-level concepts and focus on understanding.  Do not take copious amounts of notes and try to get all the details because knowing it won’t help you much in doing it. You will pick up the practical details anyway when you’re implementing the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don’t get married to any learning resource. Resources are just tools, what matters is accomplishing your goals. Learning is not a linear process. If you feel like a course is going into details or subjects that are not really relevant to your project, then skip it or find another resource. Maybe the parts you skipped will become relevant when you’re going through the iterate phase, then revisit it. Do not feel obligated to finish a course you don’t think is relevant anymore. Remember, your ability to complete your project is your guiding light so do what you have to do to learn just enough so you can start working on your project.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Thank you for reading the article till its end. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand this:&lt;/strong&gt; You can learn that new skill you've always wanted to learn.&lt;/p&gt;

&lt;p&gt;If you found this article helpful, be sure to follow me on &lt;a href="https://twitter.com/umuks_"&gt;Twitter&lt;/a&gt; for similar contents.&lt;/p&gt;

&lt;p&gt;This article was inspired by &lt;a href="https://www.youtube.com/channel/UC2UXDak6o7rBm23k3Vv5dww"&gt;Tina Huang&lt;/a&gt; Be sure to &lt;a href="https://www.youtube.com/watch?v=_EzmbCuoFcU"&gt;watch her video&lt;/a&gt; that explains this topic in detail.&lt;/p&gt;

</description>
      <category>selfstudy</category>
      <category>technical</category>
    </item>
  </channel>
</rss>
