<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: XING</title>
    <description>The latest articles on Forem by XING (@limxingzhi).</description>
    <link>https://forem.com/limxingzhi</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%2F53425%2F93f7473f-cef7-4fd3-97dc-49129af5a9a7.png</url>
      <title>Forem: XING</title>
      <link>https://forem.com/limxingzhi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/limxingzhi"/>
    <language>en</language>
    <item>
      <title>Getting Name from Latitude and Longitude - Google Geocode API</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Mon, 02 Nov 2020 04:38:15 +0000</pubDate>
      <link>https://forem.com/limxingzhi/utility-for-google-geocode-api-147l</link>
      <guid>https://forem.com/limxingzhi/utility-for-google-geocode-api-147l</guid>
      <description>&lt;p&gt;I wrote this utility function that tells me the approximate location given a latitude and longitude in the form of a promise holding a string. You just have to put in the latitude, longitude and API key. It also contains a cache holding onto all queried latitude and longitude.&lt;/p&gt;

&lt;h1&gt;
  
  
  How does it work?
&lt;/h1&gt;

&lt;p&gt;The utility function to query the API is an async function for obvious reasons (we do not want the main thread to wait for the response). I used axios to issue a HTTP GET request to the API endpoint, and parsed the response to get the formatted address. This is then returned as an awaited string. The end result? We get a Promise that returns a String which we can then handle and set it to the state accordingly. Since the demo is written in React, changing the state will trigger a rerender of the component and our new string is now displayed.&lt;br&gt;
&lt;em&gt;&lt;a href="https://codesandbox.io/s/google-geocoding-api-demo-ipyfx?file=/src/utils.js"&gt;https://codesandbox.io/s/google-geocoding-api-demo-ipyfx?file=/src/utils.js&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/ipyfx"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Ideally, the API key should be loaded from the environment, but hey, this is just a demo. I also did zero error handling for the same reason :)&lt;/p&gt;

&lt;p&gt;You can get the API key and documentation from the official google site:&lt;br&gt;
&lt;em&gt;&lt;a href="https://developers.google.com/maps/documentation/geocoding/overview"&gt;https://developers.google.com/maps/documentation/geocoding/overview&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>google</category>
      <category>api</category>
      <category>utility</category>
      <category>geocode</category>
    </item>
    <item>
      <title>What is Web Components</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Wed, 05 Aug 2020 11:50:35 +0000</pubDate>
      <link>https://forem.com/limxingzhi/what-is-web-components-3k7c</link>
      <guid>https://forem.com/limxingzhi/what-is-web-components-3k7c</guid>
      <description>&lt;p&gt;While being the future of web development, web components are also my new favorite web paradigm and also one of the least talked about. It grants many features to developers and allows us to write extremely reusable components that are declarative and easy to consume. Let's take a look at it today. &lt;/p&gt;

&lt;h1&gt;
  
  
  The Specification
&lt;/h1&gt;

&lt;p&gt;Web components is a suite of standard web specifications. Their existence means developers can create light-weight, reusable and powerful UI components for the web. Consuming a web component could be as simple as importing a JavaScript module and writing a HTML tag. The main specifications are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements"&gt;Custom Elements&lt;/a&gt; - allows developers to write custom HTML tags (more on this later)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM"&gt;Shadow DOM&lt;/a&gt; - provides a black box for developers to write obstructed logic&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_templates_and_slots"&gt;HTML Template&lt;/a&gt; - kinda cool, but it has limited use case&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will talk mainly about Custom Elements today since it is the pillar that holds up the web component specifications.&lt;/p&gt;

&lt;h1&gt;
  
  
  Some things about Custom Elements
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Platform Agnostic 👍
&lt;/h2&gt;

&lt;p&gt;Custom elements are implemented with a JavaScript class and consumed by simply writing a HTML tag. This means you can use them anywhere. You can use them on your bare index.html file or within &lt;a href="https://angular.io/"&gt;AngularJS&lt;/a&gt;, &lt;a href="https://reactjs.org/"&gt;ReactJS&lt;/a&gt;, &lt;a href="https://vuejs.org/"&gt;VueJS&lt;/a&gt;, literally anything else that runs on a .html file.&lt;/p&gt;

&lt;h2&gt;
  
  
  No tooling required 👍
&lt;/h2&gt;

&lt;p&gt;In essence, everything on the Front-end can be categorized into 3 types of logic: HTML, JavaScript and CSS styles. Custom elements embrace this sense of minimalism. To write a custom element, all we need is a JS class to declare a class (the implementation), a single line of JavaScript to define the custom element (the declaration) and calling &lt;code&gt;&amp;lt;my-new-custom-element /&amp;gt;&lt;/code&gt; on the index.html file (the consumption). Unlike React or Angular, the tooling is optional. We can introduce tooling for optimization or specify types or linting, but they are essentially optional.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy consumption 👍
&lt;/h2&gt;

&lt;p&gt;Since custom elements are just user-defined HTML tags, they are incredibly easy to consume. We can just use them as normal HTML elements, passing configurations as attributes and not having to worry about the underlying complexity and implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Too lightweight 👎
&lt;/h2&gt;

&lt;p&gt;Out of the box, custom elements only offers &lt;a href="https://ultimatecourses.com/blog/lifecycle-hooks-in-web-components"&gt;a handful of lifecycle events&lt;/a&gt;. This is a very slim selection as compared to the React components of the world. To combat this, tooling such as &lt;a href="https://stenciljs.com/"&gt;StencilJS&lt;/a&gt; and &lt;a href="https://www.polymer-project.org/"&gt;Polymer&lt;/a&gt; exist to provide a higher-level API while being very performant since they eventually compiles down to a Custom Element.&lt;/p&gt;

&lt;h1&gt;
  
  
  Who else is using Web components?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Github
&lt;/h2&gt;

&lt;p&gt;In a blog post from 2018 titled &lt;a href="https://github.blog/2018-09-06-removing-jquery-from-github-frontend/"&gt;"Removing jQuery from GitHub.com frontend"&lt;/a&gt;, GitHub engineers talked about how &lt;a href="https://github.blog/2018-09-06-removing-jquery-from-github-frontend/#custom-elements"&gt;certain UI widgets&lt;/a&gt; are implemented with Web Components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ionic framework and design systems in general
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ionicframework.com/docs#framework-compatibility"&gt;Digital design systems&lt;/a&gt; are the perfect use case for web components. Once it is written, the individual UI components should as much as possible, across as many platforms as feasible. Writing or exporting them to Web Components means they can be used anywhere regardless of front end framework. I wrote a piece about my internship experience at Staizen and mentioned how they utilize StencilJS (a web component based abstraction) to write their design system while exporting the components to ReactJS apps. Check it out &lt;a href="https://xingzhi.dev/blog/what-did-i-do-this-past-summer-break/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  How future proof is this?
&lt;/h1&gt;

&lt;p&gt;Front-end frameworks are constantly changing. This is one of the biggest gotcha that all front-end developers face. As a consequence, we often see developers showcasing their blogs on &lt;a href="https://dev.to/"&gt;dev.to&lt;/a&gt;, talking about how they write their blogs without a JavaScript framework. I understand where they are coming from and this is where web components shine. Since web components are browser specifications adopted by &lt;a href="https://w3c.github.io/webcomponents/"&gt;W3C&lt;/a&gt; and &lt;a href="https://wiki.whatwg.org/wiki/Component_Model"&gt;WHATWG&lt;/a&gt;, they are here to stay. This means custom elements I write today will still be maintainable for quite a while with minimal effort. I cannot say the same about my tooling-heavy React applications. &lt;/p&gt;




&lt;h1&gt;
  
  
  Additional Reads
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/fundamentals/web-components/customelements"&gt;https://developers.google.com/web/fundamentals/web-components/customelements&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://css-tricks.com/an-introduction-to-web-components/"&gt;https://css-tricks.com/an-introduction-to-web-components/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.robinwieruch.de/web-components-tutorial"&gt;https://www.robinwieruch.de/web-components-tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stenciljs.com/docs/introduction"&gt;https://stenciljs.com/docs/introduction&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stenciljs.com/docs/overview"&gt;https://stenciljs.com/docs/overview&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This blog post was originally posted on &lt;a href="https://xingzhi.dev/blog/what-is-web-components/"&gt;xingzhi.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webcomponents</category>
      <category>customelement</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
    <item>
      <title>VSCode mass extension installation</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Wed, 20 May 2020 11:51:52 +0000</pubDate>
      <link>https://forem.com/limxingzhi/vscode-mass-extension-installation-on</link>
      <guid>https://forem.com/limxingzhi/vscode-mass-extension-installation-on</guid>
      <description>&lt;p&gt;How many ways are there to install a couple of public essential VSCode solutions for new members of a development team?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: ideally, the installation will be part of the onboarding process, so using workspaces is not very feasible since it is only restricted to one project.&lt;/em&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Publish/Use an extension pack on the market place
&lt;/h4&gt;

&lt;p&gt;Make an extension pack + publish it on the marketplace&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup"&gt;https://code.visualstudio.com/blogs/2017/03/07/extension-pack-roundup&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.software.com/src/how-to-create-an-extension-pack-for-visual-studio-code"&gt;https://www.software.com/src/how-to-create-an-extension-pack-for-visual-studio-code&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;user can just search on the market place and install&lt;/td&gt;
&lt;td&gt;fully public&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;requires the team to maintain a VSCode market place account&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Run a command
&lt;/h4&gt;

&lt;p&gt;VSCode has a &lt;code&gt;--install-extension&lt;/code&gt; option on the CLI where you can install extensions with their marketplace id.&lt;/p&gt;

&lt;p&gt;example: &lt;code&gt;code --install-extension dbaeumer.vscode-eslint --install-extension dbaeumer.vscode-eslint&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/docs/editor/command-line#_working-with-extensions"&gt;https://code.visualstudio.com/docs/editor/command-line#_working-with-extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0 maintenance of any accounts or code&lt;/td&gt;
&lt;td&gt;VSCode needs to exist on the system PATH (i.e. zip versions need extra work)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;Let's discuss any other options that exist!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Chaining terminal commands in PowerShell</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Wed, 20 May 2020 05:39:47 +0000</pubDate>
      <link>https://forem.com/limxingzhi/chaining-terminal-commands-in-powershell-5hma</link>
      <guid>https://forem.com/limxingzhi/chaining-terminal-commands-in-powershell-5hma</guid>
      <description>&lt;p&gt;TIL, you can chain multiple commands in PowerShell through a semicolon ';'.&lt;/p&gt;

&lt;p&gt;example, to clone a repo and do &lt;code&gt;npm install&lt;/code&gt; and &lt;code&gt;npm start&lt;/code&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone example.com/repo.git ./awesome-repo;cd ./awesome-repo;npm install;npm start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>powershell</category>
      <category>terminal</category>
    </item>
    <item>
      <title>What is hydration?</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Wed, 20 May 2020 04:19:43 +0000</pubDate>
      <link>https://forem.com/limxingzhi/what-is-hydration-g57</link>
      <guid>https://forem.com/limxingzhi/what-is-hydration-g57</guid>
      <description>&lt;p&gt;I came across the term "hydration" while reading up on redux. Anyone mind explaining to me the difference between hydration and serialization + parsing?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>What is hydration?</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Wed, 20 May 2020 04:19:05 +0000</pubDate>
      <link>https://forem.com/limxingzhi/what-is-hydration-150i</link>
      <guid>https://forem.com/limxingzhi/what-is-hydration-150i</guid>
      <description>&lt;p&gt;I came across the term "hydration" while reading up on redux. What is the difference between hydration and serialization + parsing?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Not a git tutorial</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Mon, 04 May 2020 07:45:38 +0000</pubDate>
      <link>https://forem.com/limxingzhi/not-a-git-tutorial-52ap</link>
      <guid>https://forem.com/limxingzhi/not-a-git-tutorial-52ap</guid>
      <description>&lt;p&gt;Git is the dominant version control system today. Why did Linus Torvalds write it back in 2005, what were the problems he was trying to solve, how does it have such huge market share and what are some of its design considerations?&lt;/p&gt;

&lt;p&gt;This will not be a tutorial about git, instead, it will be a summary of the knowledge that I know about git.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is the purpose of Version Control?
&lt;/h1&gt;

&lt;p&gt;There are 3 primary objectives of Version Control.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Work is done concurrently, not sequentially&lt;/li&gt;
&lt;li&gt;Work between people has to have minimal race conditions&lt;/li&gt;
&lt;li&gt;We want to see the history, who did what, when and why&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Work is done concurrently, not sequentially.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The same code base has to be worked on by multiple developers at the same time. Developers in Singapore and Switzerland has to be able to work on the same code base independently of each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Work between people has to have minimal race conditions.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The same pair of developers in Singapore and Switzerland have to be able to put their code together when their day ends. The code should work well and without errors. If there are significant and breaking changes, the Version Control software should be able to resolve these conflicts easily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We want to see the history.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Every line of code should be traceable to a developer, with the time it was written alongside the consideration and circumstances behind the piece of code.&lt;/p&gt;

&lt;h1&gt;
  
  
  Git vs Other Version Control Systems Today
&lt;/h1&gt;

&lt;p&gt;Git has the largest market share in the version control category for many years. Due to its opensource nature, it has many more hosting providers, front-end client programs and is built into many tools such as IDEs (Integrated Development Environments) and CICD pipelines (Continuous Integration and Delivery). Most software developers will have to understand and use git to be proficient at their job, regardless of their software stack and area of expertise.&lt;/p&gt;

&lt;p&gt;The trailing Version Control Software is SVN, Apache Subversion. Adopting a Centralized model, it is architecturally different from the decentralized and distributed model from git. This comes with many trade-offs, making git a better option when trying to achieve the 3 primary objectives of version control.&lt;/p&gt;

&lt;h1&gt;
  
  
  What did Torvalds expect from a Version Control System?
&lt;/h1&gt;

&lt;p&gt;Linus Torvalds set out to write a Version Control System to manage the Linux Kernel. He was unsatisfied with the market offerings at that period in time. To manage such a complex project with thousands of developers, he had some requirements for his version control system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The system has to perform well when showing the difference between commits up to thousands of lines.&lt;/li&gt;
&lt;li&gt;Decentralized system - the user has to be able to clone the entire project locally.&lt;/li&gt;
&lt;li&gt;Trusting the code - history of the code must be verifiable.&lt;/li&gt;
&lt;li&gt;Branches have to be performant, easy to manage and local.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How does git represent code changes
&lt;/h1&gt;

&lt;p&gt;The entire git is a huge tree: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every commit is a node connected to a previous node.&lt;/li&gt;
&lt;li&gt;We can split away from the existing tree to create new a new branch.&lt;/li&gt;
&lt;li&gt;Each commit is an entire snapshot of the project.&lt;/li&gt;
&lt;li&gt;When you revert to a specific commit in the git tree, you get the entire project at that specific instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each commit (node in the tree) will have the following details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commit Hash - The repository goes through a hashing algorithm and generate a hash value. It acts as an ID for the commit and allows us to trust the history of the project.&lt;/li&gt;
&lt;li&gt;Commit Message - Every developer will write a succinct message to explain what they changed.&lt;/li&gt;
&lt;li&gt;Changes from the previous commit - Git provides a diff feature, allowing us to see changes line by line. Git also understands context. When we rename a file, git understands and acknowledges that; Rather than thinking we removed and added a new file with a different name, the diff will show that we renamed the file instead.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Every git tree is local
&lt;/h1&gt;

&lt;p&gt;A git tree refers to the entire repository of a project. Since the entire repository contains all snapshots of a project from the initial commit to the latest, it is effectively the entire tree if you also have all of the branches. Having a local tree brings many advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Work can be done offline.&lt;/li&gt;
&lt;li&gt;The changes you make can be vetted locally or externally before you submit it to the collaboration tree.&lt;/li&gt;
&lt;li&gt;You can make as many branches as you want; Since trees are local, branches are local too. That means all local branches will not be shared with the collaboration tree unless you want to.&lt;/li&gt;
&lt;li&gt;Every diff and branching operation is faster because no network access is required.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;This post was originally posted on &lt;a href="https://xingzhi.dev/blog/not-a-git-tutorial/"&gt;xingzhi.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>How does DNS work</title>
      <dc:creator>XING</dc:creator>
      <pubDate>Thu, 09 May 2019 06:49:11 +0000</pubDate>
      <link>https://forem.com/limxingzhi/how-does-dns-work-3k1i</link>
      <guid>https://forem.com/limxingzhi/how-does-dns-work-3k1i</guid>
      <description>&lt;p&gt;I was trying to explain the concept of a Domain Name Server to a friend who has very minimal networking background.&lt;/p&gt;

&lt;h1&gt;
  
  
  How does web pages work
&lt;/h1&gt;

&lt;p&gt;When you open a website like &lt;a href="//google.com"&gt;google.com&lt;/a&gt;, your browser will download the web page and render the content for you to see and interact.&lt;/p&gt;

&lt;h1&gt;
  
  
  Where do IP addresses come in
&lt;/h1&gt;

&lt;p&gt;When you key in a domain name (such as &lt;a href="//google.com"&gt;google.com&lt;/a&gt;), your computer does not understand where to find it. It relies on a phone book, a service known as Domain Name Server. Like a phone book, it translates the &lt;a href="//google.com"&gt;google.com&lt;/a&gt; to an actual IP address such as &lt;a href="//172.217.194.113"&gt;172.217.194.113&lt;/a&gt; where your browser will go in and download the web page before displaying it to you. Your browser does not know where is &lt;a href="//google.com"&gt;google.com&lt;/a&gt;, but it knows where to find &lt;a href="//172.217.194.113"&gt;172.217.194.113&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Where is this Domain Name Server
&lt;/h1&gt;

&lt;p&gt;All of that happens in the background, your computer interacts with other elements on the network and make that happen, all transparent to you (the user). Typically, the router provided by your ISP (Internet Service Provider) will point to a DNS that is hosted by your ISP. In some cases, the connection might be slower as compared to a public DNS. In other cases, the DNS you are trying to access might not have the domain you want due to piracy, security or censorship concerns set by the DNS host (the admin body of the DNS).&lt;/p&gt;

&lt;h1&gt;
  
  
  Why use a public DNS instead of the default
&lt;/h1&gt;

&lt;p&gt;There is generally no harm in using your default DNS provided by your ISP. As mentioned before, it could be slower, but it has most of the sites you will want to access. In some parts of the world, certain websites could be censored by a governing body for censorship or security concerns. Some do it at a DNS level and others do it at a &lt;a href="https://www.cisco.com/c/en/us/products/security/firewalls/what-is-a-firewall.html"&gt;firewall level&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In other use cases, the default DNS server might not be as efficient as a public DNS such as those from &lt;a href="https://1.1.1.1/"&gt;Cloudfare&lt;/a&gt; or &lt;a href="https://developers.google.com/speed/public-dns/"&gt;Google&lt;/a&gt;, thus serving results at a slower rate.&lt;/p&gt;

&lt;p&gt;DNS could be used to log your network activity. By mapping the user and the DNS results provided, the DNS provider could keep a log of all your network activity (there are other ways your ISP could do this, DNS is just one of the ways). Carefully choosing and using a public DNS could reduce the risk on this front.&lt;/p&gt;

&lt;h1&gt;
  
  
  Should all of us just rush out and change our DNS right now?
&lt;/h1&gt;

&lt;p&gt;In most countries, changing your DNS alone might not be enough to circumvent the censorship laws. For most home users, changing the DNS might not appear to improve your network speeds since the network will be bottle-necked elsewhere anyways (like the 6 year old WiFi access point).&lt;/p&gt;

&lt;p&gt;In summary, if you really need that slightly faster speeds brought by the Public DNS providers or the security promised by these providers, go ahead and change your DNS. Just like all network related configuration, make sure you fully understand the technology and proceed with caution.&lt;/p&gt;

&lt;p&gt;The scope of this article does not serve to provide as a guide to changing your DNS.&lt;/p&gt;

&lt;h1&gt;
  
  
  Credits
&lt;/h1&gt;

&lt;p&gt;What is DNS? - &lt;a href="https://www.cloudflare.com/learning/dns/what-is-dns/"&gt;https://www.cloudflare.com/learning/dns/what-is-dns/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What is Firewall? - &lt;a href="https://www.cisco.com/c/en/us/products/security/firewalls/what-is-a-firewall.html"&gt;https://www.cisco.com/c/en/us/products/security/firewalls/what-is-a-firewall.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why use 1.1.1.1 ? - &lt;a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"&gt;https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cloudfare DNS - &lt;a href="https://1.1.1.1/"&gt;https://1.1.1.1/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Google Public DNS - &lt;a href="https://developers.google.com/speed/public-dns/"&gt;https://developers.google.com/speed/public-dns/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the LOLs - &lt;a href="https://lmgtfy.com/"&gt;https://lmgtfy.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>dns</category>
    </item>
  </channel>
</rss>
