<?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: daily.dev</title>
    <description>The latest articles on Forem by daily.dev (@dailydotdev).</description>
    <link>https://forem.com/dailydotdev</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%2Forganization%2Fprofile_image%2F356%2Fceb8dc0f-a77b-4f89-84da-52216a4286e1.png</url>
      <title>Forem: daily.dev</title>
      <link>https://forem.com/dailydotdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dailydotdev"/>
    <language>en</language>
    <item>
      <title>Upcoming TED-like events for developers</title>
      <dc:creator>Nimrod Kramer</dc:creator>
      <pubDate>Sun, 16 May 2021 16:07:44 +0000</pubDate>
      <link>https://forem.com/dailydotdev/upcoming-ted-like-events-for-developers-pbe</link>
      <guid>https://forem.com/dailydotdev/upcoming-ted-like-events-for-developers-pbe</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynkdiq3eoqag278ns0hy.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fynkdiq3eoqag278ns0hy.jpeg" alt="Alt Text" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Monthly Dev: World-Class Talks by Expert Developers
&lt;/h2&gt;

&lt;p&gt;The Monthly Dev is a series of online events brought to you with love by daily.dev. It's a place for software engineers to gather and hear world-class talks, once a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upcoming Events 🦄
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60886ef7usyylokupge7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F60886ef7usyylokupge7.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Monthly Dev 5 (May 2021) - RSVP Below 🚀
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Redux, Career advise for devs, and freeCodeCamp
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/acemarke" rel="noopener noreferrer"&gt;Mark Erikson&lt;/a&gt; - Redux maintainer&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/twerske" rel="noopener noreferrer"&gt;Emma Twersky&lt;/a&gt; - DevRel at Google&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/ossia" rel="noopener noreferrer"&gt;Quincy Larson&lt;/a&gt; - Founder of freeCodeCamp.org&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;➜ &lt;a href="https://www.meetup.com/the-monthly-dev-world-class-talks-by-expert-developers/events/277134257/" rel="noopener noreferrer"&gt;RSVP to the event&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2gft6v5gscj7s07aak2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2gft6v5gscj7s07aak2.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Monthly Dev 6 (June 2021) - RSVP Below 🚀
&lt;/h3&gt;

&lt;p&gt;An event in collaboration with &lt;strong&gt;Microsoft Reactor&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;➜ &lt;a href="https://www.meetup.com/the-monthly-dev-world-class-talks-by-expert-developers/events/278158674/" rel="noopener noreferrer"&gt;RSVP to the event&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g4ni7ylyy34wrhv5947.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g4ni7ylyy34wrhv5947.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Monthly Dev 7 (July 2021) - RSVP Below 🚀
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Developer Experience, AWS Amplify, and React Query
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/everConfusedGuy" rel="noopener noreferrer"&gt;Inian Parameshwaran&lt;/a&gt; - Engineering at Supabase&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/tannerlinsley" rel="noopener noreferrer"&gt;Tanner Linsley&lt;/a&gt; - Co-Founder at Nozzle and OSS fanatic (React Query) &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/ASpittel" rel="noopener noreferrer"&gt;Ali Spittel&lt;/a&gt; - Leading Developer Advocacy at AWS Amplify&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;➜ &lt;a href="https://www.meetup.com/the-monthly-dev-world-class-talks-by-expert-developers/events/278158726/" rel="noopener noreferrer"&gt;RSVP to the event&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See you there!&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>Creating a Killer GitHub Profile README Part 2</title>
      <dc:creator>Braydon Coyer</dc:creator>
      <pubDate>Mon, 01 Feb 2021 13:59:52 +0000</pubDate>
      <link>https://forem.com/dailydotdev/creating-a-killer-github-profile-readme-part-2-1hie</link>
      <guid>https://forem.com/dailydotdev/creating-a-killer-github-profile-readme-part-2-1hie</guid>
      <description>&lt;p&gt;Welcome to part 2 of this article series where I show you how to create a killer GitHub profile! &lt;/p&gt;

&lt;p&gt;If you haven't read part 1, &lt;a href="https://daily.dev/posts/creating-a-killer-github-profile-readme-part-1" rel="noopener noreferrer"&gt;click here&lt;/a&gt; and follow along before reading this article.&lt;/p&gt;

&lt;p&gt;In the previous article, I documented my process for building out my &lt;code&gt;README.template.md&lt;/code&gt; file. &lt;/p&gt;

&lt;p&gt;I added sections for an intro, latest blog posts, pinned repositories, GitHub stats, skills and a skeleton section for an Office quote.&lt;/p&gt;

&lt;p&gt;In this second article and final issue in this series, I will add the dynamic content injection and will get you familiar with GitHub Action workflows! &lt;/p&gt;

&lt;h3&gt;
  
  
  Prepping for the Magic
&lt;/h3&gt;

&lt;p&gt;Now that the &lt;code&gt;README.template.md&lt;/code&gt; file is complete, I started working on the fun part — the dynamic injection. &lt;/p&gt;

&lt;p&gt;There are two main portions of the file that need dynamic content injection — the blog section and The Office quote section. &lt;/p&gt;

&lt;p&gt;Listing recent blog articles is the easy part — that functionality was built for me (see the linked tutorial in the previous article) and I just needed to hook up the workflow.&lt;/p&gt;

&lt;p&gt;The Office quote, however, required a little more effort because I needed to create the functionality myself. For something simple like making an API request, I decided to create a simple node script to handle the operation.&lt;/p&gt;

&lt;p&gt;At the root of my repository, I created a new file called &lt;code&gt;index.js&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  The index.js File
&lt;/h3&gt;

&lt;p&gt;There are four steps this file needs to complete:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a variable to reference the &lt;code&gt;README.template.md&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;Make the request to The Office API&lt;/li&gt;
&lt;li&gt;Look through the &lt;code&gt;README.template.md&lt;/code&gt; content and replace the static patterns (&lt;code&gt;{office_quote}&lt;/code&gt; &amp;amp; &lt;code&gt;{office_character}&lt;/code&gt;) with the dynamic result of the API request&lt;/li&gt;
&lt;li&gt;Create/replace the contents of the &lt;code&gt;README.md&lt;/code&gt; file with the updated &lt;code&gt;README.template.md&lt;/code&gt; reference variable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thinking about these responsibilities, I imported the required dependencies in the &lt;code&gt;index.js&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;isomorphic-unfetch&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="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;promises&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="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;fs&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;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To complete step one, I declared an async function called &lt;code&gt;main&lt;/code&gt; , grabbed a reference to the template file and placed it in variable named &lt;code&gt;readmeTemplate&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&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;readmeTemplate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cwd&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./README.template.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="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;utf-8&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="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to make the API request. Below the &lt;code&gt;readmeTemplate&lt;/code&gt; variable, I created a request to The Office API and assigned the result to a variable called &lt;code&gt;office_quote&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;office_quote&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&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;https://officeapi.dev/api/quotes/random&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="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The third step is to replace the patterns in the template file with the dynamic content retrieved from The Office API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;readme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;readmeTemplate&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;{office_quote}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;office_quote&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;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;{office_character}&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;`- &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;office_quote&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;character&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;office_quote&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;character&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastname&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, I create/replace the contents of the &lt;code&gt;README.md&lt;/code&gt; file with the &lt;code&gt;readmeTemplate&lt;/code&gt; variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;README.md&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;readme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point I could run &lt;code&gt;node .&lt;/code&gt; at the root of my repository and the &lt;code&gt;index.js&lt;/code&gt; file worked its magic. Opening the &lt;code&gt;README.md&lt;/code&gt; file, I saw the dynamic quote at the bottom of the file.&lt;/p&gt;

&lt;p&gt;If you want to reference my full &lt;code&gt;index.js&lt;/code&gt; file, click &lt;a href="https://github.com/braydoncoyer/braydoncoyer/blob/main/index.js" rel="noopener noreferrer"&gt;HERE&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating the Workflow
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;index.js&lt;/code&gt; file, by itself, isn't very helpful because I need to run the file every time I want the quote to update. How do I have the file run automatically? GitHub Actions.&lt;/p&gt;

&lt;p&gt;Setting up a GitHub Action workflow is easy if I have the correct file-structure; I don’t need to do anything on GitHub’s website to get it working.&lt;/p&gt;

&lt;p&gt;I created the following directories and file at the root of my repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;root&lt;/span&gt;
  &lt;span class="s"&gt;- .github&lt;/span&gt;
      &lt;span class="s"&gt;workflows&lt;/span&gt;
        &lt;span class="s"&gt;dynamic-injection-workflow.yml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsgkqc8zhv82zgg21va24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsgkqc8zhv82zgg21va24.png" alt="File structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I opened the &lt;code&gt;dynamic-injection-workflow.yml&lt;/code&gt; file, named the workflow and added some instruction on when the workflow should run. I scheduled a cron job to run this workflow every hour so new blog posts are fetched frequently and visitors get a new Office quote with regular cadence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dynamic README injection&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Run workflow automatically&lt;/span&gt;
    &lt;span class="c1"&gt;# This will make it run every hour&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
    &lt;span class="c1"&gt;# Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Now that I have basic structure in the workflow, I need to define jobs for the workflow to run. &lt;/p&gt;

&lt;p&gt;The order of these jobs matter (more on that in a second), so I created the first job to get an Office quote.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dynamic README injection&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Run workflow automatically&lt;/span&gt;
    &lt;span class="c1"&gt;# This will make it run every hour&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;
    &lt;span class="c1"&gt;# Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;get-office-quotes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Let the magic happen&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;14.6.0&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yarn&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;node .&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Add to git repo&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;git config pull.rebase false&lt;/span&gt;
          &lt;span class="s"&gt;git pull&lt;/span&gt;
          &lt;span class="s"&gt;git add .&lt;/span&gt;
          &lt;span class="s"&gt;git config --global user.name "Your Name"&lt;/span&gt;
          &lt;span class="s"&gt;git config --global user.email "Your E-Mail"&lt;/span&gt;
          &lt;span class="s"&gt;git commit -m "[Automated] README updated with new Office quote!"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Push&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ad-m/github-push-action@master&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;github_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice that the job runs &lt;code&gt;node .&lt;/code&gt; at the root of the project, causing the &lt;code&gt;index.js&lt;/code&gt; file to execute, fetch the quote, and take everything in the &lt;code&gt;README.template.md&lt;/code&gt; file and copy it over to the &lt;code&gt;README.md&lt;/code&gt; file. This, in and of itself, isn't enough for the updated information to show up on my profile. I need to commit and push the changes to my repository, which is why I added he  &lt;code&gt;Add to git repo&lt;/code&gt; step. &lt;/p&gt;

&lt;p&gt;Now that the &lt;code&gt;README.md&lt;/code&gt; file contains an Office quote and everything else in the &lt;code&gt;README.template.md&lt;/code&gt; file, I can run the final job to fetch my updated blog posts (Remember, the &lt;code&gt;README.md&lt;/code&gt; file now contains the static blog post pattern we created in the previous article).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dynamic README injection&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Run workflow automatically&lt;/span&gt;
    &lt;span class="c1"&gt;# This will make it run every hour&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*"&lt;/span&gt;

  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;get-office-quotes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# job steps&lt;/span&gt;
        &lt;span class="s"&gt;...&lt;/span&gt;

  &lt;span class="na"&gt;update-readme-with-blog&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;needs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;get-office-quotes&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update this repo's README with latest blog posts&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v2&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gautamkrishnar/blog-post-workflow@master&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# Replace this URL with your rss feed URL/s&lt;/span&gt;
          &lt;span class="na"&gt;feed_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://braydoncoyer.hashnode.dev/rss.xml"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because of the way that &lt;a href="https://twitter.com/gautamkrishnar" rel="noopener noreferrer"&gt;Gautam Krishna R's&lt;/a&gt; GitHub action works, this job must run after I inject an Office quote — if it doesn't, it will write over the content in the &lt;code&gt;README.md&lt;/code&gt; file and delete the quote. Thankfully, GitHub Actions has a &lt;code&gt;needs&lt;/code&gt; property that I added to the workflow so that it only activates after the &lt;code&gt;get-office-quotes&lt;/code&gt; workflow has completed its steps.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;dynamic-injection-workflow.yml&lt;/code&gt; file is now complete. I committed my changes and pushed them to my GitHub profile repository. &lt;/p&gt;

&lt;p&gt;GitHub recognized that I added a workflow and I can see it listed under Actions &amp;gt; All workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fidii9spks44sme9ztom2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fidii9spks44sme9ztom2.png" alt="The Action on GitHub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To manually run the workflow and to test to see if it was working, I clicked on the 'Run workflow' dropdown button and then had the workflow run on the main branch. (Remember, the cron job will run this automatically every hour.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwo70v9ggww8z815j1o4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwo70v9ggww8z815j1o4n.png" alt="Manually run the workflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the workflow successfully completed both jobs, I went back to my profile to see the final result!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/tzFjGxURDcjzVoTusV/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/tzFjGxURDcjzVoTusV/giphy.gif" alt="README Gif"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;There we go! You should now have all of the tools required to make a killer GitHub profile README! &lt;/p&gt;

&lt;p&gt;Don't forget that your profile on GitHub is like your portfolio -- use it as a platform to highlight what makes you unique as a developer!&lt;/p&gt;

&lt;p&gt;When you've finished created your own GitHub profile README, send me a link in the comments below! I'd love to check it out!&lt;/p&gt;

&lt;p&gt;Thanks for reading! &lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;Daily&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt; &lt;/p&gt;

</description>
      <category>github</category>
      <category>markdown</category>
      <category>webdev</category>
      <category>readme</category>
    </item>
    <item>
      <title>Creating a Killer GitHub Profile README Part 1</title>
      <dc:creator>Braydon Coyer</dc:creator>
      <pubDate>Tue, 19 Jan 2021 17:19:15 +0000</pubDate>
      <link>https://forem.com/dailydotdev/creating-a-killer-github-profile-readme-part-1-33nm</link>
      <guid>https://forem.com/dailydotdev/creating-a-killer-github-profile-readme-part-1-33nm</guid>
      <description>&lt;p&gt;README's. You know, those markdown files that get created when you generate a new project or create a GitHub repository. Perhaps you're a developer who updates the README file for each project you work on. Or maybe you're a developer who leaves the boilerplate content inside. &lt;/p&gt;

&lt;p&gt;As of July 2020, GitHub now allows developers to create a profile-level repository and use the README to add some personality to their page. &lt;/p&gt;

&lt;p&gt;I've known about this for a few months now but only recently dove in. And, well... I may have gone a bit overboard. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/tzFjGxURDcjzVoTusV/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/tzFjGxURDcjzVoTusV/giphy.gif" alt="README Gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/braydoncoyer" rel="noopener noreferrer"&gt;Check out my GitHub profile here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Many developers, I believe, inject a bunch of 'cool' widgets and badges in their profile instead of realizing that their GitHub profile is very much like a portfolio — it should highlight &lt;em&gt;what makes you unique&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;There are many articles and tutorials on the web (some linked throughout this article) that show you how to add basic information to your &lt;code&gt;README.md&lt;/code&gt; file — images, badges and statistics. But I wanted something a bit more personal; I wanted a unique profile that accomplished a few things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Provided a route for visitors to find my other social outlets&lt;/li&gt;
&lt;li&gt;Highlighted my most recently published articles&lt;/li&gt;
&lt;li&gt;Displayed pinned repositories in a visual-appeasing fashion&lt;/li&gt;
&lt;li&gt;Allowed visitors to see some of my GitHub statistics &lt;/li&gt;
&lt;li&gt;Listed some of my skills for those interested or for future employers&lt;/li&gt;
&lt;li&gt;End the experience with something a bit more fun; a quote from an API I built.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I encourage you to make your own list — what do you want on your profile? How is it going to highlight what makes you unique? &lt;/p&gt;

&lt;p&gt;In this two-part article series, I will walk through, step by step, how I created my profile so that you can make your own &lt;code&gt;README.md&lt;/code&gt; file stand out from the crowd.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Limitations
&lt;/h3&gt;

&lt;p&gt;If you're new to markdown files in general, it's important to have a high-level idea of what we'll be doing. After all, you can't provide solutions without understanding limitations. &lt;/p&gt;

&lt;p&gt;I knew that I wanted basic content and information in my README — things like images, headings, badges that redirect users when clicked and even graphs and widgets that display GitHub statistics. Tutorials are scattered across the internet and make implementing these things relatively easy.&lt;/p&gt;

&lt;p&gt;But I also knew I wanted my README to be dynamic; I wanted it to automatically fetch my most recent blog posts and to display a quote from The Office API that I built. This is where things get tricky. Markdown files can't make API requests on their own, so how would I inject content dynamically? &lt;/p&gt;

&lt;p&gt;GitHub Actions. These built-in repository pipelines allow developers to automate tasks and workflows and is what I used to fetch blog posts and request a random quote from my API. These workflows can trigger files or functions to obtain information and inject the content into my README. I assigned a cron job to run the workflow every hour so my profile is always up-to-date with new articles and visitors get a fresh quote each time they visit my profile.&lt;/p&gt;

&lt;p&gt;There's a few 'gotchas' with this implementation that we'll discuss in the next article, but I hope this gives you a high-level overview of how we'll approach the problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Your Profile Repository
&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and create a new repository that has the same name as your GitHub username. My username is &lt;code&gt;braydoncoyer&lt;/code&gt;, so I created a repository with the name &lt;code&gt;braydoncoyer&lt;/code&gt;. If you’ve done this correctly, GitHub will display a secret message (pictured below).&lt;/p&gt;

&lt;p&gt;I set the repository access to &lt;strong&gt;private&lt;/strong&gt; until I was ready for the world to see it, but feel free to make it public if you want.&lt;/p&gt;

&lt;p&gt;I also initialized the repository with  &lt;code&gt;README.md&lt;/code&gt; and &lt;code&gt;.gitignore&lt;/code&gt; files.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: The screenshot below is giving me an error because I've already created a profile-level repository. You shouldn't see this error. Also, if you didn't know, GitHub recently shipped dark mode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flp7vy1937cifyxuno56w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flp7vy1937cifyxuno56w.png" alt="Create GitHub Repo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once I created the repository, I cloned it down and opened it in my favorite editor. &lt;/p&gt;

&lt;h3&gt;
  
  
  Create a README Template
&lt;/h3&gt;

&lt;p&gt;Although I initialized the repository with a &lt;code&gt;README.md&lt;/code&gt; file, I quickly found out that I needed to edit my content in a separate file and use it as a template — a skeleton of static content that will be used to construct the final &lt;code&gt;README.md&lt;/code&gt; file. There are several reasons for this, but here are two of the most important:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Eventually, the GitHub Actions workflow will trigger files that will use the template, inject the dynamic content and then take the entire template and paste it in the README file. &lt;/li&gt;
&lt;li&gt;If you're editing the &lt;code&gt;README.md&lt;/code&gt; file directly, you're going to have LOTS of merge conflicts after the dynamic injection performs its magic.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With that said, at the root level of my repository, I created a new file called &lt;code&gt;README.template.md&lt;/code&gt;. This is the file I will be editing manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Banner Image
&lt;/h3&gt;

&lt;p&gt;I decided I wanted visitors to be greeted with a nice banner image that directed visitors to my portfolio when it was clicked.&lt;/p&gt;

&lt;p&gt;I opened Illustrator, created a 1500x500 document and designed the banner image according to my personal style.&lt;/p&gt;

&lt;p&gt;Back in my repository, I created a new root-level directory named &lt;code&gt;assets&lt;/code&gt; , placed the image in the folder and consumed it in the &lt;code&gt;README.template.md&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![Braydon's GitHub Banner&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;./assets/GitHubHeader.png&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://braydoncoyer.dev)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Social Badges
&lt;/h3&gt;

&lt;p&gt;One of my goals with my GitHub profile README is to direct visitors to my other social networks (Twitter, LinkedIn and CodePen, specifically). &lt;/p&gt;

&lt;p&gt;To do that, I made sure I had social badges listed at the top of the profile so that it's one of the first things visitors see. &lt;/p&gt;

&lt;p&gt;To create these badges, I  used &lt;a href="https://shields.io/" rel="noopener noreferrer"&gt;shields.io&lt;/a&gt; and edited the badge text, badge color and destination URL. &lt;/p&gt;

&lt;p&gt;I thought it would also be fun to keep a track of my profile visits, so I created a badge and listed it next to the social badges.&lt;/p&gt;

&lt;p&gt;To create your own visits badge, copy the 'Visits Badge' markdown content below and change the repository destination in the URL (everything after '/visits/').&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![Visits Badge&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://badges.pufler.dev/visits/braydoncoyer/braydoncoyer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https:braydoncoyer.dev)
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![Twitter Badge&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Twitter-Profile-informational?style=flat&amp;amp;logo=twitter&amp;amp;logoColor=white&amp;amp;color=1CA2F1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://twitter.com/BraydonCoyer)
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![LinkedIn Badge&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/LinkedIn-Profile-informational?style=flat&amp;amp;logo=linkedin&amp;amp;logoColor=white&amp;amp;color=0D76A8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://www.linkedin.com/in/braydon-coyer/)
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;![CodePen Badge&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/CodePen-Profile-informational?style=flat&amp;amp;logo=codepen&amp;amp;logoColor=white&amp;amp;color=black&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;](https://codepen.io/braydoncoyer)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Introduction Section
&lt;/h3&gt;

&lt;p&gt;Believe it or not, the banner image and social badges don't take up that space. Now that visitors have an optional route to see my other social networks, they need to know a little about me.&lt;/p&gt;

&lt;p&gt;I only wrote a small blurb for the introduction. If visitors want to know more about me, they can find that information on my portfolio website or LinkedIn profile. Don't make the mistake of overwhelming visitors with too much information.&lt;/p&gt;

&lt;p&gt;At the end of the introduction, I present the visitor with a call-to-action to visit my portfolio website — again, I don't want to overwhelm the visitor, but rather give just enough information about me and provide a way for them to read more if they desire.&lt;/p&gt;

&lt;h3&gt;
  
  
  Latest Blog Posts
&lt;/h3&gt;

&lt;p&gt;Next, I want visitors to see my most recent blog posts. This needs to be dynamic and updated with regular cadence. The hard work will eventually be delegated to a separate file that the GitHub Action workflow will run, but in order for that file to know where to inject the content, it requires a certain pattern in the template. &lt;/p&gt;

&lt;p&gt;For now, I put the following under the blog post section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- BLOG-POST-LIST:START --&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- BLOG-POST-LIST:END --&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;To inject my blog feed into the &lt;code&gt;README.md&lt;/code&gt; file, I followed &lt;a href="https://hashnode.com/@iamdarshshah" rel="noopener noreferrer"&gt;Darsh Shah's&lt;/a&gt; article &lt;em&gt;&lt;a href="https://iamdarshshah.hashnode.dev/how-to-add-your-recently-published-articles-to-your-github-profile-readme-using-github-actions" rel="noopener noreferrer"&gt;How to Add Your Recently Published Articles to Your GitHub Profile README using GitHub Actions 🤖&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pinned Repositories &amp;amp; GitHub Stats
&lt;/h3&gt;

&lt;p&gt;Along with my most recent blog posts, I wanted to shift the spotlight to a few of my other repositories and display some statistics. To accomplish this, I used Anurag Hazra‘s &lt;em&gt;&lt;a href="https://github.com/anuraghazra/github-readme-stats" rel="noopener noreferrer"&gt;GitHub ReadMe Stats&lt;/a&gt; -&lt;/em&gt; The content you retrieve from his API can be wrapped in an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag and styled in various ways. The documentation is easy to follow; I encourage you to check it out!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- Pinned Repositories -- &amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;a href="https://github.com/braydoncoyer/tailwindcss-v2-dark-mode-template"&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;img align="center" style="margin:1rem 0.5rem" src="https://github-readme-stats.vercel.app/api/pin/?username=braydoncoyer&amp;amp;repo=tailwindcss-v2-dark-mode-template&amp;amp;title_color=ffffff&amp;amp;text_color=c9cacc&amp;amp;icon_color=4AB197&amp;amp;bg_color=1A2B34" /&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;br&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;a href="https://github.com/braydoncoyer/ng-limeade"&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;img align="center" style="margin:0.5rem" src="https://github-readme-stats.vercel.app/api/pin/?username=braydoncoyer&amp;amp;repo=ng-limeade&amp;amp;title_color=ffffff&amp;amp;text_color=c9cacc&amp;amp;icon_color=4AB197&amp;amp;bg_color=1A2B34" /&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;a href="https://github.com/braydoncoyer/officeapi"&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;img align="center" style="margin:0.5rem" src="https://github-readme-stats.vercel.app/api/pin/?username=braydoncoyer&amp;amp;repo=officeapi&amp;amp;title_color=ffffff&amp;amp;text_color=c9cacc&amp;amp;icon_color=4AB197&amp;amp;bg_color=1A2B34" /&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- GitHub Stats -- &amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;a href="https://github.com/braydoncoyer"&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;img align="center" style="margin:0.5rem" src="https://github-readme-stats.vercel.app/api/top-langs/?username=braydoncoyer&amp;amp;hide=html,css&amp;amp;title_color=ffffff&amp;amp;text_color=c9cacc&amp;amp;icon_color=4AB197&amp;amp;bg_color=1A2B34" /&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;a href="https://github.com/braydoncoyer"&amp;gt;&lt;/span&gt;
  &lt;span class="c"&gt;&amp;lt;img align="center" style="margin:0.5rem" src="https://github-readme-stats.vercel.app/api?username=braydoncoyer&amp;amp;show_icons=true&amp;amp;line_height=27&amp;amp;count_private=true&amp;amp;title_color=ffffff&amp;amp;text_color=c9cacc&amp;amp;icon_color=4AB097&amp;amp;bg_color=1A2B34" alt="Braydon's GitHub Stats" /&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Skills
&lt;/h3&gt;

&lt;p&gt;Next, I needed a way to show visitors my skills as a full-stack web developer. I didn't want to put my skills in an unordered list; it would take up a lot of space on the page and the unordered list doesn't provide much of a stylish flare.&lt;/p&gt;

&lt;p&gt;Instead, I used badges from &lt;a href="http://shield.io" rel="noopener noreferrer"&gt;shield.io&lt;/a&gt; and displayed the badges inline on the page, using the same background color as the banner image to keep design consistency throughout the profile.&lt;/p&gt;

&lt;p&gt;Because I wanted to list a lot of skills, I decided to have some core-skills displayed by default, and optionally show more skills using a &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;[](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Code-Angular-informational?style=flat&amp;amp;logo=angular&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;![](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Code-Ionic-informational?style=flat&amp;amp;logo=ionic&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;![](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Code-React-informational?style=flat&amp;amp;logo=react&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
...

&lt;span class="nt"&gt;&amp;lt;details&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;More Skills&lt;span class="nt"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;

&lt;span class="p"&gt;[](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Style-CSS-informational?style=flat&amp;amp;logo=css3&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;![](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Style-Tailwind-informational?style=flat&amp;amp;logo=Tailwind-CSS&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;![](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Style-Sass-informational?style=flat&amp;amp;logo=Sass&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;![](&lt;/span&gt;&lt;span class="sx"&gt;https://img.shields.io/badge/Style-Stylus-informational?style=flat&amp;amp;logo=Stylus&amp;amp;logoColor=white&amp;amp;color=4AB197&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
...
&lt;span class="nt"&gt;&amp;lt;/details&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To see the full list of badges I used in the &lt;code&gt;README.template.md&lt;/code&gt; file, click &lt;a href="https://raw.githubusercontent.com/braydoncoyer/braydoncoyer/main/README.template.md" rel="noopener noreferrer"&gt;HERE&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Office Quote
&lt;/h3&gt;

&lt;p&gt;Before visitors leave my profile I wanted to end their experience with something unique and with a personal touch. Very much like the blog post section, a GitHub Action workflow will run a script that will look for a pattern in the &lt;code&gt;README.template.md&lt;/code&gt; and inject a random quote.&lt;/p&gt;

&lt;p&gt;I put the following pattern in the Office quote section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{office_quote}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{office_character}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

Check back at the top of the hour for a new quote!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that, the static content is complete and satisfies the goals I listed for my profile.&lt;/p&gt;

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

&lt;p&gt;In the next article, I’ll show you how I created my GitHub Action workflow and injected the dynamic content into the &lt;code&gt;README.md&lt;/code&gt; file!&lt;/p&gt;

&lt;p&gt;Thanks for reading! If you liked this article and want more content like this, &lt;a href="https://braydoncoyer.dev/newsletter/" rel="noopener noreferrer"&gt;subscribe to my newsletter&lt;/a&gt; and make sure to follow me on &lt;a href="https://twitter.com/BraydonCoyer" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>markdown</category>
      <category>webdev</category>
      <category>readme</category>
    </item>
    <item>
      <title>Train a Neural Network to Count, with Javascript &amp; Dannjs</title>
      <dc:creator>Matias Vazquez-Levi</dc:creator>
      <pubDate>Thu, 14 Jan 2021 15:38:08 +0000</pubDate>
      <link>https://forem.com/dailydotdev/train-a-neural-network-to-count-with-javascript-dannjs-2h94</link>
      <guid>https://forem.com/dailydotdev/train-a-neural-network-to-count-with-javascript-dannjs-2h94</guid>
      <description>&lt;p&gt;Counting is pretty intuitive for us humans, not as much for neural networks. This is why you are here, learning to build your first neural network with Dannjs. Using some machine learning concepts, we are going to build a neural network in JavaScript that learns to count number after number. Dannjs is a new open-source library that allows for the simple implementation of neural networks in your projects.&lt;/p&gt;

&lt;p&gt;Making a neural network yourself is a good way to familiarise yourself with the concept itself. This is also relatively simple to do. The library we will use, Dannjs, makes it even easier to have clean and simple code.&lt;/p&gt;

&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.dev/" rel="noopener noreferrer"&gt;Nodejs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dannjs.org/" rel="noopener noreferrer"&gt;Dannjs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Some abstract knowledge about Neural Networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s understand the basics of binary numbers first.&lt;/p&gt;

&lt;p&gt;To teach our Neural Network to count, we will translate our well-known integers into binary data (4-bits). Each bit is going to correspond to one input/output neuron in the neural network.&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%2Fcontent.instructables.com%2FORIG%2FFSM%2FGFJW%2FIKYG9OLC%2FFSMGFJWIKYG9OLC.png%3Fauto%3Dwebp%26frame%3D1%26fit%3Dbounds%26md%3D319f7cdfd3af91962f90665331095e6b" 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%2Fcontent.instructables.com%2FORIG%2FFSM%2FGFJW%2FIKYG9OLC%2FFSMGFJWIKYG9OLC.png%3Fauto%3Dwebp%26frame%3D1%26fit%3Dbounds%26md%3D319f7cdfd3af91962f90665331095e6b"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ideally, we want to train our network to output the next number we feed it. For example, If we feed the network &lt;code&gt;[0,0,0,1]&lt;/code&gt; we want it to output &lt;code&gt;[0,0,1,0]&lt;/code&gt;. Since there are only 4 spaces for boolean information, our model will only count up to 15, which is equal to 1111 in binary. You could try adding more inputs and outputs to your model. In this case, your dataset would have to be bigger to accommodate 5 bits of information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Setup
&lt;/h2&gt;

&lt;p&gt;First off, we’re going to install Dannjs locally in our project directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i dannjs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We would now need to require the node module we installed in our main js 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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Dannjs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dannjs&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;Dann&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Dannjs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dann&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating the Neural Network
&lt;/h2&gt;

&lt;p&gt;This is how we would create the neural network. We are giving it 4 input neurons for the 4 bits of binary data to input. We are also going to give it 4 output neurons for the 4 bits of binary data the model is going to have to output.&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;countingNN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Dann&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We now need to add some hidden layers. I’ve found that 16 neurons worked well enough. You could experiment with this value later. A hidden layer is basically a neuron layer that can perform computations. The name ‘hidden’ comes from the fact that you do not need to see the values of each neuron, unlike the input/output layers. You can learn more about hidden layers &amp;amp; the basics surrounding it &lt;a href="https://towardsdatascience.com/first-neural-network-for-beginners-explained-with-code-4cfd37e06eaf" rel="noopener noreferrer"&gt;here&lt;/a&gt;. We are also going to set the activation function to  &lt;code&gt;'leakyReLU'&lt;/code&gt; , activation functions are also explained in the link above.&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;countingNN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Dann&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addHiddenLayer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leakyReLU&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Technically, we have finished the creation of our model by now. We could test it right away with the &lt;code&gt;Dann.log();&lt;/code&gt; command or by feeding the model some 4-bit data.&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;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;feedForward&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],{&lt;/span&gt;&lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The log function displays information about the model we just created. We also specify in the feedForward options that we want to log the predictions of the model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Dann NeuralNetwork:
  Layers:
    Input Layer:   4
    hidden Layer: 16  (leakyReLU)
    output Layer: 4  (sigmoid)
  Other Values:
    Learning rate: 0.01
    Loss Function: mse
    Latest Loss: 0

Prediction:  [0.5398676880698,0.6730987170697,0.6748741672290,0.6377646387674]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see that this gives us some random predictions. Obviously, this was going to happen because we never trained the model… In order to train our model, we need some sort of dataset telling the neural network what to output according to what input is given.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the Dataset
&lt;/h2&gt;

&lt;p&gt;To train the model, we’re going to need a dataset. Here is a lightweight js dataset for 4-bits binary counting. It basically looks like this:&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;dataset4bit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;

    &lt;span class="c1"&gt;//...&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="c1"&gt;//  {&lt;/span&gt;
    &lt;span class="c1"&gt;//      input:[1,0,1,1],&lt;/span&gt;
    &lt;span class="c1"&gt;//      target:[1,1,0,0]&lt;/span&gt;
    &lt;span class="c1"&gt;//  },&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;

    &lt;span class="c1"&gt;//...&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can access the dataset &lt;a href="https://gist.githubusercontent.com/matiasvlevi/6ef03e4fe0ca92cb466c6d19a7cfce6a/raw/95e7a4a5c5549dd8ee585334248878465ceec139/4bitCountingData" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that this dataset contains one number &lt;code&gt;x&lt;/code&gt; in 4-bit binary, as the input value and the number &lt;code&gt;x+1&lt;/code&gt; in 4-bit binary as the target value. I commented out the element &lt;code&gt;[1,0,1,1]&lt;/code&gt; so we can have a test sample the neural network has never seen. To access the data, we can copy the code included in the GitHub gist above and save it in binaryCountData.js in the same directory as our project. We can then require the 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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./binaryCountData.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can now access the data this way:&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;dataset&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;
&lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have access to the dataset let’s apply it by calling &lt;code&gt;Dann.backpropagate();&lt;/code&gt; for each data point in our dataset array. This will tune the weights of the model according to the data you give it.&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;backpropagate&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;input&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;target&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;This counts as 1 epoch. We iterated through every element in our dataset once. Sadly, 1 epoch is not enough for a Neural Network to train properly. We would need to perform multiple epochs in order to achieve satisfying results.  Let's also add a &lt;code&gt;Dann.feedForward();&lt;/code&gt; to test what the model outputs after training.&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;epoch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;epoch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;backpropagate&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;input&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;target&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;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;feedForward&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],{&lt;/span&gt;&lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And after training 100 000 epochs, it outputs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prediction:  [0.999884854,0.9699951248,0.020084607062,0.008207215405]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We made it! We can see that it guesses pretty close to &lt;code&gt;[1,1,0,0]&lt;/code&gt;, which is a good answer.&lt;br&gt;
This is what the final js code should look like:&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;Dannjs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dannjs&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;Dann&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Dannjs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dann&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;dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./binaryCountData.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;dataset4bit&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;countingNN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Dann&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addHiddenLayer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;leakyReLU&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;feedForward&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],{&lt;/span&gt;&lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&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;epoch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;e&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;epoch&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="o"&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;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;backpropagate&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;input&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;target&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;countingNN&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;feedForward&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],{&lt;/span&gt;&lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this tutorial, we trained a neural network to count binary integers. We learned how binary numbers worked in order to digitalize them into our neural network. We then learned how to use Dannjs, the new neural network library that just came out, without any prerequisite ML knowledge. Feel free to tweak all the settings you want, experiment, play around, you’ll eventually get a grasp of what affects what. The only source of knowledge is experience.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>🔥 What's Hot in Web Development? — Weekly Picks #162</title>
      <dc:creator>Ido Shamun</dc:creator>
      <pubDate>Wed, 13 Jan 2021 13:26:16 +0000</pubDate>
      <link>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-162-5bj</link>
      <guid>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-162-5bj</guid>
      <description>&lt;p&gt;Every week we gather the best articles on &lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt;.&lt;br&gt;
This week is highly focused on React but not only. You can find in this list awesome cheatsheets. Are you looking for a new job? We got you covered with a post about the current hiring trends. And much more. Shout out to all the authors. 👏&lt;/p&gt;

&lt;p&gt;So, let's get it started.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Learn React in 2021: The 7 Skills You Need To Know
&lt;/h2&gt;

&lt;p&gt;⚛️ An opinionated list of steps towards learning react. It focuses mainly on learning the fundamentals of both the browser and react.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/JIS2qUh9T" rel="noopener noreferrer"&gt;How to Learn React in 2021: The 7 Skills You Need To Know&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FlexBox Cheat Sheets in 2021 || CSS 2021
&lt;/h2&gt;

&lt;p&gt;🧘‍♀️ A CSS flexbox guide with all the different properties explained with beautiful cartoons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/aBGPtqLxt" rel="noopener noreferrer"&gt;FlexBox Cheat Sheets in 2021 || CSS 2021&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My Guide to the 8 Best Dev Tools in 2021
&lt;/h2&gt;

&lt;p&gt;👨‍💻 A list of dev-tools grouped by categories that include frontend, business logic, data, and source control.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/T-XGoNe2J" rel="noopener noreferrer"&gt;My Guide to the 8 Best Dev Tools in 2021&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Smart Developers Don't Code
&lt;/h2&gt;

&lt;p&gt;🐫 A well-written introduction to Apache Camel and CamelK. They will help you build quickly enterprise integrations on top of Kubernetes and JVM.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/jmQhe3ALU" rel="noopener noreferrer"&gt;Smart Developers Don't Code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Coolest 25+ Web Design Trends In 2021, that'll rock the world
&lt;/h2&gt;

&lt;p&gt;🔥 If you are into web design, check out this comprehensive list of design trends. You might find it useful.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/fgG-MTeM6" rel="noopener noreferrer"&gt;Coolest 25+ Web Design Trends In 2021, that'll rock the world&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The React Cheatsheet for 2021 (+ Real-World Examples)
&lt;/h2&gt;

&lt;p&gt;📝 A handbook for react beginners with all the relevant information divided into categories.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/T5kMqsd4q" rel="noopener noreferrer"&gt;The React Cheatsheet for 2021 (+ Real-World Examples)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5 JavaScript Tools to Look Out For in 2021
&lt;/h2&gt;

&lt;p&gt;👀 Although it sounds clickbaity, I found this list very useful. It includes Rollup.js, Snowpack, Rome, esbuild, Waypoint, and some bonus tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/5RKuRiaI6" rel="noopener noreferrer"&gt;5 JavaScript Tools to Look Out For in 2021&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Intro to React Server Side Rendering
&lt;/h2&gt;

&lt;p&gt;🤖 Usually, when we want to develop a react SSR application we will use Next.js. But have you wondered how to build an SSR application from scratch? Check out this excellent article.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/qNIqtZWFO" rel="noopener noreferrer"&gt;Intro to React Server Side Rendering&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The most valuable software developer skills to get hired now
&lt;/h2&gt;

&lt;p&gt;👨‍💼 A review of the current trends in hiring. It covers the request and demand for different skills and programming languages.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/L4JSn_oOA" rel="noopener noreferrer"&gt;The most valuable software developer skills to get hired now&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5 reasons to start using TailwindCSS
&lt;/h2&gt;

&lt;p&gt;🎨 If you're searching for a new CSS framework, read this article. It will surely motivate you to try out TailwindCSS.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/f5dKLFnMh" rel="noopener noreferrer"&gt;5 reasons to start using TailwindCSS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🙌 Wrap Up!
&lt;/h2&gt;

&lt;p&gt;That was all for this week. We will come back with another list of interesting development posts next week.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>css</category>
      <category>design</category>
    </item>
    <item>
      <title>Why we started The Monthly Dev</title>
      <dc:creator>Nimrod Kramer</dc:creator>
      <pubDate>Mon, 11 Jan 2021 07:07:35 +0000</pubDate>
      <link>https://forem.com/dailydotdev/why-we-started-the-monthly-dev-o8</link>
      <guid>https://forem.com/dailydotdev/why-we-started-the-monthly-dev-o8</guid>
      <description>&lt;h1&gt;
  
  
  Short background
&lt;/h1&gt;

&lt;p&gt;Last week we launched a new series of online events by &lt;a href="https://daily.dev" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; called &lt;a href="https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193" rel="noopener noreferrer"&gt;&lt;strong&gt;The Monthly Dev&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;That might seem a bit strange for some people. We already got some curious questions from our community about this initiative like:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Why would a developer tool like daily.dev that is completely automated start running online events?&lt;/li&gt;
&lt;li&gt;How does The Monthly Dev is integrated into the daily.dev strategy?&lt;/li&gt;
&lt;li&gt;What do you expect to achieve from The Monthly Dev?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All are great questions, and therefore I decided to write about them :)&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;We took some inspiration from TED. We thought, what if we can make "TED for developers"? That would be super cool and refreshing! We wanted to bring a monthly series of online events but with a different vibe.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Our mission
&lt;/h1&gt;

&lt;p&gt;The amount of content that is being created every day is insane. We think that by now, it has already gotten out of control. daily.dev aims to make it super easy and simple for developers to stay updated on the latest programming news. That's why we wake up energized every morning. ⭐️&lt;/p&gt;

&lt;h1&gt;
  
  
  Consistency is key
&lt;/h1&gt;

&lt;p&gt;We believe that besides having a tool like daily.dev to help you stay updated consistently, &lt;strong&gt;we should encourage other consistent behaviors&lt;/strong&gt;. Staying updated can be done on a daily, weekly, monthly, and even yearly basis. All are different resolutions for the same habit that can make us better at what we do.&lt;/p&gt;

&lt;p&gt;As of today, we mostly focus on staying updated daily. That is still our main focus at daily.dev. However, we want to explore a new area of monthly updates. That's is why we started The Month Dev.&lt;/p&gt;

&lt;h1&gt;
  
  
  What's unique about The Monthly Dev?
&lt;/h1&gt;

&lt;p&gt;For a while, we observed what kind of online events are being held worldwide. We wondered what's missing and how can we take it to the next level? We still don't have the final answer, but we saw that there's a lack of consistency once again. &lt;/p&gt;

&lt;p&gt;There are many events out there, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not many of them are worth the while. Either poorly organized or not professional enough. Good events are hard to spot.&lt;/li&gt;
&lt;li&gt;It's hard to know in advance if an event is going to be good or not. By the time we realized the answer, it's already too late. &lt;/li&gt;
&lt;li&gt;In many cases, the best events are biased and over-promotional. Usually, those events are organized by some of the tech giants who want to push their tech to the market. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Therefore, we wanted to see if we can create a recurring event that would be great, non-biased, and consistent. That way, developers would finally have a monthly thing they can trust to provide them with the inspiration they want without caring about all the hassle mentioned above. &lt;/p&gt;

&lt;h1&gt;
  
  
  The Monthly Dev's DNA
&lt;/h1&gt;

&lt;p&gt;We took some inspiration from TED. We thought, what if we can make "TED for developers"? That would be super cool and refreshing! We wanted to bring a monthly series of online events but with a different vibe. &lt;/p&gt;

&lt;p&gt;Although we still look at it as an experiment, we decided on several guidelines for our events:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It will feature only &lt;strong&gt;world-class speakers&lt;/strong&gt; that come with &lt;strong&gt;massive credentials&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It will be &lt;strong&gt;free&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It will be &lt;strong&gt;open to everyone&lt;/strong&gt;. No matter if you're using daily.dev or not&lt;/li&gt;
&lt;li&gt;It will be &lt;strong&gt;fun&lt;/strong&gt; and &lt;strong&gt;full of surprises&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  See you there?
&lt;/h1&gt;

&lt;p&gt;Our first event will be held on January 26, 10 AM PST. It will be live-streamed so that you can watch it from your favorite streaming platform. &lt;/p&gt;

&lt;p&gt;It's entirely free for everyone, but we do appreciate it if you can RSVP in advance 🌈 It would help us make better preparations for the event. 🤗&lt;/p&gt;

&lt;p&gt;Here's the link to RSVP: &lt;a href="https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193" rel="noopener noreferrer"&gt;https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193&lt;/a&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>javascript</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>🔥 What's Hot in Web Development? — Weekly Picks #161</title>
      <dc:creator>Ido Shamun</dc:creator>
      <pubDate>Wed, 06 Jan 2021 13:25:46 +0000</pubDate>
      <link>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-161-oon</link>
      <guid>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-161-oon</guid>
      <description>&lt;p&gt;🌟 This week we have many excellent walkthroughs. Short articles that aim to give you enough knowledge to solve a specific task. But that's not all, check out this awesome list.&lt;br&gt;
As always, all posts were ranked by &lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; community. Shout out to all the authors. 👏&lt;/p&gt;

&lt;p&gt;So, let's get it started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design v18
&lt;/h2&gt;

&lt;p&gt;😱 CSS-Tricks features a new design! Chris shares the story of the redesign including all the nitty-gritty.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/9VMYxcu9S" rel="noopener noreferrer"&gt;Design v18&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Design a Web Application - A Guideline on Software Architecture
&lt;/h2&gt;

&lt;p&gt;👷‍♂️ A comprehensive review of software architecture patterns and when to use them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/a2w8fy5Wt" rel="noopener noreferrer"&gt;How to Design a Web Application - A Guideline on Software Architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I built my own productivity app
&lt;/h2&gt;

&lt;p&gt;🚀 The author explains what it takes to build your own product at a high level. It's a short article.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/xoYPTEpJV" rel="noopener noreferrer"&gt;How I built my own productivity app&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A list of actually useful Nocode tools and I am not talking about site builders
&lt;/h2&gt;

&lt;p&gt;🙅‍♀️ No-code or low-code platforms can be very useful even for developers. Usually, you will have to sacrifice flexibility for agility. Here's a curated list of brilliant tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/rAVGmRscc" rel="noopener noreferrer"&gt;A list of actually useful Nocode tools and I am not talking about site builders&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating Browser Notification in JavaScript
&lt;/h2&gt;

&lt;p&gt;💬 Here's a quick walkthrough for implementing browser notifications. It covers not only displaying the notifications but other aspects such as asking for permissions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/GUmbswnlN" rel="noopener noreferrer"&gt;Creating Browser Notification in JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Make Your Own Tools
&lt;/h2&gt;

&lt;p&gt;⚙️ It's Chris's second article this week! Chris motivates us to spend some time on building internal tooling. He also gives some examples.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/USNB3f_Vk" rel="noopener noreferrer"&gt;Make Your Own Tools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Rules of Micro-Frontends
&lt;/h2&gt;

&lt;p&gt;👮‍♂️ An opinionated list of guidelines to build micro-frontends. The list covers aspects such as deployment, testing, code management, and more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/9hTsyZY_u" rel="noopener noreferrer"&gt;Rules of Micro-Frontends&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Make a Side Navigation Bar in ReactJS
&lt;/h2&gt;

&lt;p&gt;🧭 A tutorial for creating a sidebar using React from scratch! This includes even the create-react-app step. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/FkMhWKqUj" rel="noopener noreferrer"&gt;How to Make a Side Navigation Bar in ReactJS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Practical Introduction To Dependency Injection
&lt;/h2&gt;

&lt;p&gt;💉 The first part of a series that provides a practical introduction to Dependency Injection.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/5iWObjxCP" rel="noopener noreferrer"&gt;A Practical Introduction To Dependency Injection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Verify Users in Express.js
&lt;/h2&gt;

&lt;p&gt;🤖 Email verification is a necessary step in almost every login system. This article walks you through implementing an email verification system using Node.js and MongoDB.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/_x8YxDBGv" rel="noopener noreferrer"&gt;How to Verify Users in Express.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🙌 Wrap Up!
&lt;/h2&gt;

&lt;p&gt;That was all for this week. We will come back with another list of interesting development posts next week.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Web Vitals Optimizations: Advanced Dynamic Import Patterns</title>
      <dc:creator>Ido Shamun</dc:creator>
      <pubDate>Tue, 05 Jan 2021 15:36:00 +0000</pubDate>
      <link>https://forem.com/dailydotdev/web-vitals-optimizations-advanced-dynamic-import-patterns-1hg5</link>
      <guid>https://forem.com/dailydotdev/web-vitals-optimizations-advanced-dynamic-import-patterns-1hg5</guid>
      <description>&lt;p&gt;Web performance is a crucial part of the user experience of our web application. It has a direct impact on the conversion rate. Walmart found that for every 1-second improvement in page load time, conversions increased by 2% (&lt;a href="https://www.cloudflare.com/learning/performance/more/website-performance-conversion-rates/" rel="noopener noreferrer"&gt;see source&lt;/a&gt;). And if that's not enough, search engines favor fast websites. They rank them higher than slow websites. So improving your web application's performance can increase both the conversion rate and the organic customer acquisition rate. &lt;/p&gt;

&lt;h1&gt;
  
  
  Web Vitals
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://web.dev/learn-web-vitals/" rel="noopener noreferrer"&gt;Web Vitals&lt;/a&gt; (coined by the Chrome team) are a set of metrics to measure the performance of a website. Optimizing for these metrics ensures your visitors will enjoy a much better experience.&lt;br&gt;
Core Web Vitals are a subset of the aforementioned Web Vitals that is relevant to any web page. The subset focuses on three performance aspects, loading, interactivity, and visual stability. In this article, we will focus on improving two of them, loading and interactivity. They're represented by these two metrics, Largest Contentful Paint (LCP) and First Input Delay (FID). There are many strategies to improve these metrics, but we'll focus on reducing the bundle size. &lt;/p&gt;
&lt;h1&gt;
  
  
  Bundle size
&lt;/h1&gt;

&lt;p&gt;The page bundle size significantly affects both LCP and FID. Both server-side-rendered applications and single-page-applications can end-up with bloated JavaScript bundles. The bigger the bundle, the more time it takes to download the bundle, parse the code into actionable machine commands, and eventually evaluate it. As long as the main thread is focused on any of these, it cannot do anything else, which increases LCP and FID. Addy Osmani wrote an extensive article about &lt;a href="https://v8.dev/blog/cost-of-javascript-2019" rel="noopener noreferrer"&gt;the cost of JavaScript&lt;/a&gt; if you fancy going deeper.&lt;br&gt;
Even if we apply best practices such as tree shaking and code splitting in our project, the bundle can become huge. So what should we do? Dynamic import and loading prioritization!&lt;/p&gt;
&lt;h1&gt;
  
  
  Dynamic import
&lt;/h1&gt;

&lt;p&gt;Not many know, but there are two forms of import we can use, static and dynamic. A static import is a well-known form and is our default choice. It looks like &lt;code&gt;import defaultExport from "module-name";&lt;/code&gt; and it tells the bundler (e.g., Webpack) that this module is mandatory to run our code. The bundler will bundle the module code with our code into a single JavaScript file. The more modules we statically import, the bigger the bundle will be. But obviously, not all imports are the same. Some are required to run our code immediately, and some can be lazy-loaded until a certain event occurs. So why do we have to load all this JavaScript at once? We don't. We can use dynamic import. Dynamic import looks like a regular function call and returns a promise that resolves to the imported module, &lt;code&gt;import("module-name").then((module) =&amp;gt; ...);&lt;/code&gt;. Using dynamic import, we tell the bundler to create a separate bundle for this module and load it in runtime. This makes sure the imported module will not be bundled in our main bundle, keeping the main bundle small and efficient. &lt;a href="https://reactjs.org/docs/code-splitting.html" rel="noopener noreferrer"&gt;React lazy&lt;/a&gt; and &lt;a href="https://nextjs.org/docs/advanced-features/dynamic-import" rel="noopener noreferrer"&gt;Next.js dynamic&lt;/a&gt; utilize dynamic import to lazy-load React components easily. They are both a function that receives a function as an argument and returns a React component. The function argument must return a promise that resolves into a React component by itself. Here's an example: &lt;code&gt;const DynamicComponent = dynamic(() =&amp;gt; import('./component'))&lt;/code&gt;. Of course, both React lazy and Next.js dynamic provide you a way to handle errors and show a fallback element while the component is loading (out of scope). So now we have two levels of import. The first is a static import, which bundles the module into our bundle. The second is a dynamic import, which imports the module as soon as requested as a separate bundle. This should boost our performance, but we can take it even further and load some JavaScript bundles only after the page is completely loaded.&lt;/p&gt;
&lt;h1&gt;
  
  
  Import after page load
&lt;/h1&gt;

&lt;p&gt;In this section, we will see how we can use React lazy and Next.js dynamic to create a new function that imports a component only after the page is loaded. For simplicity's sake, I'll show how to implement it with Next.js, but the same concept can be easily applied to React lazy or even other frameworks such as Vue.&lt;/p&gt;

&lt;p&gt;Let's first create a function that returns a promise that resolves once the page is loaded. A page loading process consists of three phases, loading, interactive, and completed. The function receives an argument that states at what phase we should load the resource. We use the &lt;code&gt;readystatechange&lt;/code&gt; event to listen to changes in the loading process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;onPageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;readyState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DocumentReadyState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;interactive&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="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;void&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;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&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="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readyState&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;readyState&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;readyState&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;complete&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;return&lt;/span&gt; &lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&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;callback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ProgressEvent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Document&lt;/span&gt;&lt;span class="o"&gt;&amp;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="k"&gt;if &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;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readyState&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;readyState&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;readyState&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;complete&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="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;readystatechange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;resolve&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="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&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;readystatechange&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;callback&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;Our &lt;code&gt;onPageLoad&lt;/code&gt; function first returns a promise as planned. In the promise, we check for the current ready state of the document. It's an important edge case that we have to deal with; otherwise, the promise might never resolve. If the page is already loaded, we resolve the promise. Second, we create a callback function for the event listener and subscribe to the &lt;code&gt;readystatechange&lt;/code&gt; event. In the callback, we check the new ready state of the document. If it equals the requested state or if the document is completely loaded, we can resolve the promise and unsubscribe.&lt;/p&gt;

&lt;p&gt;This was the heavy lifting, and now the only thing that remained to do is to create our new dynamic function that will load the component on page load.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;dynamic&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;next/dynamic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;onPageLoad&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./onPageLoad&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;dynamicPageLoad&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;P&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;loader&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="nx"&gt;LoaderComponent&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;P&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;readyState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DocumentReadyState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;interactive&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;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ComponentType&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;P&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;return&lt;/span&gt; &lt;span class="nx"&gt;dynamic&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;P&lt;/span&gt;&lt;span class="o"&gt;&amp;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="nf"&gt;onPageLoad&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;readyState&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;ssr&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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;Like Next.js dynamic function, we receive a loader function that returns a promise with a React component and an optional ready state to prioritize the loading. In the function, we use the good-old dynamic function, but before providing the loader function, we chain it to the &lt;code&gt;onPageLoad&lt;/code&gt; function that we created earlier. This makes sure the import statement will not be called before the page is loaded. The second parameter to the dynamic function disabled evaluating this expression in the server. This is required because we use the document object, which is available only to the client.&lt;/p&gt;

&lt;p&gt;We can use our function to make sure our components will be imported after the page load as follows:&lt;br&gt;
&lt;code&gt;const DynamicComponent = dynamicPageLoad(() =&amp;gt; import('./component'))&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, a lot of JavaScript code can be downloaded, parsed, and evaluated only after our page is loaded. It makes sure the main thread will have more time for critical resources, thus improving our LCP and FID metrics.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Good web performance can improve our conversion rate and SEO. One of the ways to improve performance is to reduce the initial bundle size. By utilizing dynamic import, we can lazy-load JavaScript modules, which shrinks the initial bundle size. We also learned how to prioritize dynamic imports by loading some of the modules only after the page is loaded using our custom dynamic function.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>react</category>
      <category>performance</category>
    </item>
    <item>
      <title>The Monthly Dev: World-Class talks free for everyone</title>
      <dc:creator>Nimrod Kramer</dc:creator>
      <pubDate>Mon, 04 Jan 2021 08:27:46 +0000</pubDate>
      <link>https://forem.com/dailydotdev/the-monthly-dev-world-class-talks-free-for-everyone-3el7</link>
      <guid>https://forem.com/dailydotdev/the-monthly-dev-world-class-talks-free-for-everyone-3el7</guid>
      <description>&lt;p&gt;After long weeks of hard work, we're excited to introduce you to our new series of monthly events. We call it The Monthly Dev 🌈&lt;/p&gt;

&lt;h1&gt;
  
  
  What's The Monthly Dev?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193" rel="noopener noreferrer"&gt;The Monthly Dev&lt;/a&gt; (TMD) is a series of online events brought to you by &lt;a href="https://daily.dev" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt;. TMD is where we bring world-class speakers to empower the developers' community, once a month. Our events will cover hot topics that developers love such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web performance&lt;/li&gt;
&lt;li&gt;New libraries and frameworks&lt;/li&gt;
&lt;li&gt;Job interviews&lt;/li&gt;
&lt;li&gt;And more...&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Here's a &lt;a href="https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193" rel="noopener noreferrer"&gt;link to the first event&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Expert speakers
&lt;/h1&gt;

&lt;p&gt;We aim to bring &lt;strong&gt;world-class speakers&lt;/strong&gt; to empower our developers' community. The events are &lt;strong&gt;open&lt;/strong&gt; and &lt;strong&gt;entirely free&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx0aqbe4o2msnawax7t1y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx0aqbe4o2msnawax7t1y.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A RedwoodJS Getting Started Guide
&lt;/h2&gt;

&lt;p&gt;Talk by &lt;a href="https://twitter.com/thedavidprice" rel="noopener noreferrer"&gt;David S. Price&lt;/a&gt; - Co-Founder at RedwoodJS&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqznhlwg2qlyav5tdrls2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqznhlwg2qlyav5tdrls2.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redwoodjs.com/" rel="noopener noreferrer"&gt;RedwoodJS&lt;/a&gt; is a full-stack, edge-ready framework built on React and GraphQL. Out of the box, it comes with code generators, first-class serverless deploy support, and tight integration between the frontend and backend. In this presentation, David will discuss the design and architecture choices that make Redwood so powerful. He'll then demo several features that highlight Redwood's delightful user experience. By the end, you'll have both the knowledge and inspiration to start your journey with Redwood.&lt;/p&gt;

&lt;h2&gt;
  
  
  Navigating the Technical Interview
&lt;/h2&gt;

&lt;p&gt;Talk by &lt;a href="https://twitter.com/samccone" rel="noopener noreferrer"&gt;Sam Saccone&lt;/a&gt; - Staff Software Engineer at Google&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh8whovil097xrpy4rdjh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh8whovil097xrpy4rdjh.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Technical interviews are fraught with ambiguity and unknowns, join Sam as he shares his learnings and recommendations on how to handle these unknowns and successfully tackle the tech interview process.&lt;/p&gt;

&lt;h2&gt;
  
  
  RxJS &amp;amp; Reactive Programming Fundamentals
&lt;/h2&gt;

&lt;p&gt;Talk by &lt;a href="https://twitter.com/BenLesh" rel="noopener noreferrer"&gt;Ben Lesh&lt;/a&gt; - Software Engineer at Citadel &amp;amp; Author of RxJS&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Folh0qgvggi27b25l9p87.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Folh0qgvggi27b25l9p87.jpg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://rxjs.dev/guide/overview" rel="noopener noreferrer"&gt;RxJS&lt;/a&gt; is one of the hottest libraries in web development today. We will walk through understanding reactive programming, the components of RxJS, common operators and Observables, and how to create an Observable from scratch.&lt;/p&gt;

&lt;h1&gt;
  
  
  Schedule
&lt;/h1&gt;

&lt;p&gt;The event will be live-streamed on January 26, 10 AM PST. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Opening Remarks by Ido Shamun (Co-Founder, CTO at daily.dev)&lt;/li&gt;
&lt;li&gt;A RedwoodJS Getting Started Guide by David S. Price (Co-Founder at RedwoodJS)&lt;/li&gt;
&lt;li&gt;Navigating the Technical Interview by Sam Saccone (Staff Software Engineer at Google)&lt;/li&gt;
&lt;li&gt;RxJS &amp;amp; Reactive Programming Fundamentals by Ben Lesh (Software Engineer at Citadel &amp;amp; Author of RxJS)&lt;/li&gt;
&lt;li&gt;Cool surprise&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The event will be held in English.&lt;/p&gt;

&lt;h1&gt;
  
  
  See you there!
&lt;/h1&gt;

&lt;p&gt;Here's the link again, in case you've missed it:&lt;br&gt;
&lt;a href="https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193" rel="noopener noreferrer"&gt;https://www.eventbrite.com/e/the-monthly-dev-1-by-dailydev-registration-133820993193&lt;/a&gt;&lt;/p&gt;

</description>
      <category>eventsinyourcity</category>
      <category>startup</category>
      <category>javascript</category>
      <category>career</category>
    </item>
    <item>
      <title>🔥 What's Hot in Web Development? — Weekly Picks #160</title>
      <dc:creator>Ido Shamun</dc:creator>
      <pubDate>Wed, 30 Dec 2020 13:00:00 +0000</pubDate>
      <link>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-160-2kik</link>
      <guid>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-160-2kik</guid>
      <description>&lt;p&gt;Every week we publish the top 10 popular posts on &lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Shout out to all the authors 👏&lt;/p&gt;

&lt;h2&gt;
  
  
  Thanos.js Tutorial – Restore Balance to your Project
&lt;/h2&gt;

&lt;p&gt;🧤 Would you like to randomly delete half of your files? If so, give Thanos.js a go.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/HRW98nFO8" rel="noopener noreferrer"&gt;Thanos.js Tutorial – Restore Balance to your Project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  We rendered a million web pages to find out what makes the web slow
&lt;/h2&gt;

&lt;p&gt;🤯 The author rendered 1M pages and tracked every possible metric and information such as errors, protocols, libraries, and performance metrics. He crunched the numbers and share the insights in this article. By the way, it's also available on Kaggle.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/aoJaLoVOi" rel="noopener noreferrer"&gt;We rendered a million web pages to find out what makes the web slow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  React Server Components
&lt;/h2&gt;

&lt;p&gt;🔥 The React team has recently previewed a new concept called React Server Components. Everyone seems super excited about it. Read Addy Osmani's introduction.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/Jd-UX_FA4" rel="noopener noreferrer"&gt;React Server Components&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Public APIs - Find a public API for your next project
&lt;/h2&gt;

&lt;p&gt;🕵️‍♀️ The title already says it all. If you look for an API this is the place.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/Q8dp2d1F9" rel="noopener noreferrer"&gt;Public APIs - Find a public API for your next project&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2 months of Learning React.js and The project I worked on
&lt;/h2&gt;

&lt;p&gt;👨‍🎓 The author shares his takeaways from learning React. He did some online courses and went over freeCodeCamp. Check out what he has to say.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/A4HmYW7Hb" rel="noopener noreferrer"&gt;2 months of Learning React.js and The project I worked on&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  My Advice to New Programmers After Coding for the Last 3 Years
&lt;/h2&gt;

&lt;p&gt;🐣 This is a guest post on our blog that got a lot of attention from the community. Fahad shares some insights for codenewbies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/l8vEE_3lV" rel="noopener noreferrer"&gt;My Advice to New Programmers After Coding for the Last 3 Years&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  HTML tags every frontend developer should know
&lt;/h2&gt;

&lt;p&gt;🤓 Semantic HTML is important for the accessibility and readability of your code. Knowing as many HTML elements as possible, otherwise, we will fall back to our default choice div.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/qIsvggf4P" rel="noopener noreferrer"&gt;HTML tags every frontend developer should know&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Continuous Performance Analysis with Lighthouse CI and GitHub Actions
&lt;/h2&gt;

&lt;p&gt;🚀 An excellent walkthrough to set up a performance analysis for every commit. This makes it so much easier to find performance bottlenecks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/wDy12l5xb" rel="noopener noreferrer"&gt;Continuous Performance Analysis with Lighthouse CI and GitHub Actions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  React Best Practices with Kent Dodds (Repeat)
&lt;/h2&gt;

&lt;p&gt;🥇 Kent shares his React best practices in a podcast. There's also a transcript for those of you, like me, who don't like podcasts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/C5ksxFOrr" rel="noopener noreferrer"&gt;React Best Practices with Kent Dodds (Repeat)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Build a Chat Room With Node.js and Socket.io
&lt;/h2&gt;

&lt;p&gt;💬 Learn about WebSocket and how to build a real-time application that includes a server and a client.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/7FKYoWbSc" rel="noopener noreferrer"&gt;Build a Chat Room With Node.js and Socket.io&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🙌 Wrap Up!
&lt;/h2&gt;

&lt;p&gt;That was all for this week. We will come back with another list of interesting development posts next week.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to Add Preloader to Image in Flutter</title>
      <dc:creator>0xAirdropfarmer</dc:creator>
      <pubDate>Thu, 24 Dec 2020 13:05:24 +0000</pubDate>
      <link>https://forem.com/dailydotdev/how-to-add-preloader-to-image-in-flutter-45h5</link>
      <guid>https://forem.com/dailydotdev/how-to-add-preloader-to-image-in-flutter-45h5</guid>
      <description>&lt;p&gt;Flutter is a cross-platform mobile application development framework that offers a widget-based mechanism to implement the pixel-perfect UI. Creating a state of the art apps with beautiful UI is a challenge for every mobile app developer. And, Flutter has made it easier and simple. However, with great UI comes the value of user experience as well. It is necessary to have a sustainable user experience along with a great UI. Hence, this tutorial will help learn a small aspect of optimizing the user experience by showing the loading effect (termed as pre-loaders, placeholders) before the actual data loads.&lt;/p&gt;

&lt;p&gt;The preloaders become necessary for the user to experience the data is still loading or being fetched from the server. Until the actual data is fetched from the server and displayed on the screen, the pre-loaders will help users understand what actually is going on. The displaying of preloaders indicates that the actual data has still not loaded due to some reasons such as slow network, app errors, etc. Thus, optimizing the overall user experience. Hence, the pre-loaders are necessary for any mobile applications as well as websites. And here, we are going to learn just that on how to add image pre-loaders before the actual image loads in a Flutter app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create new Flutter project
&lt;/h3&gt;

&lt;p&gt;First, we need to create a new Flutter project. For that, make sure that the &lt;a href="https://flutter.dev/docs/get-started/install"&gt;Flutter SDK&lt;/a&gt; and other flutter app development related requirements are properly installed. If everything is properly set up, then in order to create a project, we can simply run the following command in the desired local directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter create imagePreloader
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the project has been set up, we can navigate inside the project directory and execute the following command in the terminal to run the project in either an available emulator or an actual device:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After successfully build, we will get the following result on the emulator screen:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fethv0d5c1v6ka6qb7opb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fethv0d5c1v6ka6qb7opb.jpg" alt="Alt Text" width="325" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Home Screen
&lt;/h3&gt;

&lt;p&gt;Since we have our flutter app up and running in the emulator, we can now move to create screens. For that, we need to create a directory called &lt;strong&gt;./screens&lt;/strong&gt; inside the &lt;strong&gt;./lib&lt;/strong&gt; directory of our project. Inside the &lt;strong&gt;./screens&lt;/strong&gt; directory, we need to create a new dart file called &lt;strong&gt;Home.dart&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Home.dart&lt;/strong&gt;, we are going to create a stateful widget to show the image as well as the preloaders. But first, we are going to show a simple App bar by returning a &lt;code&gt;Scaffold&lt;/code&gt; widget as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:flutter/foundation.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:flutter/material.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:ui'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HomePage&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatefulWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;HomePage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="n"&gt;Key&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;key:&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;_MyHomePageState&lt;/span&gt; &lt;span class="n"&gt;createState&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;_MyHomePageState&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;_MyHomePageState&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;HomePage&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;initState&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;initState&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;appBar:&lt;/span&gt; &lt;span class="n"&gt;AppBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nl"&gt;backgroundColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;centerTitle:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="s"&gt;"Image"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nl"&gt;style:&lt;/span&gt; &lt;span class="n"&gt;TextStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;black87&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;fontFamily:&lt;/span&gt; &lt;span class="s"&gt;'Overpass'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;fontSize:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nl"&gt;elevation:&lt;/span&gt; &lt;span class="mf"&gt;0.0&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nl"&gt;backgroundColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;Container&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;p&gt;Here, we have added an App bar using &lt;code&gt;AppBar&lt;/code&gt; widget in the &lt;code&gt;Scaffold&lt;/code&gt; widget. The body property returns an empty &lt;code&gt;Container&lt;/code&gt; widget. &lt;/p&gt;

&lt;p&gt;Now, we need to import the Home.dart file in main.dart and replace the default widget with &lt;code&gt;HomePage&lt;/code&gt; widget as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:flutter/material.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:imagePreloader/screens/Home.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;runApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MyApp&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyApp&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatelessWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// This widget is the root of your application.&lt;/span&gt;
  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;MaterialApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="s"&gt;'Flutter Demo'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;theme:&lt;/span&gt; &lt;span class="n"&gt;ThemeData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;primarySwatch:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;visualDensity:&lt;/span&gt; &lt;span class="n"&gt;VisualDensity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;adaptivePlatformDensity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="nl"&gt;home:&lt;/span&gt; &lt;span class="n"&gt;HomePage&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;p&gt;Hence, we will get the result as shown in the screenshot below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fts24uf8dj3t74rkq144o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fts24uf8dj3t74rkq144o.jpg" alt="Alt Text" width="325" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Image Container to Home Screen
&lt;/h3&gt;

&lt;p&gt;Now, we are going to display an image on the Home screen. For that, we need to fetch a mock image from &lt;a href="http://pexels.com"&gt;pexels&lt;/a&gt; or from anywhere. Then, we need to add the URL path of the image to a List called &lt;code&gt;imagesPath&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Note that, we can directly use this URL but we are pushing the URL from &lt;code&gt;imagesPath&lt;/code&gt; to a new List called &lt;code&gt;imagesList&lt;/code&gt; because we want to show the Pre-loaders before the image loads on the screen. &lt;/p&gt;

&lt;p&gt;The initializations are provided in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;List&lt;/span&gt; &lt;span class="n"&gt;imagesPath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s"&gt;"https://images.pexels.com/photos/2440061/pexels-photo-2440061.jpeg?auto=compress&amp;amp;cs=tinysrgb&amp;amp;dpr=2&amp;amp;h=650&amp;amp;w=940"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;

 &lt;span class="kt"&gt;List&lt;/span&gt; &lt;span class="n"&gt;imagesList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we need to create a function to load the image URL from the &lt;code&gt;imagesPath&lt;/code&gt; list to &lt;code&gt;imagesList&lt;/code&gt; list. &lt;strong&gt;Remember that we are doing this as an alternative to fetching images from the server. Since we are not using a server to fetch the image, we have to devise the logic to load the image URL manually from the code itself.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The implementation of &lt;code&gt;getImages&lt;/code&gt; function is provided in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;getImages&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;imagesList&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;imagesPath&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we need to call the &lt;code&gt;getImages&lt;/code&gt; function inside the &lt;code&gt;initState&lt;/code&gt; method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nd"&gt;@override&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;initState&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;initState&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="n"&gt;getImages&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;This &lt;code&gt;initState&lt;/code&gt; method executes before our main build function executes once we enter the Home screen.&lt;/p&gt;

&lt;p&gt;Now, we are going to create a image view container in the &lt;code&gt;Scaffold&lt;/code&gt; widget body. For that, we can use the code from the following code snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;SingleChildScrollView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Padding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;padding:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;symmetric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;horizontal:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;vertical:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Container&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nl"&gt;margin:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;only&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nl"&gt;width:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nl"&gt;decoration:&lt;/span&gt; &lt;span class="n"&gt;BoxDecoration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;black26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;ClipRRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                  &lt;span class="n"&gt;imagesList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                  &lt;span class="nl"&gt;fit:&lt;/span&gt; &lt;span class="n"&gt;BoxFit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;cover&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="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;Here, we have placed the &lt;code&gt;SingleChildScrollView&lt;/code&gt; widget as a primary parent widget so that the whole body section is scrollable. Then, we have a &lt;code&gt;Padding&lt;/code&gt; widget to apply some paddings which have &lt;code&gt;Container&lt;/code&gt; as a child widget. The &lt;code&gt;Container&lt;/code&gt; widget is configured with some unique properties which provide child widgets as a &lt;code&gt;ClipRRect&lt;/code&gt; widget. The &lt;code&gt;ChipRRect&lt;/code&gt; allows us to clip the edges of its child widget. As its child widget, we have used &lt;a href="http://image.network"&gt;&lt;code&gt;Image.network&lt;/code&gt;&lt;/a&gt; widget to display the image.&lt;/p&gt;

&lt;p&gt;The result is displayed in the screenshot below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd9wjo6ad7ot4r7m4usqm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd9wjo6ad7ot4r7m4usqm.jpg" alt="Alt Text" width="325" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, we have got an image on the screen. Now, it is time to add Pre-loaders.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Shimmering Image Pre-loader
&lt;/h3&gt;

&lt;p&gt;In order to add the image Pre-loader, we are going to make use of the &lt;a href="https://pub.dev/packages/shimmer"&gt;shimmer&lt;/a&gt; package. This package provides an easy way to apply the shimmer effect in the Flutter app. It makes the Pre-loader implementation easy as well as optimizes the user experience. &lt;/p&gt;

&lt;p&gt;First, we need to install the shimmer package. For that, we need to add the shimmer package to &lt;strong&gt;pubspec.yaml&lt;/strong&gt; file as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;flutter&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;sdk&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;flutter&lt;/span&gt;

  &lt;span class="na"&gt;shimmer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;1.1.1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we need to import the package to the Home.dart as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:shimmer/shimmer.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we are going to implement the shimmer preloading effect using the &lt;code&gt;Shimmer&lt;/code&gt; widget provided by the shimmer package. But first, we need to make some configurations so as to show the shimmers perfectly. So, we need to define some constants as shown in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;_loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the &lt;code&gt;_loading&lt;/code&gt; Boolean variable is for the conditional rendering of the Image and Pre-loaders. The offset and time value is configured to the &lt;code&gt;Shimmer&lt;/code&gt; widget to set the time interval till which the pre-loaders need to load. The implementation is provided in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_loading&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
        &lt;span class="n"&gt;Container&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;SafeArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;ListView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;padding:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="nl"&gt;itemCount:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nl"&gt;itemBuilder:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;offset&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;offset&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Padding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                  &lt;span class="nl"&gt;padding:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;symmetric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;horizontal:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;vertical:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Shimmer&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fromColors&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="nl"&gt;highlightColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;white&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="nl"&gt;baseColor:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;grey&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                    &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Container&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                      &lt;span class="nl"&gt;margin:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;only&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                      &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="nl"&gt;width:&lt;/span&gt; &lt;span class="mi"&gt;270&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="nl"&gt;decoration:&lt;/span&gt; &lt;span class="n"&gt;BoxDecoration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                        &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;black26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                        &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&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="nl"&gt;period:&lt;/span&gt; &lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;milliseconds:&lt;/span&gt; &lt;span class="n"&gt;time&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="p"&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;:&lt;/span&gt;
         &lt;span class="n"&gt;SingleChildScrollView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Padding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nl"&gt;padding:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;symmetric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;horizontal:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;vertical:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Container&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;margin:&lt;/span&gt; &lt;span class="n"&gt;EdgeInsets&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;only&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;right&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="nl"&gt;width:&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;350&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="nl"&gt;decoration:&lt;/span&gt; &lt;span class="n"&gt;BoxDecoration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nl"&gt;color:&lt;/span&gt; &lt;span class="n"&gt;Colors&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;black26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;ClipRRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="n"&gt;BorderRadius&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;circular&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
                &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Image&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="n"&gt;imagesList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
                    &lt;span class="nl"&gt;fit:&lt;/span&gt; &lt;span class="n"&gt;BoxFit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;cover&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="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;Here, we show the Pre-loader template in contrast to the Image template using the &lt;code&gt;_loading&lt;/code&gt; value as conditional rendering. We have used the &lt;code&gt;Shimmer&lt;/code&gt; widget inside the &lt;code&gt;ListView&lt;/code&gt; so as to show multiple loaders which can be controlled by setting the &lt;code&gt;itemCount&lt;/code&gt; property. We have used the &lt;code&gt;fromColors&lt;/code&gt; extension provided by the &lt;code&gt;Shimmer&lt;/code&gt; widget with configured &lt;code&gt;highlightColor&lt;/code&gt; and &lt;code&gt;baseColor&lt;/code&gt; properties. We have placed a &lt;code&gt;Container&lt;/code&gt; widget similar to &lt;code&gt;Container&lt;/code&gt; in Image template as a child of &lt;code&gt;Shimmer&lt;/code&gt; in order to display the shimmering effect.&lt;/p&gt;

&lt;p&gt;Now, the above template will create a shimmering pre-loader effect. But, we still need to implement the logic to show the pre-loaders. For that, we are going to use the &lt;code&gt;Timer&lt;/code&gt; function. The &lt;code&gt;Timer&lt;/code&gt; function will help to delay the loading of the image onto the screen and show the pre-loaders until then. First, we need to import the package that provides the &lt;code&gt;Timer&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'dart:async'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now in &lt;code&gt;getImages&lt;/code&gt; function, we use the &lt;code&gt;Timer&lt;/code&gt; to delay the loading of the image and show the shimmer pre-loaders instead. &lt;/p&gt;

&lt;p&gt;In an actual app, we fetch the data from server in which the fetching may take time. Till then, we show some loading effect which improves the overall user experience.&lt;/p&gt;

&lt;p&gt;Since we are not pulling data from the server, we need to manually configure the delay. Hence, the implementation is provided in the code snippet below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;getImages&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;_loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="n"&gt;Timer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Duration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;seconds:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;imagesList&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;imagesPath&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
      &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;_loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&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;p&gt;Now, the final result with shimmering effect Pre-loaders is shown in the demo below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgwvjydma8bjgvuzbh368.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgwvjydma8bjgvuzbh368.gif" alt="Alt Text" width="336" height="690"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can notice a shimmering loading effect just before the image loads on the screen. Likewise, we can display the shimmer effect from any widget element structure of the screens as the child of the &lt;code&gt;Shimmer&lt;/code&gt; widget uses the Flutter widgets itself. Hence, it is flexible enough to be shaped into anything.&lt;/p&gt;

&lt;p&gt;Finally, we have implemented the image Pre-loader in a Flutter app.&lt;/p&gt;

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

&lt;p&gt;As we talk about the importance of pre-loaders in optimizing the user experience, we can see the effect it has on the overall app UI and its usage from the demo above. It makes the overall user experience convenient. These types of pre-loaders are used in every app nowadays. So, users expect pre-loaders to happen. It creates a greater impact in terms of visual and understanding of what is going on. Pre-loaders taking a long time can interpret into problems in internet connectivity or some other type of app errors. This makes the user aware of what actually is happening. Hence, it is an important element to have knowledge of for a developer. &lt;/p&gt;

&lt;p&gt;Now, the challenge is to create the preloaders for different widget elements. Here, we implemented the preloaders for the image element which was simple. But, the pre-loaders using the shimmer package can be shaped into anything as it uses the Flutter widgets itself as a child.&lt;/p&gt;

&lt;p&gt;For more inspirations for beautifully designed pre-loaders, check out some amazing &lt;a href="http://instaflutter.com"&gt;Flutter apps&lt;/a&gt; that have them integrated intuitively.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://api.daily.dev/get?r=devto"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>🔥 What's Hot in Web Development? — Weekly Picks #159</title>
      <dc:creator>Ido Shamun</dc:creator>
      <pubDate>Wed, 23 Dec 2020 13:06:55 +0000</pubDate>
      <link>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-159-57b9</link>
      <guid>https://forem.com/dailydotdev/what-s-hot-in-web-development-weekly-picks-159-57b9</guid>
      <description>&lt;p&gt;Every week we publish the top 10 popular posts on &lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Shout out to all the authors 👏&lt;/p&gt;

&lt;h2&gt;
  
  
  Develop a Food Delivery Application: (It’s Features, Cost, and Functionality)
&lt;/h2&gt;

&lt;p&gt;🍔 This is not a technical article but rather explains what it takes to develop a food delivery application and also shows a comprehensive market analysis.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/WwiTRvAez" rel="noopener noreferrer"&gt;Develop a Food Delivery Application: (It’s Features, Cost, and Functionality)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  100 Days of Code – A Complete Guide For Beginners and Experienced
&lt;/h2&gt;

&lt;p&gt;🐣 When they say "complete" they really mean it. This article presents two roadmaps. One for beginners and the other for experienced. It's very focused and includes all the references you need to get it going.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/xVj_PkJhBa" rel="noopener noreferrer"&gt;100 Days of Code – A Complete Guide For Beginners and Experienced&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Typescript Mistakes To Avoid
&lt;/h2&gt;

&lt;p&gt;🚫 This is a fine list of TypeScript patterns to avoid. Even if you're an experienced developer, I recommend checking out this article.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/Nx66Fcc6P" rel="noopener noreferrer"&gt;Typescript Mistakes To Avoid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to Use the Locomotive Scroll for all Kinds of Scrolling Effects
&lt;/h2&gt;

&lt;p&gt;🤪 Unique scrolling effects can create unforgettable user experiences. This article will get you started with Locomotive Scroll and teach you how to create these unique experiences. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/e1SCuzMxp" rel="noopener noreferrer"&gt;How to Use the Locomotive Scroll for all Kinds of Scrolling Effects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Easily Code For 8+ Hours Without Feeling Tired (My Productivity System)
&lt;/h2&gt;

&lt;p&gt;🥱 Coding for a long time can be tiresome. Nick developed a method to stay sharp during the long days.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/tMKYZcJzm" rel="noopener noreferrer"&gt;How I Easily Code For 8+ Hours Without Feeling Tired (My Productivity System)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;daily.dev&lt;/a&gt; delivers the best programming news every new tab. We will rank hundreds of qualified sources for you so that you can hack the future.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://api.daily.dev/get?r=devto" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb996k4sm4efhietrzups.png" alt="Daily Poster"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Cyberpunk 2077 Inspired Menu in CSS only! Video Tutorial!
&lt;/h2&gt;

&lt;p&gt;👨‍🎤 Cyberpunk 2077 is so hyped right now. This hype made its way to web development with this awesome menu implementation.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/b3KecmDKa" rel="noopener noreferrer"&gt;Cyberpunk 2077 Inspired Menu in CSS only! Video Tutorial!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Centering in CSS
&lt;/h2&gt;

&lt;p&gt;🖼 There are so many ways to center elements using CSS. This article compares them according to five criteria. It's like a stress test for centering techniques.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/9vMkgXn28" rel="noopener noreferrer"&gt;Centering in CSS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Python in Visual Studio Code – December 2020 Release
&lt;/h2&gt;

&lt;p&gt;🐍 A new release to VS Code Python support! They closed 13 issues and explain them in detail in this post.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/dObBbF9vs" rel="noopener noreferrer"&gt;Python in Visual Studio Code – December 2020 Release&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5 Common Mistakes Developers Do that Affect Page Load Time
&lt;/h2&gt;

&lt;p&gt;🚀 Delivering your application fast improves the user experience and conversion rate. These 5 tips will give you a kickstart to what you should optimize.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/gD9nq40ot" rel="noopener noreferrer"&gt;5 Common Mistakes Developers Do that Affect Page Load Time&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5 Big Lies Junior Programmers Are Told
&lt;/h2&gt;

&lt;p&gt;💬 The tech industry is full of myths. This article busts five of them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.daily.dev/posts/h27Pf8llR" rel="noopener noreferrer"&gt;5 Big Lies Junior Programmers Are Told&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🙌 Wrap Up!
&lt;/h2&gt;

&lt;p&gt;That was all for this week. We will come back with another list of interesting development posts next week.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>codenewbie</category>
      <category>typescript</category>
      <category>css</category>
    </item>
  </channel>
</rss>
