<?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: Akhand Patel</title>
    <description>The latest articles on DEV Community by Akhand Patel (@akhand3108).</description>
    <link>https://dev.to/akhand3108</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%2F192322%2F75e53d5e-4d03-42c6-9cfd-4d6739caa029.jpg</url>
      <title>DEV Community: Akhand Patel</title>
      <link>https://dev.to/akhand3108</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/akhand3108"/>
    <language>en</language>
    <item>
      <title>Object.keys ( ), values ( ), entries( )</title>
      <dc:creator>Akhand Patel</dc:creator>
      <pubDate>Sun, 30 May 2021 14:17:30 +0000</pubDate>
      <link>https://dev.to/akhand3108/object-keys-values-entries-2h36</link>
      <guid>https://dev.to/akhand3108/object-keys-values-entries-2h36</guid>
      <description>&lt;p&gt;As the title suggests in this post we will try to understand these static functions in the ** Object ** Class. These functions will likely save you a lot of time in future. Let's take a look at each of them.&lt;/p&gt;

&lt;p&gt;We will use the following object in all the code examples further&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myObj = {email: "srockwell0@exblog.jp",
first_name: "Siusan",
gender: "Bigender",
id: 1,
ip_address: "86.247.200.113",
last_name: "Rockwell"}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Object.keys()
&lt;/h1&gt;

&lt;p&gt;According to MDN, &lt;br&gt;
*The Object.keys() method returns an array of a given object's own enumerable property names, iterated in the same order that a normal loop would. *&lt;/p&gt;

&lt;p&gt;Let's break this down, this method takes an object as an argument and return an array consisting of all the property names(keys) of that object. &lt;br&gt;
If we pass our &lt;code&gt;myObj&lt;/code&gt; as argument then we will get the following array&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(Object.keys(myObj));

// output: Array ["email", "first_name", "gender", "id", "ip_address", "last_name"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Object.values()
&lt;/h1&gt;

&lt;p&gt;According to MDN,&lt;br&gt;
*The Object.values() method returns an array of a given object's own enumerable property values, in the same order as that provided by a for...in loop. *&lt;/p&gt;

&lt;p&gt;Let's break this down, this method takes an object as an argument and return an array consisting of all the values associated with the keys of that object. &lt;br&gt;
If we pass our &lt;code&gt;myObj&lt;/code&gt; as argument then we will get the following array&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(Object.values(myObj));

// output: Array(6) ["srockwell0@exblog.jp", "Siusan", "Bigender", 1, "86.247.200.113", "Rockwell"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Object.entries()
&lt;/h1&gt;

&lt;p&gt;According to MDN,&lt;br&gt;
*The Object.entries() method returns an array of a given object's own enumerable string-keyed property [key, value] pairs, in the same order as that provided by a for...in loop. *&lt;/p&gt;

&lt;p&gt;This one looks scary, but fear not, help is here. This function same as others takes up an object but returns an array of arrays. The inner arrays at index 0  have the key and at index 1 the value associated with it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(Object.entries(myObj));

// output: (6) [Array(2), Array(2), Array(2), Array(2), Array(2), Array(2)]


0: (2) ["email", "srockwell0@exblog.jp"]
1: (2) ["first_name", "Siusan"]
2: (2) ["gender", "Bigender"]
3: (2) ["id", 1]
4: (2) ["ip_address", "86.247.200.113"]
5: (2) ["last_name", "Rockwell"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope we were able to clear some doubts together.&lt;br&gt;
 Thank you for your time and see you in the next one.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title> IP Addresses, An Intro for  Beginners</title>
      <dc:creator>Akhand Patel</dc:creator>
      <pubDate>Sat, 29 May 2021 10:40:33 +0000</pubDate>
      <link>https://dev.to/akhand3108/ip-addresses-an-intro-for-beginners-4ghj</link>
      <guid>https://dev.to/akhand3108/ip-addresses-an-intro-for-beginners-4ghj</guid>
      <description>&lt;p&gt;It may be near to impossible if you are reading this and have never came across the term IP address before. But for beginners it may be a bit difficult to understand them. In this blog, we would try to understand IP addresses and their types. &lt;/p&gt;

&lt;h1&gt;
  
  
  What is IP address?
&lt;/h1&gt;

&lt;p&gt;As most of you may know, the major part of the modern internet uses a protocol called Internet Protocol(IP) to communicate with other hosts(computers) in the network. Yeah, that's  where the IP part comes from in IP Address. The address part is a unique address to identify your device on the internet or local network. The internet needs a way to  differentiate between all the devices and that's what the IP address is used for and hence is an integral part of the internet. The IP address is assigned by your ISP when you connect to the internet through them.&lt;/p&gt;

&lt;h2&gt;
  
  
  IP address representation
&lt;/h2&gt;

&lt;p&gt;An IP address is a string of numbers and characters of fixed length separated by periods. IP address are not random  but are assigned from a predetermined pool of strings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Are IP address permanent?
&lt;/h2&gt;

&lt;p&gt;Not really, they may change frequently your ISP may allocate you a new IP address whenever they feel so. Corporates!!! I feel you. But it may also change when you leave your home and connect to that Starbucks' Wi-Fi or any other network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need IP?
&lt;/h2&gt;

&lt;p&gt;The same reason you need a mobile number or a house address.&lt;br&gt;
So that people can communicate with you easily.  If you ant to search something on Google, then firstly your browser needs to know what's Google IP address, but then why do you need one? Because Google needs to know where to send the data back. The IP address allow you to be differentiated from billions of devices connected to the internet.&lt;/p&gt;


&lt;h2&gt;
  
  
  Types of IP addresses
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Internet Protocol Version 4 address (&lt;strong&gt;IPV4&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Internet Protocol Version 6 address (&lt;strong&gt;IPV6&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The IPv4 Address
&lt;/h2&gt;

&lt;p&gt;This was first defined in 1981 and is still the mostly used type of IP address. IPV4 address are  4 bytes(32 bits) long. Due to conventions or sake of readability, each single byte in the address also called an octet is written in dotted decimal representation. The dot separates each octet of address and each octet is written in decimal system. Let's take an example of IPV4 address&lt;br&gt;
 &lt;code&gt;11000000.10101000.00000001.00000000&lt;/code&gt;&lt;br&gt;
octets separated by dot&lt;br&gt;
in decimal convention&lt;/p&gt;


&lt;center&gt;
&lt;br&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 192.168.1.0 
&lt;/code&gt;&lt;/pre&gt;



&lt;/center&gt;

&lt;h3&gt;
  
  
  Problems with IPV4
&lt;/h3&gt;

&lt;p&gt;IPv4 has been around for a long time and so has humans. Humans multiply but ipv4 addresses don't. The format for IPv4 wasn’t designed to handle the sheer number of IP addresses. So we reached a point where the no. of devices connected to the internet was soon going to be more than all the ipv4 addresses(which are just 2&lt;sup&gt;32&lt;/sup&gt; = 4,294,967,296). So we were running out of ipv4 address.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution to the Depleting Addresses
&lt;/h3&gt;

&lt;p&gt;Researchers devised some strategies for the meantime like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Classless Inter Domain Routing (CIDR)&lt;/li&gt;
&lt;li&gt;Private Address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But these were never intended as long term solutions. So finally researches came up with the new type of addresses called IPV6 addresses. Goodbye IPV4 and welcome IPV6 (not really though, we are going through a transitioning period both are currently in use)&lt;/p&gt;

&lt;h2&gt;
  
  
  IPV6 addresses
&lt;/h2&gt;

&lt;p&gt;IPv6 was not just designed for today's need but for future needs also. The ipv4 supports approximately 4.3 billions addresses whereas ipv6 supports theoretically approximately 340 trillion, trillion, trillion addresses. So for the foreseeable future we may never run out of IP addresses. How does IPv6 support such a large no of addresses, well in place of using just 4 bytes (32 bits) as in ipv4 it uses 16 bytes (128 bits) for the string of addresses.&lt;/p&gt;

&lt;p&gt;IPv6 is written in hexadecimal notation, separated into 8 groups of 16 bits by the colons. An IPv6 address representation looks like this:&lt;br&gt;
&lt;/p&gt;
&lt;center&gt;
&lt;br&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2001:0db8:85a3:0000:0000:8a2e:0370:7334
&lt;/code&gt;&lt;/pre&gt;



&lt;/center&gt;

&lt;h2&gt;
  
  
  What am I using currently?
&lt;/h2&gt;

&lt;p&gt;Most probably you are allotted both type of addresses on your connection. It is worth noting that these protocols are not designed to be inter-operable, but certain technologies allow this interoperability. If you wish to know what's your IP address, you can go &lt;a href="https://whatismyipaddress.com/"&gt;here&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This is my second post here, it would be very helpful of you could provide a review or suggestion on this post. Thank you&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>networks</category>
      <category>ipv4</category>
      <category>ipv6</category>
    </item>
    <item>
      <title>Git and Github, An Intro for Beginners</title>
      <dc:creator>Akhand Patel</dc:creator>
      <pubDate>Sun, 03 May 2020 15:36:35 +0000</pubDate>
      <link>https://dev.to/akhand3108/git-and-github-a-intro-for-beginners-a25</link>
      <guid>https://dev.to/akhand3108/git-and-github-a-intro-for-beginners-a25</guid>
      <description>&lt;p&gt;Most of the developers use GitHub or any other Git Client in their development cycle. But have you always wondered what is git and why do they use it? &lt;br&gt;
In this post, let’s look at the basics of git and how easy is it to create your first repo on GitHub. &lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;What is Git?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Git is an open-source project developed in 2005 by Linus Torvalds (Yes, you guessed it right, the famous creator of Linux Operating System). It is a &lt;strong&gt;Distributed Version Control System&lt;/strong&gt;. &lt;br&gt;
That sounded like a charm straight out of J. K. Rowling’s Book. Let me explain it in muggles’ English. &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Version Control System (VCS)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;VCS is a tool that allows users to track changes in the content. It keeps track of various changes made to the content as people and multiple teams collaborate. &lt;br&gt;
In layman terms, Think of the content as a book you and your friend are writing together, you both come with different ideas for the arc of your character and make various versions of the story over time as characters increase so does multiple storylines, it would be a nightmare to keep everything in order, this is where VCS comes into play, it keeps track of following things &lt;br&gt;
-What changes were made? &lt;br&gt;
-Who made the changes? &lt;br&gt;
-When were the changes made? &lt;/p&gt;

&lt;p&gt;If you want to go back to the storyline where your protagonist doesn’t die, you can just revert to it. You can &lt;strong&gt;&lt;em&gt;Merge&lt;/em&gt;&lt;/strong&gt; your friend’s ideas into your version. If someone screws up, he can just compare with the previous versions and rectify the mistake without disturbing the others. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt; - It is like a folder for your project’s files. It contains all of your project files and their detailed history.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Distributed Version Control System (DVCS)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;DVCS means that the code isn’t just hosted on a single server or system but also distributed across various systems. This means that each developer has a copy of the code on his local system. &lt;br&gt;
Git has a remote repository stored on a server and a local repository stored on the developer’s computer. Developers don’t need a constant central connection to the remote repository and can collaborate suiting their timetable. Each developer has a transparent history of changes, who made the changes and when. &lt;br&gt;
So now we have the basic introduction of Git, let’s look at GitHub. &lt;/p&gt;


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

&lt;p&gt;I read the following line somewhere on the internet and to me; it is one of the best definitions for GitHub. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“&lt;em&gt;What Pornhub is to Porn, GitHub is to Git&lt;/em&gt;” &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Jokes apart think of it in this way, when you use git locally you can only manage your local code but that is rarely the case, mostly you have to collaborate with other people or teams and for that, you need to have a remote repository setup on the cloud, here GitHub fits in.&lt;/p&gt;

&lt;p&gt;GitHub is a git hosting repository service, but it adds many of its features to the core git. Git is a command-line tool but GitHub is an interactive website that also allows some unique features on top of Git like GitHub Flow (Sounds like an excellent idea for the next post). There is a community of over 15 million developers on GitHub.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Create your First Repo
&lt;/h2&gt;

&lt;p&gt; Are you excited to create your first repository from scratch? &lt;br&gt;
But first, install git on your system from &lt;a href="https://git-scm.com/downloads"&gt;here&lt;/a&gt; and create a GitHub account if you haven’t. &lt;/p&gt;

&lt;p&gt;Let’s Begin Now!! &lt;/p&gt;

&lt;p&gt;Important: &lt;em&gt;The following instructions are for bash terminal&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;-Create a directory for your project using the &lt;em&gt;mkdir&lt;/em&gt; command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir firstProject 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-Go into the new directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ./firstProject/ 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-Initialize the Git repo using git init&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-Create a file now&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo “This is my first line of text in file” &amp;gt; readme.md 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;-Add the files to git. After this command, the Git will keep track of the changes made to the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add readme.md 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Commit (save) the changes to git, the command tells to save the changes along with the message “initial commit”
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit -m “initial commit” 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You now have a local git repository. You can use it locally, but I would rather host it on my GitHub. &lt;/p&gt;

&lt;h1&gt;
  
  
  Connecting it to GitHub
&lt;/h1&gt;

&lt;p&gt;-Go to GitHub, &lt;br&gt;
-Sign in to your account &lt;br&gt;
-Click on the new repository button (Hint: It has a green background) &lt;br&gt;
-Enter the repo’s name “&lt;em&gt;firstProject&lt;/em&gt;” &lt;br&gt;
-Click Create Repository &lt;br&gt;
You would see sets of instructions on the page, follow the second one -&lt;em&gt;or push an existing repository...&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git remote add origin https://github.com/yourUsername/firstProject.git 
git push -u origin master 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first command adds the remote address of the repository to the Git and the second command tells the system to push (send) local repo to the remote origin repo.&lt;/p&gt;

&lt;p&gt;Voila!! You have successfully hosted your first repo on GitHub.Give yourself a treat today, you deserve it.&lt;/p&gt;

&lt;p&gt;This is my first post on any platform, so kindly share your reviews and suggestions in the comments. I would very much like to improve. I guess we all learned something today. &lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
