<?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: Afees Oduola</title>
    <description>The latest articles on Forem by Afees Oduola (@odudev).</description>
    <link>https://forem.com/odudev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F971176%2F094e318a-f7cb-4e11-8553-b1238314a3f9.jpeg</url>
      <title>Forem: Afees Oduola</title>
      <link>https://forem.com/odudev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/odudev"/>
    <language>en</language>
    <item>
      <title>How to start open-source contribution as a new developer</title>
      <dc:creator>Afees Oduola</dc:creator>
      <pubDate>Tue, 25 Apr 2023 15:26:22 +0000</pubDate>
      <link>https://forem.com/odudev/how-to-start-open-source-contribution-as-a-new-developer-3374</link>
      <guid>https://forem.com/odudev/how-to-start-open-source-contribution-as-a-new-developer-3374</guid>
      <description>&lt;p&gt;One of the ways to collaborate, sharpen your skills, and build your portfolio is through open-source contribution. This article will focus on open-source projects. Open-source projects are publicly available for anyone's use, modifications, and enhancements. These projects can be a code base or documentation. If you are starting your career and wondering how to use your new skills, this article is for you.&lt;/p&gt;

&lt;p&gt;To completely benefit from this article, you must have a basic knowledge of git and GitHub.&lt;/p&gt;

&lt;p&gt;In a few steps, I will take you through how you can start contributing to open-source projects today.&lt;/p&gt;

&lt;h2&gt;
  
  
  Forking the repository
&lt;/h2&gt;

&lt;p&gt;On identifying an open-source project on Github,  fork the repository (repo as often called) by clicking on &lt;code&gt;Fork&lt;/code&gt;. You can only replicate a GitHub repository on your own repo using &lt;code&gt;Fork&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AIUsR4bR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681371739012_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AIUsR4bR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681371739012_image.png" alt="Repository Forking" width="800" height="98"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking &lt;code&gt;Fork&lt;/code&gt;, another page pops up. Click on &lt;code&gt;Create fork&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f11KZ_G9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372126671_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f11KZ_G9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372126671_image.png" alt="Repository Forking" width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You now have that same repo in your list of repositories on GitHub. This is what it looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--psQ_h7FP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372342683_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--psQ_h7FP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372342683_image.png" alt="Repository Forking" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloning the repository
&lt;/h2&gt;

&lt;p&gt;Until now, you only have the project on your remote repository. It’s time to have it on your local machine.&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;Code&lt;/code&gt;, then click the double-square box beside the HTTPS URL to copy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eiXJPv1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372652899_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eiXJPv1p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681372652899_image.png" alt="Repository Cloning" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to any directory where you would like to have this project cloned on your computer, right-click on an empty space on the screen, and click on &lt;code&gt;Git Bash Here&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A command window pops up; type &lt;code&gt;git clone&lt;/code&gt;, then paste the HTTPS URL you copied earlier and click enter.&lt;/p&gt;

&lt;p&gt;Note: You can’t use the keyboard shortcut Ctrl+V to paste the URL; you must right-click and select the paste option&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vRbvppwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681375302632_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vRbvppwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681375302632_image.png" alt="Repository Cloning" width="723" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You must wait for the cloning to complete. This may take up to several minutes, depending on the folder size.  A folder with the repo name will appear in your chosen directory during cloning. Allow the process to complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opening the file in VS code and making contributions
&lt;/h2&gt;

&lt;p&gt;Open the file in VS code. It’s a good practice to always create your own branch while working on an open-source project. By creating your own branch, the project lead will be able to compare your contribution with the &lt;code&gt;main&lt;/code&gt; or &lt;code&gt;master&lt;/code&gt; branch. This practice allows for a cleaner and more reliable open-source collaboration.&lt;/p&gt;

&lt;p&gt;Before working on the project, use the &lt;code&gt;git pull&lt;/code&gt; command to update your local repository. This is to update the local repository in case other contributors have made some changes between the time you fork the repo and the time you want to contribute.&lt;/p&gt;

&lt;p&gt;Create your branch, make contributions, and push to GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Pull request(PR)
&lt;/h2&gt;

&lt;p&gt;On pushing to GitHub, this is what you get:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6bHWtXR_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681377938042_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6bHWtXR_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681377938042_image.png" alt="Pull request" width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on compare &amp;amp; pull request from the previous.&lt;/p&gt;

&lt;p&gt;Alternatively, click on &lt;code&gt;Pull requests&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZTwMmXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681376569571_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZTwMmXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681376569571_image.png" alt="Pull request" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;code&gt;New pull request&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4HvxNM6j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681377287244_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4HvxNM6j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681377287244_image.png" alt="Pull request" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the new line box, type what you did (changes you made). You can also leave some comments. Click on  &lt;code&gt;Create pull request&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rC-NP4Mt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681380437170_image.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rC-NP4Mt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://paper-attachments.dropboxusercontent.com/s_81B69DE75440EF30168B87F193CB92BDC2503EBC42915087196C5843A40A242E_1681380437170_image.png" alt="Pull request" width="717" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;You just learned how to boost your confidence by collaborating and contributing to open-source projects. With your newly acquired skills, you can start contributing to open-source projects. Your contribution can be as little as editing a READ.md file. You can search Google for open-source projects and start contributing today.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>github</category>
      <category>developer</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is Object Reference in JavaScript</title>
      <dc:creator>Afees Oduola</dc:creator>
      <pubDate>Thu, 20 Apr 2023 12:03:56 +0000</pubDate>
      <link>https://forem.com/odudev/what-is-object-reference-in-javascript-43oc</link>
      <guid>https://forem.com/odudev/what-is-object-reference-in-javascript-43oc</guid>
      <description>&lt;p&gt;If you are yet to get a full grasp of object reference in JavaScript, this article will break it down for you. Object are regularly used by developers and thus, its usage needs to be properly understood.&lt;/p&gt;

&lt;h2&gt;
  
  
  Primitive data types
&lt;/h2&gt;

&lt;p&gt;Primitive data types (undefined, null, string, number, boolean and symbol) are usually passed as values. In contrast, objects are passed as reference. This thin difference can have a lot of effect in your code if misused at any point in the code block.&lt;/p&gt;

&lt;p&gt;Let's quickly have a look at how strings are passed for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N1l3kJxF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktumy4y1h0ogjhlpqylx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N1l3kJxF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ktumy4y1h0ogjhlpqylx.png" alt="Primitive values" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the image, the variables &lt;code&gt;fName&lt;/code&gt; and &lt;code&gt;firstName&lt;/code&gt; both consist of a string &lt;code&gt;John&lt;/code&gt;. This also means that &lt;code&gt;fName&lt;/code&gt; and &lt;code&gt;firstName&lt;/code&gt; are equal. Looking at this in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let fName = "John"
let firstName = "John"

console.log (fName === firstName) // true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Therefore, we can conclude that primitive data types are value-based such that if values are equal then the variables will also be equal. We used string as an example in the above code block, you can also try other primitive data types.&lt;/p&gt;

&lt;h2&gt;
  
  
  Object reference
&lt;/h2&gt;

&lt;p&gt;As opposed to primitive data types, objects are reference-based which means that object properties are passed to variables by reference.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YC3HtJmt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pn2ix3lz2x5lt3s7elbo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YC3HtJmt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pn2ix3lz2x5lt3s7elbo.png" alt="Object reference" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The object properties are stored in the computer memory. These properties can only be accessed through a reference. You can view reference as the door to a stored property in the computer memory. From the image, one would think that &lt;code&gt;obj1&lt;/code&gt; should be equal to &lt;code&gt;obj2&lt;/code&gt;. Let's look at this in a code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
           fName : "Doe"
                       }

const obj2 = {
           fName : "Doe"
                        }

console.log (obj1 === obj2) // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code snippet gives a &lt;code&gt;false&lt;/code&gt; boolean result, because the reference to the object properties are different. You can also see this scenario as two persons with the same name "John" with a lot of physical resemblance but they are from different family background (reference).&lt;/p&gt;

&lt;p&gt;If you change the value of &lt;code&gt;obj1&lt;/code&gt;, then you realize that &lt;code&gt;obj2&lt;/code&gt; doesn't change:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
           fName : "Doe"
                        }

const obj2 = {
           fName : "Doe"
                        }

obj1.fName = "Afees"

console.log ( obj1.fName ) // Afees
console.log ( obj2.fName ) // Doe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Object reference copy
&lt;/h2&gt;

&lt;p&gt;If you then go ahead to copy a reference from one variable to another, then you have also copied the object properties.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VlH1K8UN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot7gr83rgdta408m3520.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VlH1K8UN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ot7gr83rgdta408m3520.png" alt="Object reference copy" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
           fName : "Doe"
                        }

const obj2 = obj1  // obj1 reference copied to obj2

console.log (obj1 === obj2) // true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By changing the properties of &lt;code&gt;obj1&lt;/code&gt;, you have also changed the properties of &lt;code&gt;obj2&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
           fName : "Doe"
                       }

obj1.fName = "Afees"

console.log ( obj1.fName ) // Afees
console.log ( obj2.fName ) // Afees
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, variables might be equal or unequal depending on whether they share the same reference or not. However, the properties in the computer memory (if they are the same) will always be equal when compared. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const obj1 = {
           fName : "Doe"
                        }

const obj2 = {
           fName : "Doe"
                         }

console.log ( obj1 === obj2 ) // false
console.log ( obj1.fName === obj2.fName) // true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;In this article, we have been able to explicitly captured the concept of reference and reference copy for JavaScript object. The more you use object in your code, the better your understanding of object reference. Happy coding!!!&lt;/p&gt;

</description>
      <category>object</category>
      <category>javascript</category>
      <category>oop</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
