<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aseer</title>
    <description>The latest articles on DEV Community by Aseer (@electromorphous).</description>
    <link>https://dev.to/electromorphous</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%2F429534%2F27d99209-4bdb-462d-a9db-6bda7fd95cf4.png</url>
      <title>DEV Community: Aseer</title>
      <link>https://dev.to/electromorphous</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/electromorphous"/>
    <language>en</language>
    <item>
      <title>How to Stay Relevant in the Tech World</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Sat, 23 Sep 2023 19:11:20 +0000</pubDate>
      <link>https://dev.to/electromorphous/how-to-stay-relevant-in-the-tech-world-19aj</link>
      <guid>https://dev.to/electromorphous/how-to-stay-relevant-in-the-tech-world-19aj</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;With time, more people are transitioning their careers into tech and more young developers are joining these communities. Although there are plenty of jobs in the tech industry, the competition is increasing day by day. Only in the last 3 years, the changes that the tech world has gone through are hard to overrate.&lt;/p&gt;

&lt;p&gt;It's getting harder for the average dev to keep up with the competition. So I have composed some of my thoughts and opinions on how one can keep up with these changes and not feel overwhelmed by the hundreds of applications on every job post.&lt;/p&gt;




&lt;h2&gt;
  
  
  CSS
&lt;/h2&gt;

&lt;p&gt;From what I've seen, most frontend developers take CSS too lightly and don't spend enough time honing their fundamentals. As a frontend developer, your most important skill by far is going to be that of CSS. Every aspect of frontend relies on your CSS knowledge so you MUST have some experience making pure HTML and CSS pages.&lt;/p&gt;

&lt;p&gt;It doesn't matter if you're taking long tailwind courses or making lots of JavaScript and React projects. As long as your CSS fundamentals aren't strong, you will have a hard time coding any user interface and eventually will turn into spaghetti code. Knowing CSS will set you apart from other frontend developers. It's the trick up the sleeve of every good frontend dev.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tailwind
&lt;/h2&gt;

&lt;p&gt;This one is a bit controversial but if you know CSS you already know 95% of tailwind. If you haven't tried it yet, you probably think that you will never try it. But there's a good reason for its popularity. You will realize it only if you try it yourself a few times.&lt;/p&gt;

&lt;p&gt;The utility classes it provides are so many that it actually ends up reducing a lot of the code for responsiveness and theming. It doesn't give you presets like the other styling frameworks such as Material UI or Bootstrap, but just enough to let you use utility classes while still exercising your creativity as if you were writing CSS.&lt;/p&gt;

&lt;p&gt;That's what makes it different from all other frameworks. It is kind of a middle ground between pure CSS and styling frameworks, just because of the sheer number of classes it provides. And some other helpful things like baseline styles and fonts.&lt;/p&gt;

&lt;p&gt;But still, most apps made with Tailwind's default values tend to look like a "Tailwind app". Just like you can tell when a website is made with Bootstrap, sometimes you can tell when a website is made with Tailwind. So it's not the most ideal framework for really big projects with a lot of custom branding.&lt;/p&gt;

&lt;p&gt;Yes, I know you can change the constants to whatever styles and fonts you like but you can do the same with the other frameworks, so the question now becomes if it's easier to make your components using CSS or libraries like StyledComponents &lt;strong&gt;OR&lt;/strong&gt; using frameworks and then overriding their constants. Depends on your needs.&lt;/p&gt;

&lt;p&gt;The point is you need to get used to Tailwind and its best practices to stay relevant. Even if you don't prefer using it, even if you aren't trying to join companies that use it, knowing these tools shows your drive and passion to stay up-to-date with the trends. It shows your ability to adapt to the community and learn new things on the go. At the end of the day, it doesn't matter what tools you use. Your users only care about the final app and its efficiency, not if you used pure CSS or Tailwind.&lt;/p&gt;




&lt;h2&gt;
  
  
  Angular
&lt;/h2&gt;

&lt;p&gt;Looks like this one isn't going anywhere for a while. Since it is more challenging than React, there are relatively fewer developers learning Angular than React, so you won't have to keep up with as much competition as you would if you were learning React.&lt;/p&gt;

&lt;p&gt;If you just finished building the foundation of HTML, CSS and JavaScript and you're considering getting into React at this point, you should consider going down the road of Angular. The earlier you start this journey the better. Once you have some good experience with Angular and have made some personal projects, it won't be too hard to be noticed and showcase your Angular skills.&lt;/p&gt;

&lt;p&gt;Instead, if you are a React dev these days, you have to apply to jobs that all have hundreds of applications (thousands if remote) and even if you're excellent at React, it's hard to be noticed in this crowd since everyone is claiming to be good at it.&lt;/p&gt;

&lt;p&gt;The way I see it, Angular will always be a safe tool to be an expert at, as it is not favored by a lot of beginners/learners.&lt;/p&gt;




&lt;h2&gt;
  
  
  Backend
&lt;/h2&gt;

&lt;p&gt;Being good at frontend isn't enough anymore. Every good dev knows at least a bit of backend as well. If you want to be relevant, just spinning up a React app and making a good UI is far from enough, thousands of other frontend devs can do that.&lt;/p&gt;

&lt;p&gt;However, being a pure backend dev is a good goal. If you're an expert at things like Node, Express, Nest, Djano, .NET, etc. but you can't make a basic HTML and CSS page for your life, you'll probably never need to. From what I've seen, there is a huge demand for backend experts in the tech industry and there's absolutely no shortage of frontend/React developers. So going down the path of pure backend and DevOps will likely be very beneficial.&lt;/p&gt;

&lt;p&gt;But again, make sure to have a strong foundation and work hard on the fundamentals. Make plenty of projects to showcase your skills that set you apart.&lt;/p&gt;




&lt;h2&gt;
  
  
  Mobile
&lt;/h2&gt;

&lt;p&gt;For those who already are experts at React and want to continue being relevant, learn React Native. It also is a skill that's been very high in demand lately as there is less competition and there aren't a lot of experts in it. But be quick before this skill gets saturated as well.&lt;/p&gt;

&lt;p&gt;Mobile devs are some of the most skilled devs I've seen and all of them have little to no problem getting jobs. The competition for mobile devs has always been lesser compared to web devs so it's wise to be one of them.&lt;/p&gt;

&lt;p&gt;Lately, I've seen a lot of startups and smaller companies wanting cross-platform apps so the demand for React Native devs and Flutter devs is quite a lot. But if you have more time and resources on your hands, invest it into learning Kotlin or Swift and you will be pretty much set for the rest of your life. Make some projects and become an expert at those, you'll be good for a long time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Web Dev
&lt;/h2&gt;

&lt;p&gt;If you wanna continue being a web dev and stay relevant, you have to work on practicing full stack. If all you can do is make a client-side frontend with React (even if it's a really good frontend with best practices for UI/UX) there are a lot of other people who can do that, or who at least claim to do that. It's not nearly enough to make you stand out.&lt;/p&gt;

&lt;p&gt;Start by learning Next.js and while learning that, you will automatically learn database handling and many common backend concepts. Learn about Server Side Rendering and Static Site Generation in detail and learn how and when to implement them properly. Just learning or making notes on this won't be enough, use tools like GraphQL and Gatsby to practice your learning. Make projects and showcase them on your portfolio. Explore the different BaaS tools like Firebase, Supabase, Appwrite, etc.&lt;/p&gt;

&lt;p&gt;After this, you can move on to learning Node.js from the basics and then to creating APIs with backend frameworks. You can also learn different languages like Python and Go to make interesting projects. Anything you learn doesn't go wasted. Unless you never apply your learning and never show it. Don't do that.&lt;/p&gt;




&lt;h2&gt;
  
  
  WebGL
&lt;/h2&gt;

&lt;p&gt;As devices are getting more efficient and cheaper, and as the WebGL libraries are getting more stable with time, it shouldn't come as a surprise that more and more companies are starting to utilize this in their websites and apps. There are more job openings for Three.js developers and Babylon.js developers than there ever were.&lt;/p&gt;

&lt;p&gt;Invest in learning these advanced Computer Graphics tools while their resources and documentation are still undergoing so many additions, and your future self will thank you. Once our devices are powerful enough, WebGL will be more like a basic necessity that is expected from all frontend developers.&lt;/p&gt;




&lt;h2&gt;
  
  
  The End
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;There are surely some more technologies that I can't exactly talk about due to my lack of knowledge. Nevertheless, their industries seem to be growing rapidly. Some examples of these are Blockchain, Web3, Artificial Intelligence and Machine Learning concepts like LLMs, Cloud Technologies and many more.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts in the comments and if there's anything you'd like to add to this list to help out the other devs in this community.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>job</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
    </item>
    <item>
      <title>NPM Error Code 4058 (ENOENT)</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Thu, 14 Sep 2023 17:04:18 +0000</pubDate>
      <link>https://dev.to/electromorphous/npm-error-code-4058-enoent-1fi3</link>
      <guid>https://dev.to/electromorphous/npm-error-code-4058-enoent-1fi3</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;This is a rather common error that devs see from time to time when they try to install or update packages using npm. It can also appear when using npx, something like &lt;code&gt;npx create-react-app&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There could be several reasons for this error, and what worked for others may not work for you.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solutions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/49620780/cant-install-any-npm-package-error-4058" rel="noopener noreferrer"&gt;Here is the stackoverflow page&lt;/a&gt; for the same error. &lt;br&gt;
It suggests some good answers, none of which worked for me. I uninstalled and reinstalled node.js twice before realizing the problem. I just had to update npm to the latest stable version by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g npm@latest 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and it was fixed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alternatives
&lt;/h2&gt;

&lt;p&gt;If that doesn't work for you and none of the other solutions work either, just make sure you have the latest stable version of both node and npm, and verify the environment path variables on your machine. It's a good bet to try reinstalling node at least once to make sure the setup is fine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows" rel="noopener noreferrer"&gt;Follow this page&lt;/a&gt; for properly removing node.js and then making sure it is gone before installing again.&lt;/p&gt;

&lt;p&gt;If you tried all of the above and the issue still persists... well, good luck and let us know what was the issue in your case so others can refer your problem and how you fixed it.&lt;/p&gt;




</description>
      <category>npm</category>
      <category>node</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What Are Persistent Identifiers and Why We Need Them</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Sun, 10 Sep 2023 19:09:18 +0000</pubDate>
      <link>https://dev.to/electromorphous/what-are-persistent-identifiers-and-why-we-need-them-4i0c</link>
      <guid>https://dev.to/electromorphous/what-are-persistent-identifiers-and-why-we-need-them-4i0c</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The concept of Persistent Identifiers is important to understand because it dictates how we store and find intel throughout the internet. It can be anything from the source code of programs to scientific research.&lt;/p&gt;

&lt;p&gt;If we don't set up a fair and efficient system in place to track this information, it may greatly affect what we consume as the truth. Yet, most devs are unaware of this topic. This article will briefly cover all the essentials about PID and where we stand with it as of today.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a PID
&lt;/h2&gt;

&lt;p&gt;A persistent identifier is a long-lasting reference to a digital resource. It is a unique string that provides the information to reliably identify, verify and locate data.&lt;/p&gt;

&lt;p&gt;Without an industry-wide standard identifier, we would not be able to manage transactions and support systems between publishers and clients, which would introduce copyright issues.&lt;/p&gt;

&lt;p&gt;To make your data easy to find, you must provide your data and metadata with a persistent identifier. They are critical for building and maintaining robust links between objects, communities and infrastructures. This is especially critical for having reliable citations in scientific literature.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Brief History of PID
&lt;/h2&gt;

&lt;p&gt;Many of the problems with the internet were due to the function of the URL, which was never meant to be an identifier but only to designate the location of objects. To overcome that difficulty, our primary task has been to design and implement a system based on a persistent identifier that would be assigned to an object when it was created and stay with it throughout its life.&lt;/p&gt;

&lt;p&gt;Below are some implementations of PID.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;People and organizations&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/ORCID" rel="noopener noreferrer"&gt;Open Researcher and Contributor ID&lt;/a&gt; (ORCID)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Research_Organization_Registry" rel="noopener noreferrer"&gt;Research Organization Registry&lt;/a&gt; (ROR)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Publications&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Virtual_International_Authority_File" rel="noopener noreferrer"&gt;Virtual International Authority File&lt;/a&gt; (VIAF)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/International_Standard_Name_Identifier" rel="noopener noreferrer"&gt;International Standard Name Identifier&lt;/a&gt; (ISNI)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/International_Standard_Book_Number" rel="noopener noreferrer"&gt;International Standard Book Number&lt;/a&gt; (ISBN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;Uniform Resource Identifiers&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Archival_Resource_Key" rel="noopener noreferrer"&gt;Archival Resource Key&lt;/a&gt; (ARK)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Digital_Object_Identifier" rel="noopener noreferrer"&gt;Digital Object Identifier&lt;/a&gt; (DOI)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Magnet_link" rel="noopener noreferrer"&gt;Magnet link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Uniform_Resource_Name" rel="noopener noreferrer"&gt;Uniform Resource Names&lt;/a&gt; (URNs)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Extensible_Resource_Identifier" rel="noopener noreferrer"&gt;Extensible Resource Identifiers&lt;/a&gt; (XRIs)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://en.wikipedia.org/wiki/Persistent_Uniform_Resource_Locator" rel="noopener noreferrer"&gt;Persistent Uniform Resource Locators&lt;/a&gt; (PURLs)&lt;/li&gt;
&lt;li&gt;Software Heritage Identifiers (SWHIDs)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;All of the above PID systems were designed to fill specific roles and solve certain problems, but today the most standardized and widely used system is &lt;a href="https://www.doi.org/" rel="noopener noreferrer"&gt;Digital Object Identifier&lt;/a&gt; also known as DOI.&lt;/p&gt;

&lt;p&gt;The DOI System is an application of the Handle System Resolver, originally developed by the &lt;a href="http://www.cnri.reston.va.us/" rel="noopener noreferrer"&gt;Corporation for National Research Initiatives&lt;/a&gt;. As of today, it is run by an organization called &lt;a href="https://www.doi.org/the-foundation/about-us/" rel="noopener noreferrer"&gt;The DOI Foundation&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closer Look on DOI
&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%2Fd6i3sk2pw0rzjj6x7lzp.png" 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%2Fd6i3sk2pw0rzjj6x7lzp.png" alt=" " width="800" height="238"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A DOI consists of two parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A prefix containing the directory designation and the registrant number, both assigned by the Directory Manager.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A suffix that uniquely identifies the particular digital object.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first two characters of the prefix represent the Directory Manager that issued it, and for the time being, all DOIs begin with 10. The second part of the prefix (.1000) defines the organization, publisher, or any rights-owner or controller registrant that purchased the DOI prefix. Everything after the slash is the suffix, a unique character string created by the publisher that defines the specific digital object.&lt;/p&gt;




&lt;h2&gt;
  
  
  How DOI System Operates
&lt;/h2&gt;

&lt;p&gt;The DOI system attaches a persistent identifier to a digital object, thereby providing a label that will define that object for its entire life, independent of where it is located. This identifier is created along with or even before that object itself was created.&lt;/p&gt;

&lt;p&gt;A record of that DOI, along with information on the location of its object, is then sent to &lt;strong&gt;a central server&lt;/strong&gt; where the DOI data are stored. Once a DOI is registered in the DOI System server, or repository, it will be stored there virtually forever. That centrally stored data forms a &lt;strong&gt;resolver database&lt;/strong&gt; that can link or &lt;em&gt;resolve&lt;/em&gt; a DOI to its object's location.&lt;/p&gt;

&lt;p&gt;When a user asks for a digital object (say a journal), a DOI query goes to the DOI server. That server finds the record of the DOI and the address of its object, links the two together and sends the location (most likely the URL) back to the user's browser. Now the browser can retrieve the object and show it to the user. This increases the chance of retrieval significantly in environments where URLs change a lot.&lt;/p&gt;

&lt;p&gt;The objects reside in databases controlled and maintained by the publishers. When an object's location changes for any reason, information about that is sent by the object's owner to the central server, which automatically updates the record.&lt;/p&gt;

&lt;p&gt;As long as the Foundation gives authority for issuing and updating DOIs only to those who will be conscientious about keeping their data up to date, the central database should retain a high degree of integrity.&lt;/p&gt;




&lt;h2&gt;
  
  
  DOI as a Persistent Identifier
&lt;/h2&gt;

&lt;p&gt;We have seen that the DOI System provides a viable means of identifying online objects with infinite persistence across a variety of publishers. However, if too many small or mid-sized publishers are allowed to participate in the DOI System, such as libraries, the system may ultimately collapse through the accumulation of DOIs for objects that have been destroyed.&lt;/p&gt;

&lt;p&gt;On the other hand, should such publishers not be allowed to participate in the DOI System, they will likely be forced to create other similar systems with many of the same features, and manage these systems themselves to guarantee their quality. This is not a trivial task, as illustrated by the money, complexity, and amount of work that has gone into making the DOI System.&lt;/p&gt;




&lt;h2&gt;
  
  
  Problems With DOI
&lt;/h2&gt;

&lt;p&gt;The importance of the work done on the design of the DOI System is difficult to overrate. Solving the problem of identifying specific objects on the internet is extremely important, and the DOI System has so far helped with that solution. Still, there are some issues concerning this system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;At present, only established commercial and society publishers are purchasing publisher prefixes and so are allowed to issue DOIs. This means that most individual and small publishers are not participating directly in the DOI System, but are merely acting as end users.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Those who participate in the DOI System will need to include the overhead of detailed housekeeping of the DOIs and each item's metadata. In addition, there are the maintenance fees for the &lt;strong&gt;resolver database server&lt;/strong&gt; that the Foundation will need to levy to track the traded, retired, erased, or simply forgotten identifiers.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  A Modern Solution
&lt;/h2&gt;

&lt;p&gt;It's clear that we should look into upgrading this system and solve these problems, or adopt a different PID System altogether.&lt;/p&gt;

&lt;p&gt;In the modern world, when you say unique IDs, the first thing to cross the mind of a dev is Web3 since it's all about creating long unique IDs for digital stuff. The idea is to apply this concept to create PIDs and use them the way we have been using DOIs.&lt;/p&gt;

&lt;p&gt;Below are some of the advantages of using &lt;strong&gt;a globally distributed content-based addressing PID system.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We would eliminate the involvement of central organizations/agencies that issue PIDs and have authority over the intelligence that they maintain. As all the digital information would never be stored in a single server, it will be truly open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We would drastically reduce the cost of maintaining such a system. Since there are no designated servers or data centers, it will be far easier to regulate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every publisher will always be able to participate in this system and guarantee the quality of their work, no matter how small. There would be no need to purchase licenses for issuing PIDs and adhering to strict rules set by anyone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This system will not have to worry about problems like the regulation of IDs for objects that have been destroyed or abandoned. Content-based addresses are extremely versatile.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The PID system known as &lt;a href="https://en.wikipedia.org/wiki/Magnet_URI_scheme" rel="noopener noreferrer"&gt;MagnetLink&lt;/a&gt; already implements this to an extent, but it comes with its own limitations.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is Content-Based Addressing?
&lt;/h2&gt;

&lt;p&gt;I have explained this in detail in my &lt;a href="https://electroblog.hashnode.dev/beginners-guide-to-ipfs" rel="noopener noreferrer"&gt;Beginner's Guide to IPFS&lt;/a&gt; blog but in a nutshell, it's like creating a name for your digital object by using the digital object itself.&lt;/p&gt;

&lt;p&gt;The URL of a digital object represents &lt;strong&gt;where&lt;/strong&gt; on the internet it is stored. But the content-based ID is a string of characters that has been created by using the object itself as a key. If the data changes even a little, the ID also changes. It is created using hashing algorithms like SHA. &lt;a href="https://youtu.be/DMtFhACPnTY" rel="noopener noreferrer"&gt;This video&lt;/a&gt; briefly explains it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Drawbacks Of This System
&lt;/h2&gt;

&lt;p&gt;It may look like the most ideal PID system at first glance, but it's far from it. Some of the disadvantages of this system are listed below.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mutability
&lt;/h3&gt;

&lt;p&gt;As the ID directly depends on the content itself, it makes the content essentially immutable. Suppose you publish an article with an ID from a hashing algorithm that your users can then use to cite this article and find it easily on the internet. If you were to correct so much as a typo in this article, the entire ID will change and the older ID will be rendered useless.&lt;/p&gt;

&lt;p&gt;To overcome this issue of immutability, there are other algorithms put in place that will allow users to continue using the older ID as if it was never changed. There are several designs to make content-based addressed documents mutable which we will not be discussing here, but &lt;a href="https://docs.ipfs.tech/concepts/immutability/" rel="noopener noreferrer"&gt;this is a good starting point&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security
&lt;/h3&gt;

&lt;p&gt;The security of a hashing algorithm essentially depends on how advanced the technology is at a given time. For instance, the hashing algorithm MD5 is no longer useful because of how easy it is to deliberately create hash collisions, thanks to the speed of modern computers. &lt;a href="https://youtu.be/b4b8ktEV4Bg" rel="noopener noreferrer"&gt;This video&lt;/a&gt; explains it in detail.&lt;/p&gt;

&lt;p&gt;Knowing this, it's worth noting that the hash algorithms that are secure today will soon be useless. In fact, it's already happening as the count of quantum computers in the world grows. They are capable of breaking many modern systems that we have relied on for decades, like RSA and SSH, forcing us to design better systems that are harder to break.&lt;/p&gt;

&lt;p&gt;In any case, if computers advance in technology and speed, they also make it easier to implement harder algorithms which would normally have been too slow. If they make it easier to break existing systems, they also make it easier to use more complex systems that even they can't break. We would just need a renewed hashing algorithm to create our PIDs.&lt;/p&gt;




&lt;h2&gt;
  
  
  The End
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;Let me know your thoughts on these PID systems in the comments and if I left out any important details. Check out &lt;a href="https://en.wikipedia.org/wiki/Persistent_identifier" rel="noopener noreferrer"&gt;this Wikipedia page&lt;/a&gt; for further reading.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>web3</category>
      <category>webdev</category>
      <category>stem</category>
    </item>
    <item>
      <title>Using Multiple GitHub Accounts on One Machine with SSH</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Sun, 03 Sep 2023 20:38:29 +0000</pubDate>
      <link>https://dev.to/electromorphous/using-multiple-github-accounts-on-one-machine-with-ssh-4khe</link>
      <guid>https://dev.to/electromorphous/using-multiple-github-accounts-on-one-machine-with-ssh-4khe</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Have you ever wanted to use more than one GitHub account on your laptop? Maybe you want to use a work account and a personal account. Or maybe you want to use accounts from different remotes such as GitHub, GitLab, and BitBucket. It's easy to set up on any operating system.&lt;/p&gt;

&lt;p&gt;We will be using the SSH method to authenticate your remote account with Git. If you haven't used SSH before, this is a great opportunity to learn the basics because it is a very useful tool in many other fields as well.&lt;/p&gt;

&lt;p&gt;This article is written using &lt;a href="https://youtu.be/N2hMGEeYR7c?si=z0m4Jp0SvCnW9ILI" rel="noopener noreferrer"&gt;this video&lt;/a&gt; as a reference. Save it and watch it every time you get confused, that's what I did.&lt;/p&gt;




&lt;h2&gt;
  
  
  Adding the First Account
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your terminal if you're on Mac or Linux. If you're on Windows, open Git Bash.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to ~/.ssh.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate SSH keys by running the keygen command. Give it an appropriate name, it's best to use the username of the GitHub account.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-keygen &lt;span class="nt"&gt;-f&lt;/span&gt; username1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Skip all the options by pressing enter. Run &lt;code&gt;ls&lt;/code&gt; to make sure two new files have been created. A public key and a private key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to see the public key.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;username1.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open GitHub and make sure you are signed in to the account for the username you just used. If you are not, then sign in to the correct account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to &lt;strong&gt;Settings&lt;/strong&gt; » &lt;strong&gt;SSH and GPG keys&lt;/strong&gt; and click on &lt;strong&gt;New SSH key&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The title is supposed to signify the device you are using. It is only for your reference.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you are on something like a Dell laptop, then enter "Dell laptop". Whatever helps you identify this device.
&lt;/li&gt;
&lt;li&gt;Open the terminal and copy the public key. Back in GitHub, paste the public key and click &lt;strong&gt;Add SSH key.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the terminal, create a config file and open it in your editor.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;touch &lt;/span&gt;config
&lt;span class="nv"&gt;$ &lt;/span&gt;code config
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Write something like this in the config file. Replace &lt;code&gt;username1&lt;/code&gt; with the username you used. And replace &lt;code&gt;github.com-user1&lt;/code&gt; with any other abbreviation you like, such as &lt;code&gt;github.com-personal&lt;/code&gt; but let it be short.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Account for username1&lt;/span&gt;
Host github.com-user1
    HostName github.com
    IdentityFile ~/.ssh/username1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The setup is complete, let's test it. Open a private repo on your GitHub account. Click on the green &lt;strong&gt;Clone&lt;/strong&gt; button and select SSH. Copy the string it gives you.&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%2Fizwz7s2vawdfdt00r5um.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%2Fizwz7s2vawdfdt00r5um.jpg" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open a new terminal in the Desktop folder. Enter the following command.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git clone git@github.com-user1:&amp;lt;full name of the repo&amp;gt;
&lt;/code&gt;&lt;/pre&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%2F7akwa9xynxnk1ivm9wgb.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%2F7akwa9xynxnk1ivm9wgb.jpg" alt=" " width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💡 Remember to add &lt;code&gt;-user1&lt;/code&gt; right after the &lt;code&gt;github.com&lt;/code&gt;. In the above image, I have used &lt;code&gt;github.com-ele&lt;/code&gt; because that's what is in my config file.&lt;/p&gt;

&lt;p&gt;🎉You did it! Now this local repo is directly connected with the GitHub repo. With all the branch information and remotes and everything. You can continue using it like you've always used GitHub.&lt;/p&gt;




&lt;h2&gt;
  
  
  Adding the Second Account
&lt;/h2&gt;

&lt;p&gt;Follow the same steps above with the following differences.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the browser and sign out of the previous GitHub account. Sign in with the second account that you want to use, say your work account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the terminal, make sure you are in the ~/.ssh directory. There, generate the new SSH keys.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/.ssh
&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-keygen &lt;span class="nt"&gt;-f&lt;/span&gt; username2
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;ls&lt;/code&gt; to make sure there are two new files. There should be at least 5 files in total. Open the config file and update the content as shown below.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls
$ code config
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;And the config file looks like...&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Account for username1
Host github.com-user1
    HostName github.com
    IdentityFile ~/.ssh/username1

# Account for username2
Host github.com-user2
    HostName github.com
    IdentityFile ~/.ssh/username2
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;As earlier, replace &lt;code&gt;github.com-user2&lt;/code&gt; with anything you like, such as &lt;code&gt;github.com-work&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;cat username2.pub&lt;/code&gt; to see the new public key. In GitHub, create the SSH key just as we did before. You can use the same title if you'd like since this is only for your reference. Paste the key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now test it with a private repo on this account, exactly like we tested the first account. Remember to use &lt;code&gt;github.com-user2&lt;/code&gt; in the &lt;strong&gt;clone&lt;/strong&gt; command.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🎉🎉You're using two GitHub accounts on the same machine! You can work on private repos of both accounts without feeling any difference in the way you use Git.&lt;/p&gt;




&lt;h2&gt;
  
  
  The End
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;Are there more tips &amp;amp; tricks to use Git productively that beginners should learn? Share them in the comments.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>github</category>
      <category>ssh</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Beginner's Guide to GitHub: Part 2</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Fri, 01 Sep 2023 03:37:35 +0000</pubDate>
      <link>https://dev.to/electromorphous/beginners-guide-to-github-part-2-42gb</link>
      <guid>https://dev.to/electromorphous/beginners-guide-to-github-part-2-42gb</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Last time we saw how to get started with GitHub and get used to all the basics. Now let's focus more on learning to collaborate with other devs.&lt;/p&gt;

&lt;p&gt;Watch &lt;a href="https://youtu.be/c6b6B9oN4Vg?si=Dubz1BpHiWL6DIQ4" rel="noopener noreferrer"&gt;this video&lt;/a&gt; to see the process of opening a PR. It's the one I used myself and I followed it every time I got confused (which was A LOT). I advise you to do the same.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Branch?
&lt;/h2&gt;

&lt;p&gt;In a nutshell, branches are a way of organizing the changes in your code across time, so that it's easy to analyze the whole repo in the future.&lt;/p&gt;

&lt;p&gt;During the development, there will be many features and bugs that are completely unrelated to each other. Tracking the development of these features separately on their own branches is simpler than tracking the development of &lt;strong&gt;everything&lt;/strong&gt; in one single line where every feature is mixed. So we use branches to separate and organize the development of these features through time.&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%2Fikqeflzslw51edsoyjcr.png" 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%2Fikqeflzslw51edsoyjcr.png" width="800" height="380"&gt;&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%2Fmgu9hlakuukiwh3eon12.png" 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%2Fmgu9hlakuukiwh3eon12.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above images show how much easier it is to analyze your code when you dedicate a new branch for every feature and bug fix. At a given point in time, your repo can have several branches, all responsible for their own work. Once these branches are fully developed and tested, they are merged into the main branch.&lt;/p&gt;

&lt;p&gt;When the main updates, all the other branches &lt;strong&gt;pull&lt;/strong&gt; the new code from the main to stay up-to-date, and then carry on with their work. This action of &lt;strong&gt;pulling code from the main&lt;/strong&gt; is NOT shown in the above images.&lt;/p&gt;

&lt;p&gt;Apart from segregating the development, branches can be used to protect the main source code from breaking. They can be used for authorization and security purposes and merged only after testing by the reviewers, hence not letting the new intern break production by accident on a Friday evening.&lt;/p&gt;

&lt;p&gt;This is also what makes open source possible. Anyone with a GitHub account can open a PR to a public repo, but only the authorized personnel in that organization can review and merge it.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Fork?
&lt;/h2&gt;

&lt;p&gt;It is a copy of someone's repo. When you fork a repo, all the code in it along with its commit history becomes a copy and gets saved on &lt;strong&gt;your&lt;/strong&gt; profile as a new repo. But it retains a connection with the original one which allows us to open pull requests in the original one.&lt;/p&gt;

&lt;p&gt;The original repo is called the Base repo and the copy which you created is called the Fork or the Head repo. We will discuss more on this below.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why we care
&lt;/h2&gt;

&lt;p&gt;To properly open pull requests, we need to make use of both, &lt;strong&gt;forks&lt;/strong&gt; and &lt;strong&gt;branches&lt;/strong&gt;. Without creating a fork, we cannot directly clone and work on the original repo since we won't always have access to do this. And even if we did, it's not the safest thing to directly make updates to the original repo, even if it's on different branches.&lt;/p&gt;

&lt;p&gt;And without creating branches, our code will be hard to follow as we saw earlier. The features will &lt;strong&gt;not&lt;/strong&gt; be segregated into their own branches, meaning different bugs/features of the source code can be affected in the same pull request. This leads to a lot of confusion for everyone on the team.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is a Pull Request?
&lt;/h2&gt;

&lt;p&gt;Before learning about a pull request, let's first understand some basic terms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Push is when you are &lt;strong&gt;sending&lt;/strong&gt; or &lt;strong&gt;uploading&lt;/strong&gt; your code somewhere. It could be to the GitHub remote from your laptop, or it could be to someone else's account. So here the code moves &lt;strong&gt;away&lt;/strong&gt; from you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pull is when you are &lt;strong&gt;taking&lt;/strong&gt; or &lt;strong&gt;downloading&lt;/strong&gt; code from somewhere. It could be from GitHub to your laptop, or it could be from someone else's account to yours. So here, the code moves &lt;strong&gt;towards&lt;/strong&gt; you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pull Request means that you are &lt;strong&gt;requesting&lt;/strong&gt; the moderators of the original code base to &lt;strong&gt;pull&lt;/strong&gt; your code. You coded something for them and you want them to accept it, so you open a request for them to pull it from you and merge it with their code base.&lt;/p&gt;

&lt;p&gt;So here, your code is moving &lt;strong&gt;away&lt;/strong&gt; from you. It's a push from your POV but it's a pull from &lt;strong&gt;their&lt;/strong&gt; POV.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Let's try it out
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Pick a public repository from GitHub. I'm using &lt;a href="https://github.com/pytorch/pytorch" rel="noopener noreferrer"&gt;PyTorch&lt;/a&gt; for this demo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click the &lt;strong&gt;fork&lt;/strong&gt; button at the top right corner. Click &lt;strong&gt;Create Fork&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will be directed to the new repo which is created on &lt;strong&gt;your&lt;/strong&gt; account. You have all the access to this, even the main branch. Right now you can only see one branch on it which is the main.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We will refer to this repo as the &lt;strong&gt;fork repo&lt;/strong&gt; and the original repo as the &lt;strong&gt;base repo&lt;/strong&gt;. So in our case, &lt;code&gt;Electromorphous/pytorch&lt;/code&gt; is the &lt;strong&gt;fork&lt;/strong&gt; and &lt;code&gt;pytorch/pytorch&lt;/code&gt; is the &lt;strong&gt;base&lt;/strong&gt;. As shown below, make sure you are on your fork and clone it.&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%2Fck98f6qyfvunia4ba3eq.png" 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%2Fck98f6qyfvunia4ba3eq.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After cloning, open the repo in vs code.&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%2Frzvkyttqt034xscwqhb8.png" 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%2Frzvkyttqt034xscwqhb8.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;First, we should make a new branch. I like to follow a convention for branch names as &lt;code&gt;feature-username&lt;/code&gt; so I will call my branch &lt;code&gt;readme-aseer&lt;/code&gt; since I will be updating the README file in this demo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you're on Windows, I recommend you to use Git Bash instead of PowerShell since it always displays the branch name, so there is less chance of accidentally making changes in the wrong branch.&lt;br&gt;
 To do this, press &lt;code&gt;ctrl + shift + p&lt;/code&gt; in vs code. Search "default profile" and select Git Bash.&lt;br&gt;
 Again use the same shortcut &lt;code&gt;ctrl + shift + p&lt;/code&gt; and search "reload window" and press enter. This is a quick way to reload the vs code window.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now open the integrated terminal using &lt;code&gt;ctrl + `&lt;/code&gt; and enter the command shown below to create your branch.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; feature-username
&lt;/code&gt;&lt;/pre&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%2Fdniyc9xw3mzbvazz40ir.png" 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%2Fdniyc9xw3mzbvazz40ir.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now we are on the new branch and we can start making changes to our files. I will open the README file and make a change in line 3.&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%2F9pufl98e0nwltluhfaxx.png" 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%2F9pufl98e0nwltluhfaxx.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Back in the terminal, let's review all the files we changed.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git status
&lt;/code&gt;&lt;/pre&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%2Fke299z0pddae5ftt6f3e.png" 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%2Fke299z0pddae5ftt6f3e.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We see that README.md has been modified. Now just as we learned in the basics, we will run the below commands to commit our changes and then push them to GitHub. When we push, we expect the changes to go to our head repo because that's the one we cloned to our machine. Not the base.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"commit message here"&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git push
&lt;/code&gt;&lt;/pre&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%2Fhif18j3f0pe3gqh98sv4.png" 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%2Fhif18j3f0pe3gqh98sv4.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The first two commands run fine, but we see a message for the push command. It just says that the upstream information has not been set for this branch since we just now created it. Upstream information tells the branch &lt;strong&gt;where&lt;/strong&gt; exactly to push the code, so we need to set it the first time we push. We also get a command to set the upstream so we can just copy and paste it.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git push &lt;span class="nt"&gt;--set-upstream&lt;/span&gt; origin &amp;lt;branch-name&amp;gt;
&lt;/code&gt;&lt;/pre&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%2Fcuyw6l5sa5zqg2ul1vg9.png" 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%2Fcuyw6l5sa5zqg2ul1vg9.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After pushing successfully, when you go back to your fork on GitHub, you will see a message like this.&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%2Fh6tuzp1aenojdlxpfpex.png" 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%2Fh6tuzp1aenojdlxpfpex.png" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can open the pull request right away, but let's just do a couple more things before that.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It's best practice to always make sure all your branches are &lt;strong&gt;in sync&lt;/strong&gt; with the base repo.&lt;br&gt;
&lt;strong&gt;Syncing&lt;/strong&gt; is the process of pulling all the latest code from the base repo into your fork to make sure you have the latest. You should sync your code with the base regularly, like at least once a day.&lt;br&gt;
    It's important for avoiding merge conflicts so you should sync before opening a new PR.&lt;br&gt;
    To do this, reload the GitHub page of your fork and click on &lt;strong&gt;sync fork&lt;/strong&gt;. Then click &lt;strong&gt;update branch&lt;/strong&gt;. In case there is nothing to sync, you will see this.&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%2Fte8djq4vpt33ujlv8lym.png" 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%2Fte8djq4vpt33ujlv8lym.png" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;After syncing on GitHub, we also need to sync the code on our local machine. Back in the vs code terminal, checkout to the main branch. Then run the pull command to pull the code from the remote.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout main
&lt;span class="nv"&gt;$ &lt;/span&gt;git pull
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Checkout to your other branches on which you were coding, and then pull again. This time we have to specify that we want to pull from &lt;strong&gt;origin main&lt;/strong&gt; which means the main branch on GitHub.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git checkout &amp;lt;branch-name&amp;gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git pull origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You may find conflicts in your code at this point so go ahead and resolve them. Finally, we must commit and push these changes again after syncing. So run the add, commit, and push commands again.&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%2Fzbrid7v0xa0rcsk5m8mf.png" 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%2Fzbrid7v0xa0rcsk5m8mf.png" width="800" height="555"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Back in GitHub, we can finally click on the green button that says "Compare &amp;amp; pull request". And then finally click on "Create pull request".&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's all folks, you just opened your first pull request 🎉&lt;/p&gt;




&lt;h2&gt;
  
  
  The End
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;I know this was a lot of information to take in and it's overwhelming for all beginners to get started with pull requests. But the more you do it the easier it gets. Starting is the hard part. Make sure to drop any other tips &amp;amp; tricks that you have.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to Properly Learn Anything For FREE!</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Tue, 29 Aug 2023 21:04:07 +0000</pubDate>
      <link>https://dev.to/electromorphous/how-to-properly-learn-anything-for-free-4j1j</link>
      <guid>https://dev.to/electromorphous/how-to-properly-learn-anything-for-free-4j1j</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;Coding is one of those gold mines that can potentially allow you to live the life you dream of (depending on how hard you work of course). Like most other people, I started learning to code with almost no money. I never considered buying courses from Coursera or Udemy, because I was learning everything for free so efficiently.&lt;/p&gt;

&lt;p&gt;So here's an article talking about EXACTLY what I did to learn the things I learned without spending a dime. It will outline the process for learning the fundamentals of anything you want. And once you have built some basic projects of your own, the world is your canvas.&lt;/p&gt;




&lt;h1&gt;
  
  
  YouTube
&lt;/h1&gt;

&lt;p&gt;Every bit of coding knowledge I have comes from here. The amount of free knowledge available on YouTube is unbelievable and I learned FAR more useful and practical skills from YouTube than college ever taught me. Many times I even find the courses on YouTube to be better than the paid ones because when creators do it for free (or for very little money), they're really passionate about teaching and the quality of their content is amazing.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I Started
&lt;/h3&gt;

&lt;p&gt;My go-to channel for learning web development is &lt;a href="https://www.youtube.com/@TraversyMedia" rel="noopener noreferrer"&gt;Traversy Media&lt;/a&gt;. I remember constantly thinking to myself "How is he uploading this for free it doesn't even feel legal" while learning from him.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/playlist?list=PLillGF-RfqbZTASqIqdvm1R5mLrQq79CU" rel="noopener noreferrer"&gt;This is the playlist&lt;/a&gt; I used for learning all the basics of HTML and CSS. First, I went through the first few videos to understand all the basics, and then I selected projects from this playlist at random and coded them along with him.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Approach
&lt;/h3&gt;

&lt;p&gt;It was a repetitive process where I followed him until the end of the project, deleted the whole project, followed him a second time, created the same project again, and deleted it again. For the third time, I wouldn't follow him. I would have understood the requirements and I would try to code it myself, mostly while recalling how he did it, but also trying to fix bugs myself by googling. If nothing helps and I'm stuck, I can always check the video to see how he did it.&lt;/p&gt;

&lt;p&gt;Then I would repeat. Delete the project and re-code it, and delete it again and re-code it again - the entire project from scratch. From setup until the final requirement is reached. I did this as many times as it took for me to be confident that "I can make this by myself now". And then, I would pick a different project at random, from the same playlist, and do the same thing. First, follow him a couple of times, then code it myself a couple of times. &lt;strong&gt;Same project, every time from scratch.&lt;/strong&gt; I did this for around 3 different projects from that playlist.&lt;/p&gt;

&lt;p&gt;This way, I had almost mastered plain HTML and CSS and created a very strong foundation for my front-end game, I wanted to make sure I knew enough CSS before moving to JavaScript.&lt;/p&gt;

&lt;p&gt;🛑 One extremely common mistake beginners make is getting stuck in tutorial hell. They don't realize the importance of &lt;strong&gt;attempting&lt;/strong&gt; to code it yourself. Even if you bought the best, most expensive course, and if all you're doing is following the creator, you will NOT be in a position to make projects on your own. You need to realize that you are &lt;strong&gt;training to be independent&lt;/strong&gt;, not to always follow someone else line-by-line. So even if you &lt;strong&gt;are&lt;/strong&gt; following a paid tutorial, try this method of deleting the project and re-coding it without looking until you're sure you can do it yourself without any help.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Introduced to JavaScript
&lt;/h3&gt;

&lt;p&gt;After I was done with CSS, I followed the same process with &lt;a href="https://www.youtube.com/playlist?list=PLillGF-RfqbbnEGy3ROiLWk7JMCuSyQtX" rel="noopener noreferrer"&gt;this playlist&lt;/a&gt; for learning JavaScript. I watched the first few videos for all the basics and then picked random projects. I would create and delete them several times until I was sure I got it.&lt;/p&gt;

&lt;p&gt;After learning javascript, I found Sass. This was a game-changer. It made CSS so much easier to write and read. &lt;a href="https://youtu.be/Zz6eOVaaelI?si=kC1-veOPuGENYyz6" rel="noopener noreferrer"&gt;This video&lt;/a&gt; by Ed (another amazing channel that I used a lot) is all I ever needed. It's short and to the point. It doesn't go in-depth about all the things Sass is capable of doing, but TBH I never cared about all that. Unless I'm making a big application in Vanilla javascript, those extra features feel overwhelming. Every front-end dev is expected to know the basics of Sass.&lt;/p&gt;

&lt;p&gt;Then I wanted to create some websites without following any video. I wanted to just look at an existing design and implement it using my newfound knowledge. So I looked at some simple landing pages and created their clones. You can find inspiration for front-end designs on platforms like &lt;a href="https://dribbble.com/shots" rel="noopener noreferrer"&gt;Dribbble&lt;/a&gt; and you can also search for popular websites and try to recreate them.&lt;/p&gt;

&lt;p&gt;💡 Throughout this process, I would be constantly committing and pushing my code to GitHub, just to get used to the basic commands and the environment of using it. But this isn't necessary if you feel it can be distracting you from the actual coding. You can learn GitHub a little later once you are more comfortable with the code.&lt;/p&gt;

&lt;h3&gt;
  
  
  My First Website
&lt;/h3&gt;

&lt;p&gt;After cloning some existing designs and publishing them on gh-pages, I felt I was finally ready to make a website all by myself from scratch, including the design phase. And what better way to test your design and coding skills than to make a portfolio?&lt;/p&gt;

&lt;p&gt;So the first original website I ever made is &lt;a href="https://electromorphous.github.io/" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt;. It took longer to finish than I'd like to admit because of some annoying bugs that nobody seemed to know about, but I fixed them and I like how it turned out in the end. I use it to this day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Learning New Stuff
&lt;/h3&gt;

&lt;p&gt;I had figured out a fool-proof way to master &lt;strong&gt;anything&lt;/strong&gt; I wanted. For every piece of tech I wanted to learn, I have always used the same method. I learned React.js the same way by following some YouTube tutorials and then coding them myself several times while understanding every concept.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/playlist?list=PLZlA0Gpn_vH_NT5zPVp18nGe_W9LqBDQK" rel="noopener noreferrer"&gt;This is the playlist&lt;/a&gt; I used for everything react. This channel has the most clear and concise explanations even for the most advanced of topics. I lost count of how many times I watched these videos when I got confused with react hooks.&lt;/p&gt;

&lt;p&gt;From there on, anything I wanted to learn from scratch was a piece of cake. The more time I spent coding something, the less time I needed to learn new things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Killing Procrastination
&lt;/h3&gt;

&lt;p&gt;YouTube may be the world's largest database of free courses, but it's also the world's largest database of attention-grabbing content that wants your clicks and views. There have been many times when I open YouTube to search for something but hours pass by and I don't even remember why I opened it to begin with, while also not recalling how my time was even spent. It's the most frustrating thing to lose time.&lt;/p&gt;

&lt;p&gt;That's why I highly encourage you to install this extension on your &lt;a href="https://chrome.google.com/webstore/detail/block-youtube-feed-homepa/lcpclaffcdiihapebmfgcmmplphbkjmd" rel="noopener noreferrer"&gt;Chrome&lt;/a&gt; and &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/block-youtube-feed/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search" rel="noopener noreferrer"&gt;Firefox&lt;/a&gt; browsers. I cannot explain how much it helped me stay focused and I wish I found it sooner.&lt;/p&gt;




&lt;h1&gt;
  
  
  Other Platforms
&lt;/h1&gt;

&lt;p&gt;There are many other platforms you can use to get started with your coding journey. I personally don't care about certificates nearly as much as projects and knowledge, but if certificates are important to you, then these platforms are worth checking out.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠ &lt;strong&gt;Disclaimer&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I cannot stress this enough. Don't spend forever researching about platforms and which is the best. No platform can help you if you keep getting distracted from your &lt;strong&gt;real goal&lt;/strong&gt;. The most important (and scariest) part of learning is making your own projects, so get past it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.freecodecamp.org/" rel="noopener noreferrer"&gt;FreeCodeCamp&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;I'm sure you have heard of them. This is by far the most popular platform to learn coding for free. They even upload many of their courses on YouTube. They have small tasks that you can complete, projects that you can follow, and certifications you can earn. There are many reasons for their amazing reputation.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.codecademy.com/" rel="noopener noreferrer"&gt;Codecademy&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It's one of the most popular platforms for learning to code for free. Just like FreeCodeCamp, they also offer a variety of courses along with projects and certifications. I found their library of courses to be extremely vast and you can find a course for almost anything you're trying to learn on here.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;You can find plenty of courses for learning the fundamental concepts of several technologies, old and new. They have a thorough explanation of each topic along with small tasks and quizzes, and they provide certifications too.&lt;/p&gt;

&lt;p&gt;Personally, I don't find this to be the most efficient way to learn. Not to mention it can be harder to stay focused when reading and trying to understand so much theory instead of having a video explain it to you. But what works for me won't work for everyone so it's worth a try. You may find it to be more valuable.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://web.dev/learn/" rel="noopener noreferrer"&gt;Web.dev&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;It's a site created by the developers and writers of Google Chrome. It focuses on basic courses for fundamentals of web development.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.udemy.com" rel="noopener noreferrer"&gt;Udemy&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Okay, this isn't free, but it's super cheap. Most of the courses on Udemy are sold at a very low price. The value they provide far exceeds their cost. So if you're okay with investing a bit in a good course, and if spending money on a course motivates you to utilize it, then go right ahead.&lt;/p&gt;

&lt;p&gt;I have tried some Udemy courses, but I still prefer YouTube for the popular tech stuff like Python and JavaScript :)&lt;/p&gt;




&lt;h1&gt;
  
  
  The End
&lt;/h1&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;If there's anything you'd like to add, feel free to start a discussion in the comments.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>learning</category>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating Animated Blobs is EASY!</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Fri, 25 Aug 2023 19:10:02 +0000</pubDate>
      <link>https://dev.to/electromorphous/creating-animated-blobs-is-easy-51nb</link>
      <guid>https://dev.to/electromorphous/creating-animated-blobs-is-easy-51nb</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;Ever wanted to make a levitating blob on your webpage? Maybe you're familiar with one approach but curious about a better method. This article outlines a few optimal techniques for rendering a gooey blob on your site.&lt;/p&gt;




&lt;h1&gt;
  
  
  Static Blobs
&lt;/h1&gt;

&lt;p&gt;First, let's talk about blobs that don't move. They are plain SVGs and they are super easy to generate.&lt;/p&gt;

&lt;p&gt;You can just Google for "Blob SVG" and you will come across some great blob generators. The one I loved most was created by MagicPattern and you can use it by &lt;a href="https://www.magicpattern.design/tools/blob-generator" rel="noopener noreferrer"&gt;clicking here&lt;/a&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Simple Animated Blobs
&lt;/h1&gt;

&lt;p&gt;There are several tools to generate animated blobs that will infinitely loop a simple animation. You can generate them as SVGs or as GIFs.&lt;/p&gt;

&lt;h3&gt;
  
  
  As SVG
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://blobanimation.com/" rel="noopener noreferrer"&gt;This tool&lt;/a&gt; allows you to create beautiful blobs that you can export as SVG or copy-paste directly into your code. They are extremely efficient as they render using SVGs and not any separate asset files.&lt;/p&gt;

&lt;h3&gt;
  
  
  As GIF
&lt;/h3&gt;

&lt;p&gt;If for some reason you prefer your blob to be animated in a GIF, you can use &lt;a href="https://blobs.xom9ik.com/" rel="noopener noreferrer"&gt;this tool&lt;/a&gt; to customize your perfect blobs and export them as GIFs.&lt;/p&gt;




&lt;h1&gt;
  
  
  Customized Gooey Effects
&lt;/h1&gt;

&lt;p&gt;If your requirement is a little more complicated than just a floating blob with a looping animation, you can use HTML and CSS to create a gooey effect.&lt;/p&gt;

&lt;p&gt;You can search for "Gooey effect CSS" on Google or &lt;a href="https://codepen.io" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; to find a variety of inspirational code snippets.&lt;/p&gt;

&lt;p&gt;You can also go through &lt;a href="https://css-tricks.com/gooey-effect/" rel="noopener noreferrer"&gt;this website&lt;/a&gt; by CSS-TRICKS which discusses all the ways to create this effect in CSS while detailing the drawbacks of this method.&lt;/p&gt;




&lt;h1&gt;
  
  
  Gooey React
&lt;/h1&gt;

&lt;p&gt;This one is for you React fanboys.&lt;/p&gt;

&lt;p&gt;It's a library that simplifies all the work for you and abstracts the implementation of this amazing effect into a React component. It's the simplest way of creating optimized gooey effects on your React app that are fast, smooth, and very appealing to look at while also being extremely easy to implement.&lt;/p&gt;

&lt;p&gt;It also takes care of browser compatibility issues which you may have to deal with if you want to implement this effect yourself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gooey-react.netlify.app/" rel="noopener noreferrer"&gt;Here&lt;/a&gt; are the docs for this library and be sure to check out the examples section for some great ideas.&lt;/p&gt;




&lt;h1&gt;
  
  
  The End
&lt;/h1&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;If you know of any more ways of creating this great effect or something that can complement this on a web app, then let us know in the comments.&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>beginners</category>
      <category>react</category>
      <category>design</category>
      <category>css</category>
    </item>
    <item>
      <title>Beginner's Guide to GitHub: Part 1</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Mon, 21 Aug 2023 13:00:30 +0000</pubDate>
      <link>https://dev.to/electromorphous/beginners-guide-to-github-part-1-f41</link>
      <guid>https://dev.to/electromorphous/beginners-guide-to-github-part-1-f41</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Whether you are a complete beginner who has only heard of GitHub before, or you know a few things about it but are still not sure how to use it - this article has you covered. We will first go through a few fundamental concepts about GitHub, and then learn to create our first repository to save our code in it.&lt;/p&gt;




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

&lt;p&gt;Git is a &lt;strong&gt;version control system&lt;/strong&gt; that tracks changes in files, usually used for coordinating work among programmers. Version control systems are responsible for controlling the versions of your source code and maintaining a record of all the changes in the thing you are developing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git is a program&lt;/strong&gt; that gets installed on your machine locally. It comes with apps like Git Bash and Git GUI. Since it's local to your machine, it doesn't require an internet connection. You can use it offline.&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;GitHub is a website.&lt;/strong&gt; More specifically, GitHub is a &lt;strong&gt;cloud service provider&lt;/strong&gt; (storing your data in data centers for free). Think of it like Google Drive but mainly for storing and tracking source code. Yes, you can store any file type on it, not just code.&lt;/p&gt;

&lt;p&gt;It allows you to store your code on the internet along with all the versions that your code goes through. It uses git to keep track of the versions and provides you with a great user interface to store your code on the cloud as a backup, showcase your source code to the world, or collaborate with other devs.&lt;/p&gt;

&lt;p&gt;So platforms like GitHub, GitLab, and BitBucket wouldn't exist without Git. They all make use of git at their core to track versions of your code and to help you work with other developers all around the world.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install Git
&lt;/h2&gt;

&lt;p&gt;You can install Git for free on &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;its official website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The installer will ask you some weird and complex questions while installing but you don't need to worry about it, just keep clicking the "next" button and leave all the settings to the defaults. After installing, open your Terminal or PowerShell and enter &lt;code&gt;git --version&lt;/code&gt; to make sure it has been installed.&lt;/p&gt;




&lt;h2&gt;
  
  
  Git authentication
&lt;/h2&gt;

&lt;p&gt;There are three main ways to authenticate your GitHub account properly in your machine's git.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Using your browser or GitHub mobile app: This uses your GitHub account password for signing in to Git. It is the easiest way to get going with GitHub and is best for complete beginners. But it's not the most secure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using Personal Access Tokens (PAT): These are long strings that act like passwords but they are much more versatile in terms of access and security. We will be following this because it's rather simple and we can focus more on GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using SSH keys: This method has been around for a long time and has always been the more secure option. You can even authenticate and use &lt;strong&gt;multiple GitHub accounts&lt;/strong&gt; on the &lt;strong&gt;same machine&lt;/strong&gt; by using SSH keys. Understanding the basics of SSH will be beneficial in other fields as well. So it's best to get used to it early on. I'll write a different article on using SSH.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Creating an account
&lt;/h2&gt;

&lt;p&gt;If you haven't created a GitHub account yet, go ahead and &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;sign up&lt;/a&gt;. GitHub may ask you some questions and that's mostly for surveying purposes. Your GitHub experience will not be affected by them so answer freely.&lt;/p&gt;




&lt;h2&gt;
  
  
  Set up git
&lt;/h2&gt;

&lt;p&gt;Configure a global git user for your machine. For this, open the git bash and enter the following commands, but replace the variables with your credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;user.name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;YOUR_GITHUB_USERNAME&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--global&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;user.email&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;YOUR_EMAIL&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Writing code
&lt;/h2&gt;

&lt;p&gt;Make a new empty folder on your machine and open VScode in it. There, create a text file called &lt;code&gt;temp.txt&lt;/code&gt; and write some stuff. You can also create a folder there and add another file inside it. It can be any type of file - txt, html, py, js, doesn't matter. Make whatever kind of file structure you want here and add as many folders and files as you like.&lt;/p&gt;

&lt;p&gt;Let's say this is what your project looks like and these are your files, you want to store these in GitHub.&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%2Ftr8e30g22a9qwxhr0w9i.png" 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%2Ftr8e30g22a9qwxhr0w9i.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating your first repo
&lt;/h2&gt;

&lt;p&gt;Repos (short for repositories) are at the heart of GitHub. Think of a repo as a folder in your GitHub account that contains other files and folders inside it. Usually, a single repo represents a single project. You are allowed to create as many repos as you want for free on GitHub.&lt;/p&gt;

&lt;p&gt;First, let's create a repo and then break down everything we do.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On the homepage of GitHub, click on the green button at the top left that says "New".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Give your repo a name. It can also contain spaces but I don't recommend it. You can call it &lt;code&gt;MyFirstRepo&lt;/code&gt;. You can also select the "private" option if you don't want this repo to be publicly visible to anyone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can skip all the other stuff and click "Create repository".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will see a screen like this. Make sure HTTPS is selected and not SSH. &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%2F61t1prlz0aohwv76yjti.png" 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%2F61t1prlz0aohwv76yjti.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Back in VScode, use the &lt;code&gt;ctrl + `&lt;/code&gt; shortcut to open the integrated terminal. Windows users will likely see a PowerShell instance in the integrated terminal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the commands from the first option and paste them into your integrated terminal. &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%2Fguhsoz69q5xypvehyxga.png" 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%2Fguhsoz69q5xypvehyxga.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the last command is run, Git will ask you to sign in to your GitHub. &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%2Fgtm3kynyzl4ibl1pfeji.png" 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%2Fgtm3kynyzl4ibl1pfeji.png" alt=" " width="626" height="514"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can use the Browser option but I will show how to use a PAT. If you decide to use the Browser option, then you can skip to step 12.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To generate a PAT, open &lt;a href="http://github.com" rel="noopener noreferrer"&gt;github.com&lt;/a&gt; and click on your profile picture at the top right corner. From the sidebar menu, select "Settings". Scroll all the way down and from the menu on the left, select "Developer Settings". Under "Personal access tokens" select "Tokens (classic)".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create a new classic token. For the note, you can say "My first token", and set the expiration. When the PAT expires, it will no longer work and you need to generate a new one and sign in with this method again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go ahead and check all the boxes to give yourself all the access. Finally, click "Generate token". Copy this token and paste it into the Git Window which opened earlier. Click "Sign in".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now back in VScode, you should see the push command has successfully finished executing. &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%2F5ah6nq8usw4dwuqdz5af.png" 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%2F5ah6nq8usw4dwuqdz5af.png" alt=" " width="800" height="246"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open GitHub and go to your repositories. Open the repo which you just created. You will see only a README file in it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To push the rest of the files, come back to the VScode terminal and enter the following commands.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"initial commit"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now come back to your GitHub repo and reload the page. You will see your entire file structure inside this repo, along with an extra README file.&lt;/p&gt;




&lt;h2&gt;
  
  
  Break down
&lt;/h2&gt;

&lt;p&gt;Let's understand everything we just did.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;We created a new repo associated with our GitHub account. All the data and metadata of this repo will be stored in the GitHub data centers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;echo "# MyFirstRepo" &amp;gt;&amp;gt; README.md&lt;/code&gt; - This is just a bash command which creates a new markdown file called README.md and writes "# MyFirstRepo" to it. It has nothing to do with git.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git init&lt;/code&gt; - This is the most important and sensitive command to understand. It initializes your folder to identify itself as a git repository. When you run this command in a certain folder (in this case I ran it in "test"), it creates a new hidden folder called .git and you need to enable &lt;strong&gt;hidden files&lt;/strong&gt; in the &lt;strong&gt;view&lt;/strong&gt; of your file explorer to be able to see it. &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%2Fjekvq0pkfwlpcdnr7u5o.png" 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%2Fjekvq0pkfwlpcdnr7u5o.png" alt=" " width="800" height="331"&gt;&lt;/a&gt; This .git folder &lt;strong&gt;MUST NOT&lt;/strong&gt; be moved around. &lt;strong&gt;Don't touch it.&lt;/strong&gt; It must always reside in the folder it was created in. It contains information about staged files and commits and stuff that &lt;strong&gt;we are not&lt;/strong&gt; supposed to understand or modify by ourselves. &lt;strong&gt;DO NOT&lt;/strong&gt; copy it or cut it and paste it somewhere else. It belongs with the code it was created for and the only way to interact with it is through git commands in the terminal. However, if you wish to disassociate this folder from Git completely and turn it into a regular folder, it is enough to delete the .git folder from it. To associate that folder with a GitHub repo again, run &lt;code&gt;git init&lt;/code&gt; again, and then add a remote and push the code from scratch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git add README.md&lt;/code&gt; - This command adds the file README.md to the staged files. Staging is done to files that are ready to be committed in the next commit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git commit -m "first commit"&lt;/code&gt; - This command will commit your staged files with the message "first commit". You can think of committing as a way of saving your progress like in a videogame. You are creating a checkpoint in the lifetime of your source code where you just finished implementing a feature or fixing a bug and made sure it's working properly, so you want to save it with some message. You can revert back to this state of your source code if you need to in the future.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git branch -M main&lt;/code&gt; - We will not be discussing branches in detail but this command is only used for renaming the default "master" branch to "main". GitHub made this change around the end of 2020 so you will find old archived repos will probably still use "master" as the default branch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git remote add origin https://github.com/Electromorphous/MyFirstRepo.git&lt;/code&gt; - This is the command responsible for connecting &lt;strong&gt;your local git repo&lt;/strong&gt; to &lt;strong&gt;the online GitHub repo that's living on the cloud&lt;/strong&gt;. It tells Git &lt;strong&gt;where&lt;/strong&gt; to push the code on the internet (including the platform like &lt;strong&gt;GitHub&lt;/strong&gt; or &lt;strong&gt;GitLab&lt;/strong&gt;) and also where to pull the code from. If you run &lt;code&gt;git remote -v&lt;/code&gt; you will see the remotes saved in your folder and they have names like "origin" and "upstream". &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%2F7rxj884jhuzugz1w25yn.png" 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%2F7rxj884jhuzugz1w25yn.png" alt=" " width="800" height="108"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git push -u origin main&lt;/code&gt; - It's just a way of pushing the code to GitHub while simultaneously saving a configuration for this repo that the next time when you run &lt;code&gt;git push&lt;/code&gt; it is understood that your code must be pushed to "origin main". You will not have to specify the remote name and the branch name every time, you just have to run &lt;code&gt;git push&lt;/code&gt; and it will be pushed to the remote saved as "origin" and the branch called "main" automatically.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Next, we created a personal access token that acts like a password and gives you access to GitHub actions and used it to authenticate ourselves to Git locally.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git add .&lt;/code&gt; - Here the period &lt;code&gt;.&lt;/code&gt; means &lt;strong&gt;everything in the current folder&lt;/strong&gt;. So we are staging all our files because they are ready to be committed in the next commit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git commit -m "initial commit"&lt;/code&gt; - Creating a new commit called "initial commit" where we are pushing all our initial code to GitHub for the first time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; - Pushing the committed files to our GitHub repo's main branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After that command, all our code is on GitHub inside a new repo. You can check the commit history of that repo on the same page.&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%2Fzvrggmbnthniq1ego2u2.png" 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%2Fzvrggmbnthniq1ego2u2.png" alt=" " width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What next?
&lt;/h2&gt;

&lt;p&gt;You have to get used to the basics of GitHub. All these fundamentals you just learned are extremely important and it may take some time to understand them. But they are the foundation of the rest of the knowledge you will gain about version control. So you must use GitHub often to get used to it. How?&lt;/p&gt;

&lt;p&gt;While you're coding your project, every time you finish a certain feature or fix a bug, remember to open the integrated terminal and run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"YOUR COMMIT MESSAGE"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It &lt;strong&gt;really&lt;/strong&gt; only takes that much. While developing something, open the terminal and run those 3 commands every time you reach a checkpoint to save your progress.&lt;/p&gt;

&lt;p&gt;It has the added advantage of keeping a backup of &lt;strong&gt;every good version&lt;/strong&gt; of your code that was running at some point, so in case anything happens to your machine or it gets stolen, your code is safe. Plus, it's there on the internet for everyone to see.&lt;/p&gt;




&lt;h2&gt;
  
  
  The end
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;That took a lot longer than I had planned, but I've covered all the basics and hopefully given a lot more context to beginners. Remember to be patient and consistent with it and you will master these fundamental concepts in no time.&lt;/p&gt;

&lt;p&gt;If you like this article then consider &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;following me&lt;/a&gt; and &lt;a href="https://electroblog.hashnode.dev/newsletter" rel="noopener noreferrer"&gt;subscribe to the Electroblog newsletter&lt;/a&gt; to be notified when I publish a new article.&lt;/p&gt;




</description>
      <category>github</category>
      <category>git</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Browser Extensions Every Designer Must Have</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Tue, 15 Aug 2023 20:07:21 +0000</pubDate>
      <link>https://dev.to/electromorphous/browser-extensions-every-designer-must-have-1j08</link>
      <guid>https://dev.to/electromorphous/browser-extensions-every-designer-must-have-1j08</guid>
      <description>&lt;h1&gt;
  
  
  Overview
&lt;/h1&gt;

&lt;p&gt;I've always been a minimalist. I avoid cluttering my workspaces at any chance I get. This is why I am writing this small article about the few browser extensions I often rely on as a designer. I rarely feel the need for any extensions other than these. So let's check them out.&lt;/p&gt;




&lt;h1&gt;
  
  
  WhatFont
&lt;/h1&gt;

&lt;p&gt;Have you ever visited a website and seen a font that looks immaculate? Don't you wish there was a way for you to find the name of every font you see on the internet (without having to open inspect element every time)?&lt;/p&gt;

&lt;p&gt;WhatFont does exactly that. Once you install it in your browser, there's almost no font on any website whose name you cannot find out. Although many extensions do this, I find WhatFont to be the most easy to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/zjm-whatfont/" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  Colorpick Eyedropper
&lt;/h1&gt;

&lt;p&gt;This cool extension gives you the exact hex code of any color you see on a website. It's especially useful for clone projects when you want the exact brand colors of an existing web page. I find myself using it often even when I'm building my apps.&lt;/p&gt;

&lt;p&gt;It also has many alternatives but this is the one I find to be the easiest to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/colorpick-eyedropper/ohcpnigalekghcmgcdcenkpelffpdolg" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/colorpick-eyedropper/" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  Block YouTube Feed
&lt;/h1&gt;

&lt;p&gt;This was a game-changer for me. If you are self-taught then you already know how valuable youtube is in terms of free education. Every time I need to learn something new, youtube is probably the first platform I visit to find courses on that topic.&lt;/p&gt;

&lt;p&gt;But this is a big problem because youtube is one of those platforms that loves your attention and shows you things that are hard to ignore. Next thing you know, you wasted half the day watching cats, memes, or other things that you don't even remember.&lt;/p&gt;

&lt;p&gt;This extension completely blocks off all videos that youtube recommends. You can even customize which feed you want to allow or block. Now if you want to open youtube for searching a topic, a playlist, or a question, you don't have to worry about getting distracted and procrastinating your life away.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/block-youtube-feed-homepa/lcpclaffcdiihapebmfgcmmplphbkjmd" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/block-youtube-feed/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  Tabliss
&lt;/h1&gt;

&lt;p&gt;This adds a lot of personality to my browser. I can customize how I want my new tabs to look and the customization is endless. It is a great way of making your workspace truly your own and livening it up.&lt;/p&gt;

&lt;p&gt;You can have it display random high-quality pictures from Unsplash, random gifs from GIPHY, color gradients or even static images. There are several useful widgets you can add to improve the appearance and the fonts are fully customizable based on your system fonts. It even increases my productivity with the to-do lists and notes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/tabliss-a-beautiful-new-t/hipekcciheckooncpjeljhnekcoolahp" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/tabliss/" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  Dark Mode
&lt;/h1&gt;

&lt;p&gt;Everyone understands the struggle of reading in light mode. I always keep a dark mode extension on my browsers. But they aren't the same for Firefox and Chrome.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/dark-mode-dark-reader-for/pjbgfifennfhnbkhoidkdchbflppjncb" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/dark-mode-by-albert-inc/?utm_source=addons.mozilla.org&amp;amp;utm_medium=referral&amp;amp;utm_content=search" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  React Developer Tools
&lt;/h1&gt;

&lt;p&gt;This is more for front-end developers than for designers. I'm sure you have heard about it, but if you code with React and never heard of React developer tools, you're missing out.&lt;/p&gt;

&lt;p&gt;It provides a plethora of tools specifically designed to debug and optimize React applications. It also allows you to identify if a website has been coded with React or not. &lt;a href="https://youtu.be/Qwb-Za6cBws" rel="noopener noreferrer"&gt;Watch this video&lt;/a&gt; to learn about optimizing a React app using React developer tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/h3&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/react-devtools/" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/h3&gt;




&lt;h1&gt;
  
  
  The End
&lt;/h1&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;If there are any other essential browser extensions I missed, let us know in the comments and let's all get productive together!&lt;/p&gt;

&lt;p&gt;If you like this article then consider following me on &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;.&lt;/p&gt;




</description>
      <category>design</category>
      <category>productivity</category>
      <category>react</category>
      <category>browser</category>
    </item>
    <item>
      <title>Beginner's Guide to IPFS</title>
      <dc:creator>Aseer</dc:creator>
      <pubDate>Mon, 14 Aug 2023 00:56:38 +0000</pubDate>
      <link>https://dev.to/electromorphous/beginners-guide-to-ipfs-3h7k</link>
      <guid>https://dev.to/electromorphous/beginners-guide-to-ipfs-3h7k</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;First, a disclaimer: I am still learning about IPFS and any feedback/tips are more than welcome. This article may be overly simplified (without jargon) so take it with a grain of salt and correct me if needed.&lt;/p&gt;

&lt;p&gt;The reason I made this article is because IPFS and its packages have gone through a lot of changes in the last year. The resources for understanding and implementing them are all over the place. &lt;a href="https://ipfs.io/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi" rel="noopener noreferrer"&gt;This picture&lt;/a&gt; perfectly encapsulates my reaction the whole time I was trying to understand the IPFS docs.&lt;/p&gt;

&lt;p&gt;This article hopes to simplify most of the information that's currently revolving around IPFS and make it easier for you to get started with the latest version of IPFS.&lt;/p&gt;




&lt;h2&gt;
  
  
  What IPFS is and isn't
&lt;/h2&gt;

&lt;p&gt;It stands for Interplanetary File System and that's what it is - a file system. It's a system to store and share files. It is a network of nodes (computers) connected in a peer-to-peer structure. There is no central authority like a server. This results in a decentralized network that is used to store and share data.&lt;/p&gt;

&lt;p&gt;It is not a storage service provider, a database, or a cloud service provider. In its essence, IPFS is just a set of protocols (rules) that make up an algorithm. When implemented, it creates a decentralized file system. It can be used with databases and cloud services but it's not one by itself.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why we care
&lt;/h2&gt;

&lt;p&gt;For the most part, it aims to solve a lot of problems with the current web (web2) and it does a great job at it. You can read in detail about these problems &lt;a href="https://docs.ipfs.tech/concepts/ipfs-solves/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Probably the biggest solution it provides is &lt;strong&gt;content-based&lt;/strong&gt; addressing. Our current web uses &lt;strong&gt;location-based&lt;/strong&gt; addressing. It means when you want some data (say a web page) you have to tell the internet its location using the URL. Basically telling the internet &lt;strong&gt;&lt;em&gt;where&lt;/em&gt;&lt;/strong&gt; this web page is stored and asking for it.&lt;/p&gt;

&lt;p&gt;In content-based addressing, instead of asking for data using its location, we ask for the data using some unique identifier that we have for that data. You can think of this identifier as a short name we just made up to refer to the data, and it directly depends on what the data is. If the data changes, its name changes.&lt;/p&gt;




&lt;h2&gt;
  
  
  How IPFS works
&lt;/h2&gt;

&lt;p&gt;The most important role of IPFS is to create these names for the data it gets. Without these names, we won't have any way of accessing this data. From now on we will call these names as CID (content identifier). IPFS uses an algorithm called &lt;strong&gt;SHA256&lt;/strong&gt; to generate these CIDs.&lt;/p&gt;

&lt;p&gt;SHA256 is an extremely useful algorithm that's applied in many fields. But here we care most about the following points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;It takes some data and generates a pseudo-random string. Pseudo-random means something that looks like complete gibberish but it's actually not.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;These strings are called &lt;strong&gt;Hashes&lt;/strong&gt;. Every piece of data is associated with a single &lt;strong&gt;unique hash&lt;/strong&gt;. There should be no other data associated with the same hash. We need these hashes to be unique for every piece of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We also need these hashes to be of the &lt;strong&gt;same length&lt;/strong&gt; regardless of the data size. Even if the data ranges from a simple text file to a whole 3-hour long movie, the length of the hashes must be the same in every case.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sounds cool I know. How does SHA256 do this? I'm glad you asked. I have no clue. For all I know it could be a magical box given to devs by a wizard who rides unicorns. So IPFS takes these Hashes and uses them as CIDs, to identify and address data.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to use IPFS for storing your data
&lt;/h2&gt;

&lt;p&gt;Protocol Labs has created desktop applications to use IPFS. You can find an installation guide for your operating system from their docs &lt;a href="https://ipfs.tech/#install" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The resources for using this app are widely available and it's not the scope of this article.&lt;/p&gt;

&lt;p&gt;On the same page, you might notice a JS implementation of IPFS called &lt;strong&gt;js-ipfs&lt;/strong&gt;. That's what the rest of this article is about.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is an IPFS API/Gateway
&lt;/h2&gt;

&lt;p&gt;Picture a decentralized network of nodes. The way for us to connect to this network is by using HTTP gateways. These gateways are made up of a &lt;strong&gt;protocol&lt;/strong&gt;, a &lt;strong&gt;hostname&lt;/strong&gt; and a &lt;strong&gt;port&lt;/strong&gt;. If the gateway looks like &lt;code&gt;http://localhost:5001&lt;/code&gt; then the protocol is &lt;code&gt;https&lt;/code&gt;, the hostname is &lt;code&gt;localhost&lt;/code&gt; and the port is &lt;code&gt;5001&lt;/code&gt;. These gateways can be used as APIs to access the network and write/read data.&lt;/p&gt;

&lt;p&gt;There are platforms like &lt;strong&gt;Infura&lt;/strong&gt; and &lt;strong&gt;Quicknode&lt;/strong&gt; which provide IPFS gateways. Sometimes they’re free (with restrictions) and sometimes they’re paid. The Infura IPFS public gateway was deprecated on 10th August 2022. That’s the reason you will find many other tutorials/resources using a gateway that looks like &lt;code&gt;ipfs.infura.io&lt;/code&gt; but it doesn’t work the same way anymore (if at all). Learn more about it &lt;a href="https://docs.infura.io/networks/ipfs/how-to/access-ipfs-content" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I guess this is a good time to inform you of &lt;a rel="noopener noreferrer nofollow" href="https://docs.ipfs.tech/how-to/address-ipfs-on-web"&gt;this warning&lt;/a&gt; if you’re thinking of making your own public gateway and exposing it.&lt;/p&gt;

&lt;p&gt;To use these platforms and their networks, we may need to include their secret keys in the headers of our requests &lt;a href="https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-http-client/README.md#infura-header" rel="noopener noreferrer"&gt;kinda like this&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So these HTTP gateways come in different types/formats and can look different. These gateways can also have different levels of security. You can explore everything about these gateways on &lt;a href="https://docs.ipfs.tech/concepts/ipfs-gateway/#gateway-types" rel="noopener noreferrer"&gt;this page&lt;/a&gt; but beginners don’t need to understand all of this.&lt;/p&gt;

&lt;p&gt;You can also view the list of all public gateways available for you to use on &lt;a href="https://ipfs.github.io/public-gateway-checker/" rel="noopener noreferrer"&gt;this page&lt;/a&gt;. It is provided by Protocol Labs.&lt;/p&gt;

&lt;p&gt;I should mention there is also a way to use the Kubo RPC API (&lt;a href="https://youtu.be/MdaGuP6-bKs" rel="noopener noreferrer"&gt;What is an RPC API?&lt;/a&gt;) for building JS apps using the Go implementation but I’m not gonna go into the details of it here. We will learn to set it up with Docker further down in this article. However, I am providing detailed resources about this for interested readers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://github.com/ipfs/js-kubo-rpc-client" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.ipfs.tech/reference/kubo/rpc/" rel="noopener noreferrer"&gt;IPFS docs&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Javascript packages for IPFS
&lt;/h2&gt;

&lt;p&gt;There is a library called &lt;a href="https://github.com/ipfs/js-ipfs" rel="noopener noreferrer"&gt;&lt;strong&gt;js-ipfs&lt;/strong&gt;&lt;/a&gt; (sometimes used through &lt;a href="https://www.npmjs.com/package/ipfs-http-client" rel="noopener noreferrer"&gt;&lt;strong&gt;ipfs-http-client&lt;/strong&gt;&lt;/a&gt;) but now it’s deprecated and was very recently replaced by &lt;a href="https://www.npmjs.com/package/helia" rel="noopener noreferrer"&gt;&lt;strong&gt;Helia&lt;/strong&gt;&lt;/a&gt;. Most of the resources/tutorials that you find on the web for IPFS will likely be using js-ipfs, which is why all this information looks so confusing to complete beginners.&lt;/p&gt;

&lt;p&gt;Getting started with Helia is simple and you don’t need to do much setup/configurations to see your app running. Check out the &lt;a href="https://github.com/ipfs-examples/helia-examples" rel="noopener noreferrer"&gt;helia-examples&lt;/a&gt; repo and find the right starter for your stack. For react-based web apps, I recommend the &lt;strong&gt;helia-nextjs&lt;/strong&gt; example.&lt;/p&gt;

&lt;p&gt;The fundamental way to create an IPFS node using Helia is to call the &lt;code&gt;createHelia()&lt;/code&gt; function. It will return to you a node that you can use to access a public network through the &lt;code&gt;ipfs.io&lt;/code&gt; gateway by default. You can pass parameters to this function to use different gateways or your own local gateway (meaning localhost).&lt;/p&gt;

&lt;p&gt;If you use the default gateway, the data you upload to the network will be accessible on &lt;code&gt;https://ipfs.io/ipfs/${cid}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;How exactly you upload this data to the network using Helia is much more complicated than it was by calling a simple &lt;code&gt;add()&lt;/code&gt; function in js-ipfs. We need to create a filesystem object and an encoder object manually. Then we can share data with IPFS… by using Uint8 iterables and asynchronous for loops 💀 (yeah I know this was supposed to be a no-jargon guide but Helia doesn’t exactly go easy on us)&lt;/p&gt;

&lt;p&gt;Given how new Helia is, the proper documentation and support for it is probably still underway but you can find almost all the things you need as a beginner to do the basic stuff. And I will most likely create another post focusing only on Helia and everything I learn about it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Creating a local IPFS gateway using Docker
&lt;/h2&gt;

&lt;p&gt;If you are interested in running a private network for your app development and don’t want to use a public gateway then follow along.&lt;/p&gt;

&lt;p&gt;You can also &lt;a rel="noopener noreferrer nofollow" href="https://docs.ipfs.tech/install/run-ipfs-inside-docker"&gt;check out the IPFS docs&lt;/a&gt; for installing Kubo inside Docker if you prefer. The below steps are what worked for me.&lt;/p&gt;

&lt;p&gt;First, you need to install docker on your machine. Then add the following 3 files to your working directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;docker-compose.yml&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3"&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;ipfs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ipfs/go-ipfs:v0.12.1&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;IPFS_SWARM_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/key/swarm/psk/1.0.0/&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;/base16/&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;${IPFS_SWARM_KEY}"&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;5001:5001"&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8089:8080"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./local-data/ipfs:/data/ipfs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;setup.sh&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;".env"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Generating IPFS swarm key..."&lt;/span&gt;
    &lt;span class="nv"&gt;GENERATED_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;docker run &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; mattjtodd/ipfs-swarm-key-gen | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Copying environment variables"&lt;/span&gt;
    &lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env

    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Setting swarm key"&lt;/span&gt;
    &lt;span class="nb"&gt;sed&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"s/IPFS_SWARM_KEY=/IPFS_SWARM_KEY=&lt;/span&gt;&lt;span class="nv"&gt;$GENERATED_KEY&lt;/span&gt;&lt;span class="s2"&gt;/"&lt;/span&gt; .env
&lt;span class="k"&gt;fi
&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Setup complete (delete .env and run again to redo setup)"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;.example.env&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# must be set by running setup.sh&lt;/span&gt;
&lt;span class="nv"&gt;IPFS_SWARM_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re on Windows then you also need to install &lt;a href="https://learn.microsoft.com/en-us/windows/wsl/install" rel="noopener noreferrer"&gt;WSL2&lt;/a&gt; along with &lt;a href="https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10" rel="noopener noreferrer"&gt;Ubuntu&lt;/a&gt;, and also the &lt;a href="https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701" rel="noopener noreferrer"&gt;terminal&lt;/a&gt; from the Microsoft store to connect to Ubuntu. Make sure Ubuntu is enabled in the docker desktop settings under “resources”.&lt;/p&gt;

&lt;p&gt;If you’re on Linux or Mac then just use the terminal and save those files anywhere you want. The steps for you guys will be much simpler.&lt;/p&gt;

&lt;p&gt;For Windows users, open the Ubuntu terminal and type &lt;code&gt;code .&lt;/code&gt; to open VScode connected to the Ubuntu distro. There, create a temporary folder &lt;code&gt;tempDir&lt;/code&gt; in the root and move the above 3 files into it.&lt;/p&gt;

&lt;p&gt;In the terminal run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;tempDir/
bash setup.sh
docker compose up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command will generate the swarm key and store it in a &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The third command will start the environment which can be accessed from the port &lt;code&gt;5001&lt;/code&gt;. If the daemon doesn't run, make sure the &lt;code&gt;.env&lt;/code&gt; file has been created and the swarm key has been set properly.&lt;/p&gt;

&lt;p&gt;Now if you’re using ipfs-http-client, you can simply call the &lt;code&gt;create()&lt;/code&gt; function and start using it because the default gateway in this package is &lt;code&gt;http://localhost:5001&lt;/code&gt; so it should connect automatically. Follow &lt;a href="https://www.npmjs.com/package/ipfs-http-client" rel="noopener noreferrer"&gt;these docs&lt;/a&gt; to know more about it.&lt;/p&gt;

&lt;p&gt;To know more about the docker images of IPFS, check out &lt;a href="https://hub.docker.com/r/ipfs/go-ipfs" rel="noopener noreferrer"&gt;their page on Docker Hub&lt;/a&gt;. As this page says, go-ipfs is a legacy name and you can also &lt;a href="https://hub.docker.com/r/ipfs/kubo/" rel="noopener noreferrer"&gt;use Kubo instead&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Something I don't yet know
&lt;/h2&gt;

&lt;p&gt;Even after as much research as I did, there are a couple of things I haven't been able to fully figure out (yet) which is why I haven't discussed them in this article.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Connecting to localhost using Helia
&lt;/h3&gt;

&lt;p&gt;I am looking for the right parameters to pass in the &lt;code&gt;createHelia()&lt;/code&gt; function that will connect me to the local network instead of the default &lt;code&gt;ipfs.io&lt;/code&gt; gateway, I have not been successful in doing this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Connecting to a public gateway using js-ipfs
&lt;/h3&gt;

&lt;p&gt;The opposite of the above problem. I have not been successful in connecting to any public gateway using &lt;strong&gt;js-ipfs&lt;/strong&gt; or &lt;strong&gt;ipfs-http-client&lt;/strong&gt; (both with the latest versions because there are several resources and codesandboxes using way older versions of these packages)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The end
&lt;/h2&gt;

&lt;p&gt;Welp, that's the end of it.&lt;/p&gt;

&lt;p&gt;Everything discussed in this article was just the basics of setting it up and oversimplified theory. The aim of this article was to make it easier for beginners to understand what's going on and give some context on the background of IPFS as it stands in 2023. We have barely scratched the surface of this innovative file system.&lt;/p&gt;

&lt;p&gt;As mentioned earlier, I am completely new to the concept of Web3 and decentralization. I encourage you to get into discussions in the comments and provide any tips and feedback. If you can share any more information regarding these packages, it would be a great bonus for everyone.&lt;/p&gt;

&lt;p&gt;Let me know if you'd like me to cover any specific topics or talk more about the black magic that is SHA256. You can also &lt;a href="https://hashnode.com/@Electromorphous" rel="noopener noreferrer"&gt;follow me&lt;/a&gt; and &lt;a href="https://electroblog.hashnode.dev/newsletter" rel="noopener noreferrer"&gt;subscribe to the Electroblog newsletter&lt;/a&gt; to be notified when I publish a new article.&lt;/p&gt;




</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
