<?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: Kaushal Joshi</title>
    <description>The latest articles on DEV Community by Kaushal Joshi (@clumsycoder).</description>
    <link>https://dev.to/clumsycoder</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%2F487398%2F5c17f309-2db4-47f7-ace6-37eb16659496.jpg</url>
      <title>DEV Community: Kaushal Joshi</title>
      <link>https://dev.to/clumsycoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/clumsycoder"/>
    <language>en</language>
    <item>
      <title>Reflections on MumbaiFOSS: My Experience and Takeaways</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Mon, 13 Mar 2023 05:11:24 +0000</pubDate>
      <link>https://dev.to/clumsycoder/reflections-on-mumbaifoss-my-experience-and-takeaways-4f8p</link>
      <guid>https://dev.to/clumsycoder/reflections-on-mumbaifoss-my-experience-and-takeaways-4f8p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on &lt;a href="https://blog.kaushaljoshi.dev/mumbaifoss-23"&gt;personal blog&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As an open-source enthusiast, I am always interested in the functioning of the open-source ecosystem and the public distribution of software. I recently attended MumbaiFOSS, a conference organized by FOSS United and FOSSEE to promote Free and Open Source Software in Mumbai&lt;/p&gt;

&lt;p&gt;The FOSSMumbai conference happened yesterday on the 11th of March, 2023, at IIT Bombay. In this blog, I share my experiences and takeaways from the conference, including informative talks on building reliable APIs, digital personal data protection, public policies and the importance of open-source beyond just yearly programs and swag.&lt;/p&gt;

&lt;h2&gt;
  
  
  About MumbaiFOSS
&lt;/h2&gt;

&lt;p&gt;MumbaiFOSS is a collective effort of FOSS United and FOSSEE to revive the spirit of Free and Open source software in Mumbai.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--egiXyhDV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FnIi7OeaAAQAAzX%3Fformat%3Djpg%26name%3Dlarge" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--egiXyhDV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/FnIi7OeaAAQAAzX%3Fformat%3Djpg%26name%3Dlarge" alt="FOSS" width="880" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FOSS United is a non-profit foundation that promotes Free and Open Source Software ecosystem in India. It offers funding and grants to FOSS projects, organizes events to empower open-source developers, and hosts a not-for-profit learning platform Mon School.&lt;/p&gt;

&lt;p&gt;The Free/Libre and Open Source Software for Education, or simply FOSSEE, is a project pioneered in IIT Bombay that promotes using Free and Libre Open Source Software (FLOSS) in academics and research. It conducts a plethora of activities to improve education and research quality.&lt;/p&gt;

&lt;p&gt;Foss United partnered with FOSSEE to bring together developers, policymakers, and open-source enthusiasts for a conference. MumbaiFOSS was about FOSS (of course!), its issues and trends, and FOSS policies. This was a complete package of happiness for someone who has just scratched the surface of the open-source monolith.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prologue
&lt;/h2&gt;

&lt;p&gt;My two college mates accompanied me, coincidentally having the same name - Pratik. The journey from the main gate to the VMCC auditorium felt like a lifetime, but we arrived on time. We were welcomed with a yummy breakfast until the conference started.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--odUupBcy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/Fq6cEP1WwAILhAw%3Fformat%3Djpg%26name%3Dlarge" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--odUupBcy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/Fq6cEP1WwAILhAw%3Fformat%3Djpg%26name%3Dlarge" alt="Started" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I expected at least 100 people to be present, but to my surprise, the numbers were relatively low, though satisfactory. Traveling in Mumbai on early morning weekends has the power to change people's desires.&lt;/p&gt;

&lt;h2&gt;
  
  
  The conference, in brief
&lt;/h2&gt;

&lt;p&gt;Vishal Arya, the swiss army knife of FOSS United, and Riya Mathew, community manager of FOSS United, made the opening note. They told us the story behind FOSS United, the purpose of MumbaiFOSS, and their journey from the beginning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yEsrPJVU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/Fq6UJn8WIAAO3CW%3Fformat%3Djpg%26name%3Dlarge" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yEsrPJVU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/Fq6UJn8WIAAO3CW%3Fformat%3Djpg%26name%3Dlarge" alt="brief" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before the opening note, Prof. Kannan Moudgalaya of IIT Bombay gave an overview of FOSSEE, Spoken tutorials, and projects FOSSEE promotes. Apart from this, we had nine talks, one panel discussion, and one open discussion throughout the day. From informative talks on building reliable APIs and digital personal data protection to a fireside chat on tech policy, this conference offered a complete package of happiness for anyone interested in the open-source monolith. Read on to discover more about MumbaiFOSS and the importance of open-source beyond just yearly programs and swag.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Building Reliable APIs with Apache APISIX&lt;/strong&gt; by Navendu Pottekkat&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prav: a community-owned chat app&lt;/strong&gt; by Ravi Dwivedi and Arun Mathai&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;eSim developed by FOSSEE&lt;/strong&gt; by Sumanto Kar and Nagesh Karmali&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Demystifying WebRTC&lt;/strong&gt; by Amogh Lele&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Fabric&lt;/strong&gt; by Ashish Sahni&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Let's discuss the Digital Personal Data Protection Bill 2022&lt;/strong&gt; by Poruri Sai Rahul&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transforming Web Apps with Machine Learning&lt;/strong&gt; by Bhavesh Bhatt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FOSS United's Public Policy Initiatives&lt;/strong&gt; by Venkatesh Hariharan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self Hosting 101 - Reasons to self-host and nifty tools&lt;/strong&gt; by Kaustubh Maske Patil&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source: Supporting, Contributing, and Evangelising&lt;/strong&gt; - a panel discussion between 11. Vaishnavi, Manish, Saurav, Ashish, Dhiraj, Rohit and Anas Khan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fireside chat: Why engineers should care about tech policy?&lt;/strong&gt; by Kailash Nadh and Venkatesh Hariharan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Venky's talk on FOSS United's Public Policy Initiatives was my favorite. Hearing him talk about his experience, with interesting stories and analogies, was indeed insightful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fireside chat
&lt;/h2&gt;

&lt;p&gt;This was the main event of the conference. It was a half an hour discussion between Kailash Nadh, Rushabh Mehta, and Venkatesh Hariharan.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SCt1s-GL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkpw8wb95s4hyl4rjh38.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SCt1s-GL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xkpw8wb95s4hyl4rjh38.png" alt="fireside" width="880" height="658"&gt;&lt;/a&gt;&lt;br&gt;
The discussion was mainly focused on new tech policies and our stand on them. How tech policies are changing, why we should care about it, how politicians and political agendas shape these policies, and how we can take steps towards making an impact were a few things that were discussed. It's important to have more technologists involved in public policies than lawyers.&lt;/p&gt;

&lt;h2&gt;
  
  
  And, I met Kailash Nadh!
&lt;/h2&gt;

&lt;p&gt;Kailash Nadh has been CTO of Zerodha since 2013. I was fascinated when I read that Zerodha's engineering team only comprises 33 people, and nobody has left the team in all these years for better opportunities. Damn, I was excited to meet this man!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ggb0gKIQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1678647504235/4a7de449-348d-409e-be49-de3071026b72.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ggb0gKIQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1678647504235/4a7de449-348d-409e-be49-de3071026b72.png" alt="KailashandI" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As everybody started leaving the auditorium after the conference, I saw him talking to Rushabh and a few team members. I went there and asked him for a photo together, and he gently agreed.&lt;/p&gt;

&lt;p&gt;I couldn't stop but express my admiration towards his work at Zerodha and how much I admire his startup. He thanked me, and I went on cloud nine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Afterthoughts
&lt;/h2&gt;

&lt;p&gt;Open source is a lot more than I used to think. It is beyond a few yearly open-source programs, goodies/swags, and adding certificates on LinkedIn. It is beyond contributing to projects backed by large corporations and projects that enhance developer/web experience.&lt;/p&gt;

&lt;p&gt;It is also about being free from proprietary software, empowering and encouraging the government and societies to use FOSS, reaching more students, educating them, and many more.&lt;/p&gt;

&lt;p&gt;MumbaiFOSS was the first conference I attended. And it was absolutely fantastic! Everything was planned and managed so well that I couldn't find any issues to rant on. And the food was tasty, too! Kudos to the operations and management team for pulling it off so well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Epilogue
&lt;/h2&gt;

&lt;p&gt;I plan to attend more such conferences. I searched for some while going back home, and I might go there if everything aligns well. Of course, I will update you all! I am most active on &lt;a href="https://twitter.com/clumsy_coder"&gt;Twitter&lt;/a&gt;, where I post such updates. You can also subscribe to my E-mail newsletter to have my next blog in your inbox!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V5TkrdRZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1678647709258/3f7857f9-3694-4261-8b7c-3880689a5f4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V5TkrdRZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1678647709258/3f7857f9-3694-4261-8b7c-3880689a5f4b.png" alt="Gang" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Until then, keep contributing! 🌿&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>community</category>
    </item>
    <item>
      <title>Is Create React App Really Dead? What Are Other Options?</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Sun, 05 Feb 2023 14:04:25 +0000</pubDate>
      <link>https://dev.to/clumsycoder/is-create-react-app-really-dead-what-are-other-options-1j39</link>
      <guid>https://dev.to/clumsycoder/is-create-react-app-really-dead-what-are-other-options-1j39</guid>
      <description>&lt;p&gt;If you are active on tech Twitter, follow web-dev YouTubers, or read blogs, you know what I am talking about. For the past few months, there has been a lot of discussions about how create-react-app, the official tool to configure a react project, is out of date and needs to be replaced.&lt;/p&gt;

&lt;p&gt;In today's blog, let us understand why everyone is against CRA, whether it is really that bad, and what other options we have on our plate.&lt;/p&gt;

&lt;p&gt;This blog requires no prerequisites except some familiarity with the React.js ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Started
&lt;/h2&gt;

&lt;p&gt;I am seeing similar content on my feed for the last few months. People started writing blogs and making videos saying CRA is dead and we should use Vite instead.&lt;br&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%2F1i9xkr2bij0dqlj8c3l5.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%2F1i9xkr2bij0dqlj8c3l5.png" alt="Is Create React App Really Dead.png" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Everything seemed fine until last week Theo tweeted about filing a PR to remove CRA as a recommendation.&lt;/p&gt;

&lt;p&gt;And well, he did it! Soon after the tweet blew up and many developers agreed to him, he raised a PR.&lt;/p&gt;

&lt;p&gt;This raised a question: Is CRA really as bad as developers are claiming? And if yes, what can we do about it?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problems
&lt;/h2&gt;

&lt;p&gt;create-react-app is the official tool for configuring React applications when you start a new project. It is maintained by the core React team responsible for the main React library.&lt;/p&gt;

&lt;p&gt;The problem occurs when your app scales in size and has a lot of stuff to be taken care of. Not having a scalable structure makes your app slow and increases its rendering time.&lt;/p&gt;

&lt;h3&gt;
  
  
  It is Unmaintained
&lt;/h3&gt;

&lt;p&gt;The create-react-app GitHub repository does not have active maintainers. Although few maintainers take care of minor updates and patches, nobody has been actively maintaining it since 2021.&lt;/p&gt;

&lt;p&gt;Hence around 1.5k issues are pending, and over 400 pulls are yet to be merged. This makes it hard to use it for larger projects that will scale enormously in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overdependency on Webpack
&lt;/h3&gt;

&lt;p&gt;CRA uses Webpack under the hood to set everything up. Webpack's main task is to pack everything into a single JavaScript bundle and ship it to the browser to execute.&lt;/p&gt;

&lt;p&gt;However, using Webpack itself is a very tedious and frustrating task. We need to consider many decisions before configuring it. And thankfully, CRA did everything for us! It took care of all the Webpack configuration and removed all complexities, and gave us a ready-to-build react application in our hands!&lt;/p&gt;

&lt;p&gt;Despite Webpack being useful, we can't ignore that it is tedious, slow, and old. While alternatives are using newer tools that are fast, minimal, and simple, CRA is still stuck on Webpack for providing backward compatibility. And CRA is still heavily dependent on Webpack.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lacks Many Features
&lt;/h3&gt;

&lt;p&gt;CRA again falls back when supporting additional features out of the box. We don't use plain React anymore. We add different flavors to spice up things and make it more convenient, scalable, and robust. CRA does not support many such tools out of the box. We need to rely on third-party services or add it manually ourselves.&lt;/p&gt;

&lt;p&gt;Developers today widely use TypeScript to typeface JavaScript applications. And as you might have guessed, CRA does not natively support TypeScript. You need to use a template while setting up the project.&lt;/p&gt;

&lt;p&gt;Another library developers prefer Tailwind CSS. It is a utility-based CSS framework that provides a design system for websites. CRA requires CRACO, a wrapper around CRA, to install Tailwind CSS. Though it is simple to set up, there are many problems with it. Since CRA doesn't allow imports outside /src, loading tailwind.config.js to access the theme config with TypeScript becomes difficult.&lt;/p&gt;

&lt;h3&gt;
  
  
  Better Alternatives
&lt;/h3&gt;

&lt;p&gt;Using CRA is simple (and still is). This is best for beginners who might get overwhelmed by all the configuration and settings of starting a react project manually. You are only three commands away from having a React application ready.&lt;/p&gt;

&lt;p&gt;But as React got popular, newer alternatives were introduced. These have new approaches to setting up React. They use more recent tools to do it and, overall, faster than CRA.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Else Can We Use?
&lt;/h2&gt;

&lt;p&gt;There are three five main alternatives to vanilla React or CRA. You first need to decide the scope of your project and the utilities it needs and then choose a tool or framework.&lt;/p&gt;

&lt;p&gt;If you want a CRA-like build tool that works exactly like CRA but resolves all of its problems, Vite is the way!&lt;/p&gt;

&lt;h3&gt;
  
  
  Vite
&lt;/h3&gt;

&lt;p&gt;Vite is a recent build tool that is dominating the web-dev circle. It's on the third rank by usage and first by retention and interest in the state of JS 2022 survey.&lt;/p&gt;

&lt;p&gt;Vite is blazingly fast. It uses SWC, which uses rust to build steps, so you get milliseconds response time while making changes to the app.&lt;/p&gt;

&lt;p&gt;Vite supports a plethora of plugins to extend your build. It also supports TypeScript, PostCSS, and CSS modules out of the box, making it a production-ready build tool for React.&lt;/p&gt;

&lt;p&gt;It also supports Svelte, Vue, Preact, Lit, and Vanilla JavaScript. In terms of react, it is an excellent replacement for CRA if you want a very similar experience to CRA. If your application doesn't require server side rendering and is a small or single page application, Vite is a must try!&lt;/p&gt;

&lt;h3&gt;
  
  
  Server Side Generation
&lt;/h3&gt;

&lt;p&gt;Server Side Generation, or SSG, is a website rendering approach that pre-renders the content and serves static HTML pages to the client.&lt;/p&gt;

&lt;p&gt;The big players in SSG are Gatsby and Astro. They both are best for scenarios where you need to create a static side that doesn't rely on dynamic content. So if you are building a blog, landing pages, or portfolio marketing, SSG is the way to go.&lt;/p&gt;

&lt;p&gt;Unlike Vite, Astro and Gatsby add their flavor on top of React, so the code you write slightly changes compared to CRA/Plain React.&lt;/p&gt;

&lt;h3&gt;
  
  
  Server Side Rendering
&lt;/h3&gt;

&lt;p&gt;Server Side Rendering, or SSR, generates static content on the server and sends it to the client for every request. It drastically improves the overall loading time, which helps increase Core Web Vitals scores and get better website SEO results.&lt;/p&gt;

&lt;p&gt;Again we have two frameworks to talk about*&lt;em&gt;—&lt;/em&gt;* Next.js and Remix. Both have a similar approach to how a project is set up, but there are obviously a few differences. Starting with similarities, both frameworks support file-based routing and are used for dynamic content generation. Talking about differences, Next uses React server components while Remix does not. Nested routes work in beta for Next.js, whereas Remix has a stable release. Remix uses ESBuild as a build tool, while NExt uses rust-based SWC.&lt;/p&gt;

&lt;p&gt;Suppose your requirements include a multi-page application heavily dependent on dynamic data and complex routes. In that case, SSR is the way to go. Like SSG frameworks, both Next and Remix are built on top of React, so you need to spend some extra time learning them.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Views
&lt;/h2&gt;

&lt;p&gt;We should not force anyone to use a particular tool or framework. React by itself is still a great choice for a framework, and it is changing with changing needs over time as well.&lt;/p&gt;

&lt;p&gt;If you are a beginner and creating simple projects to validate your learnings, there is no harm in using CRA. Vite is useful for a CRA-like experience with better support and speed. Use it when you are creating small or medium scaled single page applications.&lt;/p&gt;

&lt;p&gt;Astro and Gatsby should be considered when your content won't change often. This makes it useful in use cases like blogs, portfolios, landing pages, etc.&lt;/p&gt;

&lt;p&gt;Moving towards Next.js or Remix would be best once you become comfortable with React (with or without CRA). These frameworks give much flexibility and scalability to create robust front-end applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up!
&lt;/h2&gt;

&lt;p&gt;It feels good to have multiple options available to us. We can use the best tool, library, or framework that satisfies our project's scope. Also, having healthy competition is always good for the market.&lt;/p&gt;

&lt;p&gt;These were my views, and yours might vary; that's absolutely fine! I would love to hear yours. I am most active on Twitter and Showwcase if you want to say hi!&lt;/p&gt;

&lt;p&gt;I write about web, open-source, technical writing, and my general experiences with development. I also write about Web3 at The Dapp List. You can follow me on Twitter or subscribe to my newsletter below to have the latest update on everything I am up to.&lt;/p&gt;

&lt;p&gt;Until then, Happy tooling!&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=o9TJWEPc0Lk" rel="noopener noreferrer"&gt;Don't Use Create React App in 2023&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=kvkAoCbTM3Q" rel="noopener noreferrer"&gt;Stop Using Create React App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I was almost finished with the blog when Fireship posted a video. &lt;a href="https://www.youtube.com/watch?v=2OTq15A5s0Y&amp;amp;feature=youtu.be" rel="noopener noreferrer"&gt;7 better ways to create a React app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devto</category>
      <category>offers</category>
      <category>web3</category>
      <category>cryptocurrency</category>
    </item>
    <item>
      <title>Hacktoberfest 101 with ReactPlay</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Tue, 04 Oct 2022 03:53:14 +0000</pubDate>
      <link>https://dev.to/clumsycoder/hacktoberfest-101-with-reactplay-3b92</link>
      <guid>https://dev.to/clumsycoder/hacktoberfest-101-with-reactplay-3b92</guid>
      <description>&lt;p&gt;Modern software infrastructure is heavily dependent on the open-source community. From your personal projects to a complex app by a tech giant, every piece of code written today is dependent on open source in one way or another.&lt;/p&gt;

&lt;p&gt;These open-source projects are developed and maintained by indie developers in their free time. They (usually) don't get paid to do this. Their passion and dedication to software development encourage them to do it selflessly.&lt;/p&gt;

&lt;p&gt;To celebrate such developers and the open source community, DigitalOcean and its partner organize an event every month of October: &lt;strong&gt;&lt;a href="https://hacktoberfest.com/"&gt;Hacktoberfest&lt;/a&gt;&lt;/strong&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://hacktoberfest.com/"&gt;Hacktoberfest&lt;/a&gt; is a virtual event organized by DigitalOcean and its partners: Appwrite and Docker, throughout October. It is aimed toward open source and introducing it to as many developers as possible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vB0dh2P6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440809567/Q8G6VVubN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vB0dh2P6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440809567/Q8G6VVubN.png" alt="Hacktoberfest.png" width="880" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every year, many events are organized under the Hacktoberfest event. Talks, Workshops, Meetups, and Hackathons, to name a few. Developers from around the globe can join these events without restriction to their educational/personal background.&lt;/p&gt;

&lt;p&gt;The most significant part of Hacktoberfest is open source contribution. Open source project maintainers add the &lt;code&gt;hacktoberfest&lt;/code&gt; label to their project's GitHub Repo. Developers can search for repositories and help resolve issues with &lt;code&gt;hacktoberfest&lt;/code&gt; labels. If their PR gets merged, it is labelled &lt;code&gt;hacktoberfest-accepted&lt;/code&gt; and closed. When developers close four PRs successfully, they become eligible for the reward!&lt;/p&gt;

&lt;p&gt;Excited huh? First, let's understand why you should contribute to open source first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Participate in Hacktoberfest?
&lt;/h2&gt;

&lt;p&gt;As discussed in the introduction, open source projects are the backbone of today's software infrastructure. Yet the developers behind this are not celebrated that much.&lt;/p&gt;

&lt;p&gt;Hence we participate in the fest to give back to the community. We might not help them with a huge paycheck or a great job, but the least we can do is openly appreciate their work and thank them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get into Open Source
&lt;/h3&gt;

&lt;p&gt;Hacktoberfest is the best way to start contributing to open-source projects. There are many issues with all major programming languages frameworks and libraries. Even if you are a beginner who just started coding, you will find an issue to work on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zq2jFxdO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1633163865612/eAs5ov0y7.jpeg%3Fauto%3Dcompress%2Cformat%26format%3Dwebp" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zq2jFxdO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1633163865612/eAs5ov0y7.jpeg%3Fauto%3Dcompress%2Cformat%26format%3Dwebp" alt="https://cdn.hashnode.com/res/hashnode/image/upload/v1633163865612/eAs5ov0y7.jpeg?auto=compress,format&amp;amp;format=webp" width="880" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I started my open-source journey with 2020's Hacktoberfest itself. I was a newbie who did not understand anything. Eventually, I picked up and now advocate for it to others. You can do this too!&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Exposure to Real World
&lt;/h3&gt;

&lt;p&gt;Your personal or college group project is different from those used widely. The approach, technical and business decisions, complexity, everything is widely different from what you build by yourself.&lt;/p&gt;

&lt;p&gt;While contributing to open source, you will work on real projects which others will use. While doing so, you will follow the best practices for developing software. This will not only help you to understand software development better but also prepare you for your employment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Learn Collaboration
&lt;/h3&gt;

&lt;p&gt;Continuing the previous point, you will work with other developers to resolve the issue. A maintainer, reviewer, and other folks like you will ensure that you are doing well with the issue.&lt;/p&gt;

&lt;p&gt;This is most likely what you will be doing in your company—working in teams, resolving issues, and deploying to prod with their help. Personal/hobby projects are restricted when it comes to collaboration. Open source helps you to understand how things work for big projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  New Changes Introduced This Year
&lt;/h2&gt;

&lt;p&gt;Until last year, hacktoberfest contributions were only valid for coding or maintaining a project. But open source is not just for technical folks who write code.&lt;br&gt;
Since this year, Hacktoberfest has also been allowing low-code and no-code contributions. You are no longer limited to your skills and interests in contributing to open source.&lt;/p&gt;

&lt;p&gt;You can give back to the community in the following ways: writing, design, and advocacy. Here's the table that explains some of the ways of no-code/low-code contributions.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Contribution Type&lt;/th&gt;
&lt;th&gt;Low-code&lt;/th&gt;
&lt;th&gt;No-code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Writing&lt;/td&gt;
&lt;td&gt;Technical Documentation&lt;/td&gt;
&lt;td&gt;Translating, Copy editing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Design&lt;/td&gt;
&lt;td&gt;Testing&lt;/td&gt;
&lt;td&gt;UX Testing, Graphics design, video production&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advocacy&lt;/td&gt;
&lt;td&gt;Talks, presentations, blogs, podcasts, case studies&lt;/td&gt;
&lt;td&gt;social media blog posts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Please make sure you create pull/merge requests of your low/no code contributions to track it. Project maintainers may need to facilitate tracking those contributions through an activity log.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Contribute
&lt;/h2&gt;

&lt;p&gt;This sounds interesting. Let us understand how you can contribute to hacktoberfest!&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Contributions
&lt;/h3&gt;

&lt;p&gt;Contributing with code means resolving an issue or introducing a new feature in an existing open-source project.&lt;/p&gt;

&lt;p&gt;You need to search for projects that are open for hacktoberfest submissions. Usually, many open source maintainers accept hacktoberfest contributions, but some might not.&lt;/p&gt;

&lt;p&gt;Finding a good repository to contribute to is a separate blog in itself. Make sure you follow ReactPLay on Hashnode and Twitter to read it when we publish it. Until then, here is a quick rundown of what you can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="http://github.com/search"&gt;https://github.com/search&lt;/a&gt; and search for &lt;em&gt;hacktoberfest&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Filter your language of choice.&lt;/li&gt;
&lt;li&gt;Sort by &lt;em&gt;recently updated&lt;/em&gt; to have live repos&lt;/li&gt;
&lt;li&gt;Optionally, you can filter by &lt;em&gt;topics&lt;/em&gt; or &lt;em&gt;issues&lt;/em&gt; to dive deep.&lt;/li&gt;
&lt;li&gt;Look for the &lt;code&gt;hacktoberfest&lt;/code&gt; label in the Issues tab and proceed further.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are exploring different projects, here's what you can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Look for the &lt;code&gt;hacktoberfest&lt;/code&gt; tag in the about section.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hGuyirEU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440884249/zUMrh8FGe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hGuyirEU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440884249/zUMrh8FGe.png" alt="about .png" width="281" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the Issues tab and search for the &lt;code&gt;hacktoberfest&lt;/code&gt; tags.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DYWucUbw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440891668/bqWsc5yxg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DYWucUbw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440891668/bqWsc5yxg.png" alt="Issues .png" width="880" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Either way, you can create a new issue with the &lt;code&gt;hacktoberfest&lt;/code&gt; tag and communicate with the maintainer about the further procedure.&lt;/p&gt;

&lt;h2&gt;
  
  
  No/Low Code Contributions
&lt;/h2&gt;

&lt;p&gt;This is the first year of low/no code contributions, so many misconceptions exist. Based on the website's &lt;a href="https://hacktoberfest.com/about/#low-or-non-code"&gt;about section&lt;/a&gt;, we can conclude the following:&lt;/p&gt;

&lt;p&gt;Your low/no code path contribution must be related to an open-source project. Your contributions to general open source or hacktoberfest events won't be considered valid.&lt;/p&gt;

&lt;p&gt;If you write a blog, give a talk or host an event advocating for the project, then only your submission will be valid for the fest.&lt;/p&gt;

&lt;p&gt;The open-source project you contribute to must have a repo/log to track all the activities. You need to make a pull request explaining the contribution you made. This will vary from project to project, so ensure you are well aware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hacktoberfest with ReactPlay
&lt;/h2&gt;

&lt;p&gt;We are incredibly thrilled to take part in this year's Hacktoberfest! This is our first year of Hacktoberfest, and we have exciting plans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Contributions to ReactPlay
&lt;/h3&gt;

&lt;p&gt;Our code contribution has been live since we introduced the project to the public.&lt;/p&gt;

&lt;p&gt;You can add a new play, improve the site, or help resolve general issues from the &lt;a href="https://github.com/reactplay/react-play/issues"&gt;Issues section&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are plenty of ways to make code contributions to the project. Make sure you are connected to us on &lt;a href="https://discord.gg/vrTxWUP8Am"&gt;Discord&lt;/a&gt; for the latest changes and issues about the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Low/No Code Contributions to ReactPlay
&lt;/h3&gt;

&lt;p&gt;This involves writing a blog for &lt;a href="https://blog.reactplay.io/"&gt;ReactPlay Blog&lt;/a&gt;, talking about ReactPlay, and hosting a workshop that involves ReactPlay.&lt;/p&gt;

&lt;p&gt;You can also contribute to improving docs, UX, possible translations, YouTube Videos, testing, and much more.&lt;/p&gt;

&lt;p&gt;We will soon make our hacktoberfest activity log available to the public, where you can submit your low/no code contribution to the project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Our First Hackathon
&lt;/h2&gt;

&lt;p&gt;A few days back, we also &lt;a href="https://blog.reactplay.io/announcing-hack-r-play-hackathon-from-react-play"&gt;announced&lt;/a&gt; our first-ever Hackathon, &lt;a href="https://hustles.reactplay.io/hackrplay/2022/home"&gt;Hack-R-Play&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WplpIuP2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440762975/gf1z69QEz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WplpIuP2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1664440762975/gf1z69QEz.png" alt="Hack-R-Play.png" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a fifteen days long hackathon sponsored by &lt;a href="https://nhost.io/"&gt;NHost&lt;/a&gt;. You need to build a project using any of the tools from React ecosystem and NHost services and write a blog about it.&lt;/p&gt;

&lt;p&gt;We will choose three winners among all the submissions. The winners could win up to $200USD and a Swag kit from NHost.&lt;/p&gt;

&lt;h2&gt;
  
  
  External Resources
&lt;/h2&gt;

&lt;p&gt;Here are a few blogs, videos, and threads that will help you to get better:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://blog.greenroots.info/are-you-contributing-to-hacktoberfest-a-few-tips-for-you"&gt;Are you contributing to Hacktoberfest? A few tips for you&lt;/a&gt; - A blog by Tapas Adhikary&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.kaushaljoshi.dev/git-commands-you-need-to-know-before-contributing-to-open-source"&gt;Git Commands You Need To Know Before Contributing to Open Source&lt;/a&gt; - A blog by Kaushal Joshi&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.kaushaljoshi.dev/hacktoberfest-dos-and-donts"&gt;Hacktoberfest: Do's and Dont's&lt;/a&gt; - A blog by Kaushal Joshi&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=MTXFOOnJgUA"&gt;I for Open Source&lt;/a&gt; - A live show discussing the basics of open source.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/ReactPlayIO/status/1575037679674220545"&gt;What is Hacktoberfest&lt;/a&gt; - A thread with TL;DR of the Hacktoberfest event&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping Up!
&lt;/h2&gt;

&lt;p&gt;This must have been overwhelming for you! Please take a moment of peace and go through it once again.&lt;/p&gt;

&lt;p&gt;Make sure you follow us on &lt;a href="https://twitter.com/ReactPlayIO"&gt;Twitter&lt;/a&gt; and are part of our &lt;a href="https://discord.gg/vrTxWUP8Am"&gt;Discord&lt;/a&gt; community. Feel free to ask your questions in the discord.&lt;/p&gt;

&lt;p&gt;Until then, happy contributing!&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>react</category>
      <category>community</category>
    </item>
    <item>
      <title>Three Ways to Remove Console Statements From Production Build</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Sat, 20 Aug 2022 05:48:16 +0000</pubDate>
      <link>https://dev.to/clumsycoder/three-ways-to-remove-console-statements-from-production-build-2949</link>
      <guid>https://dev.to/clumsycoder/three-ways-to-remove-console-statements-from-production-build-2949</guid>
      <description>&lt;p&gt;Whether you are a beginner JavaScript Developer or an experienced developer working in the biggest organization in the world, you can't deny using console statements to debug your code. Even though nothing is wrong with doing it, you might expose some sensitive data to end users if you forget to remove those before committing the code.&lt;/p&gt;

&lt;p&gt;In this quick article, let us discuss different ways by which you can prevent log statements from going into the production code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overriding &lt;code&gt;console&lt;/code&gt; Methods
&lt;/h2&gt;

&lt;p&gt;This simplest practice removes console statements from the production build, leaving you with a great debugging tool during development.&lt;/p&gt;

&lt;p&gt;In this method, we check the node environment of the app and override console functions with empty functions if the environment is not &lt;code&gt;development&lt;/code&gt;. By doing this, you can still use console statements if the app is in development mode.&lt;/p&gt;

&lt;p&gt;Paste the following code into the entry file of your application. In most cases, it would be named &lt;code&gt;index.js&lt;/code&gt; or &lt;code&gt;app.js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NODE_ENV&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;development&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;debug&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;warn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If you are using React or Next, you can paste this in &lt;code&gt;src/index.js&lt;/code&gt; or &lt;code&gt;pages/_app.js&lt;/code&gt;, respectively.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  ES-Lint
&lt;/h2&gt;

&lt;p&gt;If you are using ESLint configuration, you can add &lt;code&gt;no-console&lt;/code&gt; rule to ensure that console statements are not committed to the version control. You can even exclude some statements (like &lt;code&gt;.warn()&lt;/code&gt; or &lt;code&gt;.error()&lt;/code&gt;) if you wish. &lt;/p&gt;

&lt;p&gt;However, you can follow this method only if you have integrated ESLint with your app. If you are using React or Next, follow &lt;a href="https://clumsycoder.hashnode.dev/automate-eslint-and-prettier-for-react"&gt;this article&lt;/a&gt; to integrate ESLint, Prettier and Husky in your app.&lt;/p&gt;

&lt;p&gt;If you have ESLint, add the following rule in the &lt;code&gt;.eslintrc.json&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"no-console"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This rule will throw an error if a console statement is encountered. You can change the behavior by replacing &lt;code&gt;error&lt;/code&gt; with &lt;code&gt;warning&lt;/code&gt;. Similarly, you can exclude specific methods by adding an &lt;code&gt;allow&lt;/code&gt; option, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"rules"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"no-console"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;allow:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"warn"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will allow &lt;code&gt;console.warn()&lt;/code&gt; and &lt;code&gt;console.error()&lt;/code&gt; but throw an error in other cases. You can read more about this rule on their &lt;a href="https://eslint.org/docs/latest/rules/no-console"&gt;docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using a Babel Plugin
&lt;/h2&gt;

&lt;p&gt;A plugin called &lt;code&gt;babel-plugin-transform-remove-console&lt;/code&gt; removes all console statements from your application. All you need to do is install it and add it to the &lt;code&gt;.babelrc&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;Install this plugin by NPM or Yarn like this:&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="c"&gt;# NPM&lt;/span&gt;
npm i babel-plugin-transform-remove-console

&lt;span class="c"&gt;# Yarn&lt;/span&gt;
yarn add babel-plugin-transform-remove-console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open &lt;code&gt;.babelrc&lt;/code&gt; and paste the following. If the file doesn't exist, create a new file with the same name in the root directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"production"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"plugins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"transform-remove-console"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find more information about this library at the &lt;a href="https://www.npmjs.com/package/babel-plugin-transform-remove-console#via-babelrc-recommended"&gt;NPM repository&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up!
&lt;/h2&gt;

&lt;p&gt;The console statements are often not taken seriously. Removing them from production is always a best practice while building apps. But it could cause performance or security issues if you mishandle them. &lt;/p&gt;

&lt;p&gt;If you found this article helpful, share this within your socials so everyone can follow best practices.&lt;/p&gt;

&lt;p&gt;I write blogs about web development, open source, and personal experiences. Make sure to follow me on &lt;a href="https://hashnode.com/@clumsycoder"&gt;Hashnode&lt;/a&gt; for the latest article on your feed. If you want to say hi or need help with frontend or technical writing, catch me on &lt;a href="https://twitter.com/clumsy_coder"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.showwcase.com/clumsycoder"&gt;Showwcase&lt;/a&gt;, and &lt;a href="https://peerlist.io/clumsycoder"&gt;Peerlist&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Until then, happy logging! 👨‍💻&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>How to Add Script Tags in React</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Tue, 28 Jun 2022 07:52:17 +0000</pubDate>
      <link>https://dev.to/clumsycoder/how-to-add-script-tags-in-react-mpe</link>
      <guid>https://dev.to/clumsycoder/how-to-add-script-tags-in-react-mpe</guid>
      <description>&lt;p&gt;Using third party libraries is very common while developing apps for the web. The usual way is to install the NPM package of the library and import it for your use. &lt;/p&gt;

&lt;p&gt;But sometimes, the NPM package is unavailable or you have to include files directly from a CDN or external source. Adding &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags in the index.html file does not work every time and even if it does, it could cause issues as the website scales.&lt;/p&gt;

&lt;p&gt;I faced a similar issue while adding Calendly import to my portfolio site and found an easy solution. But first, let's understand why exactly an error occurs when you add &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags in React components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it Throws an Error
&lt;/h2&gt;

&lt;p&gt;React uses &lt;a href="https://reactjs.org/docs/react-dom.html"&gt;React DOM&lt;/a&gt; to render JSX content on the web page. React DOM is a virtual DOM that resides on top of the original DOM. It only updates changed nodes from the DOM unlike the original DOM, which completely updates itself after every change.React DOM uses &lt;code&gt;createElement&lt;/code&gt; to convert JSX into DOM elements.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;createElement&lt;/code&gt; function uses the &lt;code&gt;innerHTML&lt;/code&gt; API to add changed nodes in the browser's original DOM. HTML5 specifications state that &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags are not executed if they are inserted with &lt;code&gt;innerHTML&lt;/code&gt;. &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML#security_considerations"&gt;MDN Web Docs&lt;/a&gt; has explained the security reasons behind this.&lt;/p&gt;

&lt;p&gt;As a result, The execution of the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag throws an error in React.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;The simplest solution is to add scripts directly into DOM using the &lt;code&gt;Document&lt;/code&gt; interface provided by web APIs. We can use JavaScript's DOM manipulation methods to inject the &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag without React DOM interfering.&lt;/p&gt;

&lt;p&gt;Here is what we have to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At first, we get head and script tags from DOM.&lt;/li&gt;
&lt;li&gt;Then, we use the setAttribute method to add a new script.&lt;/li&gt;
&lt;li&gt;The modified script tag is appended to the head.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In React terms, the desired script has to be added to DOM when the component loads on the browser. React has a hook for such scenarios: &lt;code&gt;useEffect&lt;/code&gt;. The whole process explained above can be wrapped inside the hook and triggered when the component renders for the first time or a new script is added.&lt;/p&gt;

&lt;p&gt;In real world projects, we might want to add multiple scripts. Hence it's better to create a custom hook so we can call it multiple times with different source links.&lt;/p&gt;

&lt;p&gt;Custom hooks are usually stored in a separate directory within the &lt;code&gt;/src&lt;/code&gt; folder. Let's create a new file inside the &lt;code&gt;/src/hooks/&lt;/code&gt; directory and name it &lt;code&gt;useExternalScripts.js&lt;/code&gt;. Paste the following code in the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;useExternalScripts&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="p"&gt;}){&lt;/span&gt;
  &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;head&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;head&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;script&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;script&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;src&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;removeChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;script&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a component where you want to add a new script, paste the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;useExternalScripts&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./hooks/useExternalScripts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;useExternalScripts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://www.scriptdomain.com/script&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A new script is appended to the head of the page whenever the component is mounted in the DOM. The script is removed when the component unmounts.&lt;/p&gt;

&lt;p&gt;Don't use the &lt;code&gt;return&lt;/code&gt; snippet if your script is used in multiple components throughout your app.The function returned by the hook is a cleanup function, which is executed when a component is unmounted. Hence we don't require it if we have to use the source at multiple places.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternate Solution
&lt;/h2&gt;

&lt;p&gt;Alternatively, you can use &lt;a href="https://www.npmjs.com/package/react-helmet"&gt;react-helmet&lt;/a&gt; which manages changes within the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag. The &lt;code&gt;&amp;lt;Helmet&amp;gt;&lt;/code&gt; can take care of the script if it is placed inside of it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Helmet&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-helmet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Helmet&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;
          &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://www.myscripts.com/scripts"&lt;/span&gt;
          &lt;span class="na"&gt;crossorigin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"anonymous"&lt;/span&gt;
          &lt;span class="na"&gt;async&lt;/span&gt;
        &lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;script&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Helmet&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      ...
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't forget to install react-helmet before you start your app!&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;React uses &lt;code&gt;innerHTML&lt;/code&gt; at the core to manipulate nodes on the browser's DOM. The &lt;code&gt;innerHTML&lt;/code&gt; API doesn't support &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags for security reasons. Hence an error is thrown if you try to inject a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag in a React component.&lt;/p&gt;

&lt;p&gt;Adding a new script tag and directly appending it to the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element of the page is the easiest way to add &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags in the React app. react-helmet is a third party library that can be used to achieve the same thing by handling the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag on every page.&lt;/p&gt;

&lt;p&gt;I feel the custom hook version is better than using a third party library since we have full control over it. What do you think? Did you use any other method? Let me know down below!&lt;/p&gt;

&lt;p&gt;If you found this blog helpful, consider sharing it on your social. You can read more blogs about web dev, open source and stuff I fix while developing apps on &lt;a href="https://clumsycoder.hashnode.dev/"&gt;my blog&lt;/a&gt;. Or if you want to say hi, I am most active on &lt;a href="https://twitter.com/clumsy_coder"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Until then, happy debugging! ⛑&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>howtos</category>
    </item>
    <item>
      <title>How to Keep SSH Connection Alive for Longer Durations</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Thu, 02 Jun 2022 16:14:41 +0000</pubDate>
      <link>https://dev.to/clumsycoder/how-to-keep-ssh-connection-alive-for-longer-durations-4f65</link>
      <guid>https://dev.to/clumsycoder/how-to-keep-ssh-connection-alive-for-longer-durations-4f65</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Alternate Title: [SOLVED] Code doesn't get pushed since Husky pre-push takes so much time!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A few weeks back, I was working on a project that had Husky pre-push hook configured. After working on it for a few days, I noticed that sometimes code is not getting pushed to the remote repository. &lt;/p&gt;

&lt;p&gt;After a headache of trial and error, I realized that pre-push hook is taking so much time to finish. And when it did, there was no message of code being pushed to the remote repo in the terminal. Something was odd. &lt;/p&gt;

&lt;p&gt;I learned that the SSH connection between the terminal and GitHub initiates when we execute &lt;code&gt;git push&lt;/code&gt; and terminates when the code is pushed successfully. However, if the connection is inactive for a certain period of time, it terminates itself due to timeout. &lt;/p&gt;

&lt;p&gt;Since Husky pre-push was taking so long time to finish its job, the SSH connection with the GitHub server was timing out. The dead connection was resulting in the code not getting pushed at all.&lt;/p&gt;

&lt;p&gt;I needed a way to keep the connection alive for a few more minutes. Luckily, we can do this in the terminal itself. &lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;p&gt;Your terminal must be connected to your GitHub account via SSH. You can find more information &lt;a href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh"&gt;here&lt;/a&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;As I said, the solution is to keep the connective alive until husky finishes its task. It's easier than I thought.&lt;/p&gt;

&lt;p&gt;In your terminal, go to the directory that stores SSH information. Usually, it's &lt;code&gt;/.ssh&lt;/code&gt; folder in the home directory. Execute this command in the terminal:&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; ~/.ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tilde symbol(~) represents &lt;code&gt;/home&lt;/code&gt; directory. Since our desired destination folder is in the home directory itself, this command will change the current working directory to &lt;code&gt;/home/.ssh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Create a file named &lt;code&gt;config&lt;/code&gt; without any extension. Add the following text 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;Host *
  ServerAliveInterval 60
  ServerAliveCountMax 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_4UZ-gv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1650864613611/6NbEYHYsA.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_4UZ-gv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1650864613611/6NbEYHYsA.gif" alt="ssh-config.gif" width="837" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Connect to the host once again and you'd see the success. If not, increase the duration by a few minutes until you find your sweet spots. The way to understand this setting is explained in the next section.&lt;/p&gt;

&lt;h2&gt;
  
  
  Explanation
&lt;/h2&gt;

&lt;p&gt;But what does &lt;code&gt;ServerAliveInterval&lt;/code&gt; and &lt;code&gt;ServerAliveCountMax&lt;/code&gt; actually do?&lt;/p&gt;

&lt;p&gt;According to SSH manual:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;ServerAliveInterval:&lt;/strong&gt;&lt;br&gt;
Sets a timeout interval in seconds after which if no data has been received from the server, ssh will send a message through the encrypted channel to request a response from the server. The default is 0, indicating that these messages will not be sent to the server. This option applies to protocol version 2 only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ServerAliveCountMax:&lt;/strong&gt;&lt;br&gt;
The default value is 3. If, for example, &lt;code&gt;ServerAliveInterval&lt;/code&gt; is set to 15 and &lt;code&gt;ServerAliveCountMax&lt;/code&gt; is left at the default, if the server becomes unresponsive, SSH will disconnect after approximately 45 seconds. This option applies to protocol version 2 only.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So to summarize:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The client will wait idle for 60 seconds i.e. &lt;code&gt;ServerAliveInterval&lt;/code&gt; time.&lt;/li&gt;
&lt;li&gt;Then, it will send a &lt;em&gt;no-op null packet&lt;/em&gt; to the server and expect a response.&lt;/li&gt;
&lt;li&gt;If no response comes, then it will keep trying the above process till 30 times, defined with &lt;code&gt;ServerAliveCountMax&lt;/code&gt;. So it will wait for 1800 seconds, which is half an hour.&lt;/li&gt;
&lt;li&gt;If the server still doesn't respond, then the client disconnects the SSH connection.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Things to Know
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Who waits for the response
&lt;/h3&gt;

&lt;p&gt;In our case, the client is waiting for the server's response. Because the GitHub server sends a response back when the code is pushed. If you want the client to send a response, you should use &lt;code&gt;ClientAliveInterval&lt;/code&gt; and &lt;code&gt;ClientAliveCountMax&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Different config settings for different hosts
&lt;/h3&gt;

&lt;p&gt;The asterisk symbol (*) sets this configuration for every connected host. If you want to set this for a particular host, or only one host, you can do it with following way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Host hostname1
    SSH_OPTION value
    SSH_OPTION value

Host hostname2
    SSH_OPTION value

Host *
    SSH_OPTION value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The list of available connected hosts could be found in the &lt;code&gt;known_hosts&lt;/code&gt; file which is located in the same directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Server alive messages are useful when an SSH server has been configured to close connections after a period of time with no traffic. Setting these two options keeps the session alive by sending a packet every &lt;em&gt;ServerAliveInterval *seconds for a maximum of *ServerAliveCountMax&lt;/em&gt; times.&lt;/p&gt;

&lt;p&gt;As a developer, we come across new problems every single day. Some of those challenges our skills, others challenge our patience. For me, this problem falls into the latter category. Hence I decided to write an article about it. &lt;/p&gt;

&lt;p&gt;I hope you found this article helpful. If you want to say hi, my DMs are always open. I am most active on &lt;a href="https://twitter.com/notifications"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/7JKaushal/"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://www.showwcase.com/clumsycoder"&gt;Showwcase&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy coding! 👨‍💻&lt;/p&gt;

</description>
      <category>github</category>
      <category>ssh</category>
      <category>terminal</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Fetch Large Data Files Through GitHub API</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Fri, 06 May 2022 16:05:24 +0000</pubDate>
      <link>https://dev.to/clumsycoder/how-to-fetch-large-data-files-through-github-api-2pmf</link>
      <guid>https://dev.to/clumsycoder/how-to-fetch-large-data-files-through-github-api-2pmf</guid>
      <description>&lt;p&gt;During my internship at &lt;a href="https://hackernoon.com/?ref=hackernoon.com"&gt;Hackernoon&lt;/a&gt;, I had a task to fetch some files from GitHub API. Initially, I thought it'd be a simple GET request but soon I realized the work is a headache. The file I needed was quite large and hence the response was telling me to use something different than I already knew. I ended up spending two days on this issue.&lt;/p&gt;

&lt;p&gt;Now it's time to write an article so that my future self and others don't have to spend so much time on a simple issue.&lt;/p&gt;

&lt;p&gt;In this article, I'll show you how to get files larger than 1MB from the GitHub API. You will learn about the following topics until the end:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fetching larger files from GitHub API&lt;/li&gt;
&lt;li&gt;Working with commit's SHA&lt;/li&gt;
&lt;li&gt;Manipulating blobs and base64 encoded data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the purpose of this article, I am using data from HackerNoon's &lt;a href="https://startups.hackernoon.com/faq?ref=hackernoon.com"&gt;Startup of the Year&lt;/a&gt; contest. The data is publicly available on &lt;a href="https://github.com/hackernoon/where-startups-trend?ref=hackernoon.com"&gt;GitHub&lt;/a&gt; if you want to follow along.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Files Smaller than 1MB
&lt;/h2&gt;

&lt;p&gt;Fetching smaller files is simple and you just need to pass three parameters to the API. First is the owner's name, which could be your username. The second is repo, which is the name of the repository where your file is committed. And path is the path to the file from the root.&lt;/p&gt;

&lt;p&gt;I have created a simple &lt;a href="https://codepen.io/7jkaushal/pen/dyJvpGW"&gt;codepen &lt;/a&gt;if you want to use working code snippets.&lt;/p&gt;

&lt;p&gt;For better understanding, I have created four variables to store data at each state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;fileSHA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fileBlob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fileContent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;fileSHA&lt;/code&gt; stores the SHA of the file we want to fetch.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fileBlob&lt;/code&gt; stores the blob fetched from the API.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fileContent&lt;/code&gt; is used to store the decoded string.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;file&lt;/code&gt; has the data that we actually need.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find the reference code in the next section, just change the folder path with the actual file path (with file extension) and you're good to go!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Large Files
&lt;/h2&gt;

&lt;p&gt;However, if you fetch a file larger than 1MB, the API would throw an error. This is due to the fact that the above endpoint does not support large files. To retrieve the data, we must instead use the &lt;a href="https://docs.github.com/en/rest/git?ref=hackernoon.com"&gt;Git Database&lt;/a&gt; API.&lt;/p&gt;

&lt;p&gt;The Git Data API allows you to read and write raw Git objects to and from your Git repository and list, as well as update Git references. This API primarily works with blobs, which is the focus of this article.&lt;/p&gt;

&lt;p&gt;Git converts a large file into a base64 encoded blob rather than storing the entire file for better performance. As a result, when you request the same file, it expects you to use the Database endpoint, which returns the blob.&lt;/p&gt;

&lt;p&gt;To retrieve a blob, you need to pass file's SHA. You might ask, what is SHA and how to get it?&lt;/p&gt;

&lt;p&gt;Every time you commit a new file, git creates a unique ID called hash or SHA to keep a record of changes. This could cause an issue sometimes but we would discuss this at the end of this article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get SHA of the file
&lt;/h2&gt;

&lt;p&gt;For now, we need to figure out a way to get &lt;code&gt;SHA&lt;/code&gt; of the desired file. GitHub API has an endpoint to interact with the file content that we can use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;repos&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/{repo}/&lt;/span&gt;&lt;span class="nx"&gt;contents&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In response, we get an array of objects having metadata about every file in the directory. The Metadata contains SHA that we can store and use later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getFileSHA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;https://api.github.com/repos/hackernoon/where-startups-trend/contents/2021/&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nx"&gt;fileSHA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;sha&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileSHA&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;getFileBlob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileSHA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;data[3].sha&lt;/code&gt; has the SHA of &lt;code&gt;votes_by_region.json&lt;/code&gt;, so we store it in &lt;code&gt;fileSHA&lt;/code&gt; for future uses. The console output would look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cSudVMjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1651851823899/zXKx82nnB.png%2520align%3D%2522left%2522" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cSudVMjR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1651851823899/zXKx82nnB.png%2520align%3D%2522left%2522" alt="image.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Fetch Blob of the file
&lt;/h2&gt;

&lt;p&gt;We have the file SHA which is required to get the blob. We need to use a different endpoint to work with blobs. This endpoint is similar to the last one but we have to pass file SHA as the third parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;repos&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="sr"&gt;/{repo}/gi&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;blobs&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;file_sha&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following function fetches the blob of our file when we provide its SHA as a parameter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;getFileBlob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileSHA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`https://api.github.com/repos/hackernoon/where-startups-trend/git/blobs/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;fileSHA&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nx"&gt;fileBlob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;
  &lt;span class="nx"&gt;convertBlob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileBlob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This request returns a base64 encoded blob. Base64 is an encoding scheme that represents binary data in an ASCII string format. It is useful when we need to store or transfer data without any modification. The console output will look gibberish but it's just how base64 encoded data is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FjLwdi6r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1651851863742/OY5omPaIW.png%2520align%3D%2522center%2522" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FjLwdi6r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1651851863742/OY5omPaIW.png%2520align%3D%2522center%2522" alt="image.png" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Convert Blob into Useful Data
&lt;/h2&gt;

&lt;p&gt;In the final step, we have to convert the base64 encoded blob into something that we can use in our program. This step is quite frustrating because the standard ways don't seem to work in some cases.&lt;/p&gt;

&lt;p&gt;After spending hours on this single problem, I have found three solutions. I don't guarantee that every solution will work out for you, but I am pretty sure one of them surely will.&lt;/p&gt;

&lt;h3&gt;
  
  
  Easiest Way
&lt;/h3&gt;

&lt;p&gt;This is the standard way natively supported by JavaScript. &lt;code&gt;atob()&lt;/code&gt; is a Web API interface that decodes base64 encoded data into a plain string.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;atob is supposed to be read as ASCII to Binary since it converts ASCII encoded base64 data into binary form. The output will be a decoded string. To convert it into its original data type, we use JSON.parse().&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;fileContents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;atob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileContents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Second Way
&lt;/h3&gt;

&lt;p&gt;If the above method throws an error, Node.js provides a method &lt;code&gt;Buffer.from()&lt;/code&gt; that you can use. It takes the string to be decoded as the first parameter and the encoding technique as the second.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fileContents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileBlob&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blobToString&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Third Way
&lt;/h3&gt;

&lt;p&gt;Final Way:&lt;br&gt;
There's a good chance the previous method won't work if you're working on the frontend. In such case, create a function that uses &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent?ref=hackernoon.com"&gt;decodeURIComponent&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// define the function&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decodeBase64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;utf8Bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;decodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/%&lt;/span&gt;&lt;span class="se"&gt;([&lt;/span&gt;&lt;span class="sr"&gt;0-9A-F&lt;/span&gt;&lt;span class="se"&gt;]{2})&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fromCharCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;0x&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;atob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;utf8Bytes&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can call this function by passing the fileBlob as the parameter, and get your decoded string!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;fileContents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;decodeBase64&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileBlob&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fileContents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nothing Worked?
&lt;/h2&gt;

&lt;p&gt;Well, there are two final options that you can try. Either you can use FileReader API or use decodeURIComponent in a different way.&lt;/p&gt;

&lt;p&gt;FileReader API: You can find MDN docs &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/FileReader?ref=hackernoon.com"&gt;here&lt;/a&gt;.&lt;br&gt;
decodeURIComponent: Refer to &lt;a href="https://www.base64decoder.io/javascript/?ref=hackernoon.com"&gt;this&lt;/a&gt; blog by Rajeev Singh that handles 16bit encoded strings.&lt;br&gt;
Alternatively, you can try an NPM package called &lt;a href="https://www.npmjs.com/package/js-base64?ref=hackernoon.com"&gt;js-base64&lt;/a&gt; as well. I have not used it myself so don't have opinions regarding it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Restrictions
&lt;/h2&gt;

&lt;p&gt;As mentioned earlier, SHA is the unique ID that changes every time you modify the file. Also, since we have a hardcoded object index in the &lt;code&gt;getFileSHA()&lt;/code&gt; function, API might respond with SHA of a different file if you add or delete files in the directory.&lt;/p&gt;

&lt;p&gt;To tackle this, you can use the exact file name instead of the index so you can keep the function unmodified after committing new changes.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Git stores larger files in blob format and hence we use GitHub Database API to fetch files larger than 1MB.&lt;/li&gt;
&lt;li&gt;We need to provide a username, repo name and the file's SHA to get the blob.&lt;/li&gt;
&lt;li&gt;To get SHA, we provide a folder path to the endpoint and store it in a variable.&lt;/li&gt;
&lt;li&gt;Later we pass SHA as a parameter to another endpoint and get a base64 encoded blob.&lt;/li&gt;
&lt;li&gt;The blob must be decoded into a plain string and then converted into its original format using &lt;code&gt;JSON.parse()&lt;/code&gt; before you can use it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  More references
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/rest/repos/contents"&gt;GitHub repositories' contents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/rest/git?ref=hackernoon.com"&gt;Git Database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/rest/guides/getting-started-with-the-git-database-api?ref=hackernoon.com"&gt;Getting started with the Git Database API&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Do let me know which decoding method worked for you. I am most active on &lt;a href="https://twitter.com/clumsy_coder?ref=hackernoon.com"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.linkedin.com/feed/"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://www.showwcase.com/clumsycoder?ref=hackernoon.com"&gt;Showwcase&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Happy fetching!&lt;/p&gt;

</description>
      <category>github</category>
      <category>api</category>
      <category>tutorial</category>
      <category>git</category>
    </item>
    <item>
      <title>Maximize your Tailwind efficiency by using these resources</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Sun, 09 Jan 2022 05:39:27 +0000</pubDate>
      <link>https://dev.to/clumsycoder/maximize-your-tailwind-efficiency-by-using-these-resources-1agm</link>
      <guid>https://dev.to/clumsycoder/maximize-your-tailwind-efficiency-by-using-these-resources-1agm</guid>
      <description>&lt;p&gt;I have been using Tailwind for the past few months and I don't think now I would switch to other styling frameworks. It is just a lifesaver! It is mobile first, has an easy learning curve and saves a lot of time. And it doesn't make me feel dumb like CSS does 😟&lt;/p&gt;

&lt;p&gt;Tailwind is already pretty good, but we can make it even better. Here are a few resources that helped me to build projects with Tailwind efficiently and fast. &lt;/p&gt;

&lt;p&gt;Before starting, I expect you to be already familiar with Tailwind and know about its workings. I have discussed CSS prerequisites and use cases for Tailwind in my last blog, which you can read &lt;a href="https://clumsycoder.hashnode.dev/getting-started-with-tailwindcss" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Online Playground
&lt;/h2&gt;

&lt;p&gt;Tailwind Play is an online playground for Tailwind CSS. The best thing about it is that it shows the output in no seconds! You can also change the CSS3 styling or &lt;code&gt;tailwind.config&lt;/code&gt; file if needed.&lt;br&gt;&lt;br&gt;
It also has autocomplete and syntax highlighting for tailwind classes.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://play.tailwindcss.com/" rel="noopener noreferrer"&gt;Tailwind Play&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  VS Code Extensions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tailwind CSS IntelliSense
&lt;/h3&gt;

&lt;p&gt;This is a &lt;strong&gt;MUST&lt;/strong&gt; have extension. It has autocomplete, syntax highlighting and lining abilities. It also lets us see CSS for a particular tailwind class when hovered.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641564732856%2FzMq0YlLDA.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641564732856%2FzMq0YlLDA.gif" alt="IntelliSense.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔥 Get it on &lt;a href="https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss" rel="noopener noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Headwind
&lt;/h3&gt;

&lt;p&gt;Headwind is an opinionated CSS class sorter that enforces consistent order of classes. It parses the entire file on each save and sorts classes on the basis of importance and removes duplicates.&lt;br&gt;
It also highlights conflicting classes and lets us choose what to omit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641565367984%2Fgq_s858if.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641565367984%2Fgq_s858if.gif" alt="Headwind .gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔥 Get it on &lt;a href="https://marketplace.visualstudio.com/items?itemName=heybourn.headwind" rel="noopener noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tailwind Docs
&lt;/h3&gt;

&lt;p&gt;This extension will open the documentation directly from VS Code. Open command palette by &lt;code&gt;ctrl/cmnd + shift + p&lt;/code&gt; and type the topic you want to search. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641634903244%2Fy5X4tPjSwD.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1641634903244%2Fy5X4tPjSwD.gif" alt="Animation4.gif"&gt;&lt;/a&gt;&lt;br&gt;
🔥 Get it on &lt;a href="https://marketplace.visualstudio.com/items?itemName=austenc.tailwind-docs" rel="noopener noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tailwind Styled Snippets
&lt;/h3&gt;

&lt;p&gt;This is useful only if you're using &lt;code&gt;styled-components&lt;/code&gt; with your react project. This extension rocks in creating components with tailwind and styled components or emotionjs.&lt;/p&gt;

&lt;p&gt;🔥 Get it on &lt;a href="https://marketplace.visualstudio.com/items?itemName=muhajirframe.tailwind-styled-snippets" rel="noopener noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Components Library
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Flowbite
&lt;/h3&gt;

&lt;p&gt;Flowbite is a freemium component library consisting of 400+ components and elements. The free version is enough to fulfil basic use cases but there is also a premium version. Two premium plans are 'developers' and 'designers' that give you more features to use. Premium version has features like post CSS configuration, JS minification, Figma preview and etc.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://flowbite.com/docs/getting-started/introduction/" rel="noopener noreferrer"&gt;Flowbite&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tailwind Components
&lt;/h3&gt;

&lt;p&gt;The biggest open source component library for Tailwind UI components and templates. It has a variety of components to choose from and you can copy paste the code that you need.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://tailwindcomponents.com/" rel="noopener noreferrer"&gt;Website link&lt;/a&gt;&lt;br&gt;&lt;br&gt;
⚡ &lt;a href="https://github.com/tailwindcomponents" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  PostSrc
&lt;/h3&gt;

&lt;p&gt;PostSrc also has a wide range of tailwind components to use, but it's not as famous as Tailwind.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://postsrc.com/" rel="noopener noreferrer"&gt;PostSrc&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Colors
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Tailwind Shades
&lt;/h3&gt;

&lt;p&gt;This website generates color shades when a base color is given as the input. You can also change hue, saturation or light of colors. At last, you can copy code to paste in &lt;code&gt;tailwind.config&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://www.tailwindshades.com/" rel="noopener noreferrer"&gt;Website link&lt;/a&gt;&lt;br&gt;&lt;br&gt;
⚡ &lt;a href="https://github.com/anheric/tailwindshades" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shades Generator
&lt;/h3&gt;

&lt;p&gt;Similar to Tailwind Shades but it has a color picker that you can use to get the color from the browser in real time. It doesn't have the functionality to adjust HSL but you can remove a shade from the palette if you want to.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://javisperez.github.io/tailwindcolorshades/" rel="noopener noreferrer"&gt;Website link&lt;/a&gt;&lt;br&gt;&lt;br&gt;
⚡ &lt;a href="https://githttps://github.com/javisperez/tailwindcolorshades" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Cheat Sheet
&lt;/h2&gt;

&lt;p&gt;Actually, official docs are so great that you don't even need cheat sheets. But these are quick references if you need everything in one place. &lt;a href="https://twitter.com/nerdcave" rel="noopener noreferrer"&gt;Jay Alraj&lt;/a&gt; has created a site that has everything about Tailwind CSS in a clean and concise way.&lt;br&gt;&lt;br&gt;
One thing, it is not updated to Tailwind v3 yet but I assume something will come out soon.&lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://nerdcave.com/tailwind-cheat-sheet" rel="noopener noreferrer"&gt;Cheatsheet link&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Plugins
&lt;/h2&gt;

&lt;p&gt;Tailwind CSS also gives you the flexibility to add custom plugins. &lt;/p&gt;

&lt;p&gt;There are many tailwind plugins available on the internet, but one that I used is from a GitHub repo &lt;a href="https://github.com/lorisleiva/tailwindcss-plugins" rel="noopener noreferrer"&gt;tailwind-plugins&lt;/a&gt;. It has plugins for animations, gradients, keyframes and pagination.&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://github.com/lorisleiva/tailwindcss-plugins/tree/main/gradients" rel="noopener noreferrer"&gt;Gradients&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://github.com/lorisleiva/tailwindcss-plugins/tree/main/animations" rel="noopener noreferrer"&gt;Animations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://github.com/lorisleiva/tailwindcss-plugins/tree/main/keyframes" rel="noopener noreferrer"&gt;Keyframes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://github.com/lorisleiva/tailwindcss-plugins/tree/main/pagination" rel="noopener noreferrer"&gt;Pagination&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another repo, &lt;a href="https://github.com/benface/tailwindcss-typography" rel="noopener noreferrer"&gt;tailwind-typography&lt;/a&gt; is a plugin for manipulating the typography of the app.&lt;/p&gt;

&lt;p&gt;⚡ &lt;a href="https://github.com/benface/tailwindcss-typography" rel="noopener noreferrer"&gt;Typography&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Icons
&lt;/h2&gt;

&lt;h3&gt;
  
  
  HeroIcons
&lt;/h3&gt;

&lt;p&gt;HeroIcons is an open source project for SVG icons created by the makers of Tailwind CSS itself! You can integrate them with React or Vue libraries and also get a Figma file to use in your designs &lt;/p&gt;

&lt;p&gt;🌐 &lt;a href="https://heroicons.com/" rel="noopener noreferrer"&gt;Website link&lt;/a&gt;&lt;br&gt;&lt;br&gt;
⚡&lt;a href="https://github.com/tailwindlabs/heroicons" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎨 &lt;a href="https://www.figma.com/community/file/958423903283802665" rel="noopener noreferrer"&gt;Figma&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I found these resources very helpful while developing projects. If you think I am not using something that would make my life easier, do let me know!  I am most active on &lt;a href="https://twitter.com/clumsy_coder" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/7JKaushal" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://www.clumsycoder.showwcase.com" rel="noopener noreferrer"&gt;Showwcase&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is my second article about Tailwind CSS. I am planning to write more as learn more about this. Subscribe to the newsletter or follow me to have an update about it :)&lt;/p&gt;

&lt;p&gt;Happy Designing! 🎨&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Things to Know Before You Start Tailwind CSS</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Tue, 28 Dec 2021 08:32:32 +0000</pubDate>
      <link>https://dev.to/clumsycoder/things-to-know-before-you-start-tailwind-css-4ebj</link>
      <guid>https://dev.to/clumsycoder/things-to-know-before-you-start-tailwind-css-4ebj</guid>
      <description>&lt;p&gt;With the rising popularity of Tailwind CSS, many of us might jump directly on Tailwind just to catch up with the hype. It won't take them much of their time to realize that it is not like any other traditional CSS framework. They might not even get a full picture of Tailwind and end up hating it thinking it's harder than plain CSS.  &lt;/p&gt;

&lt;p&gt;Here is my attempt to cover everything that you need to know to use Tailwind CSS in your next project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This blog focuses on CSS concepts that are essential to know for using Tailwind CSS. It is &lt;strong&gt;not&lt;/strong&gt; a tutorial to get started with it.&lt;br&gt;
&lt;a href="https://tailwindcss.com/docs/installation"&gt;Official documentation&lt;/a&gt; has covered that part pretty well.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Utility First Frameworks
&lt;/h2&gt;

&lt;p&gt;The main reason why Tailwind is different from other frameworks is that it is a utility based framework, whereas frameworks like Bootstrap or Bulma are component based frameworks. Now, what's the difference?&lt;br&gt;&lt;br&gt;
Component based frameworks provide a set of components that are used by adding predefined classes to HTML elements. For example, Bootstrap has a total of 24 components that we can use by simply adding related classes.&lt;br&gt;&lt;br&gt;
Tailwind CSS on the other hand is a utility framework. It doesn't limit your design by predefined opinionated components but provides powerful building blocks that are useful to create a unique design for your projects.&lt;/p&gt;

&lt;p&gt;Tailwind achieves this by having a class for every CSS property. Additionally, we can add our valid CSS properties to make a new tailwind class as per our needs. This gives total freedom and flexibility while designing the front end.&lt;/p&gt;

&lt;p&gt;But this comes with a cost. Component based libraries don't require you to know much about plain CSS. You refer to the documentation and use the code that you need. Tailwind being a low level utility based framework doesn't work in that way. You need to have a profound understanding of CSS to use Tailwind in the best way.&lt;/p&gt;

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

&lt;p&gt;There is only one word that describes CSS - overwhelming. Though Tailwind gives you flexibility and saves time requires to type everything explicitly, your knowledge of plain CSS is considered as the main pre-requisites. &lt;/p&gt;

&lt;h3&gt;
  
  
  Sizing Units
&lt;/h3&gt;

&lt;p&gt;Especially, &lt;code&gt;rem&lt;/code&gt;.  All utility classes use &lt;code&gt;rem&lt;/code&gt; for styling. Tailwind has classes from smallest rem unit  &lt;code&gt;0.125rem&lt;/code&gt; (2px) to all the way up to 24rem. Additionally, you can add units as per your choice in &lt;code&gt;tailwind.config&lt;/code&gt; file (which can be &lt;code&gt;px&lt;/code&gt;, &lt;code&gt;em&lt;/code&gt; or anything else too).&lt;/p&gt;

&lt;h3&gt;
  
  
  Responsive Design
&lt;/h3&gt;

&lt;p&gt;Tailwind is mobile first approach to styling. So whatever you write is suited for the smallest screen size defined while configuring tailwind. By default, the smallest utility class is &lt;code&gt;sm&lt;/code&gt; that sets media query of a minimum width of 640px. You are supposed to mention the breakpoint if you are adding classes for bigger sizes than that.&lt;br&gt;
That's why, knowing about responsive design, sizing units and media queries are a must to create anything eye-pleasing with Tailwind.&lt;/p&gt;

&lt;h3&gt;
  
  
  Flexbox &amp;amp; Grid
&lt;/h3&gt;

&lt;p&gt;Creating layouts using grid and flexbox classes is easy as compared to traditional ways of using them. However, you might find it confusing because many classes conflict with each other resulting in a single class that is used with both layouts.&lt;br&gt;
I was talking about &lt;code&gt;justify-{value}&lt;/code&gt;, &lt;code&gt;align-{value}&lt;/code&gt;, &lt;code&gt;place-{value}&lt;/code&gt; and &lt;code&gt;gap&lt;/code&gt;. These classes serve the same purpose for flexbox as well as grid. Having a clear understanding of them would help you to save hours of confusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other Important Concepts
&lt;/h3&gt;

&lt;p&gt;Of course, this is not it; CSS is more than that, and so is Tailwind. Units, responsive design and Flexbox/Grid need a special mention because once you understand how these things work, it won't be difficult for you to use Tailwind with its max out capacity.&lt;/p&gt;

&lt;p&gt;Other than that, here are a few more things that are good to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS Transition and Transform Property&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/aspect-ratio"&gt;Aspect Ratios&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tailwindcss.com/docs/preflight"&gt;Preflight&lt;/a&gt;: Tailwind has a set of base styling  practices built on top of &lt;a href="https://github.com/sindresorhus/modern-normalize"&gt;modern-normalize&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am not mentioning padding, margin, box sizing, float and z-index because I believe that if you don't know how to work with them, you should think about sticking to plain CSS for some more time.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Tailwind?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;If you have intermediary experience with plain CSS and know how CSS is supposed to work, you can use Tailwind pretty much anywhere you want.&lt;/li&gt;
&lt;li&gt;If your front end stack has a component based library such as react, using tailwind will allow you to use it with its maximum reusability and scalability of Tailwind.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When NOT to use Tailwind?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Do not even consider using Tailwind if you don't have intermediate experience with CSS. You might not face issues in the very beginning but as your project gets bigger, it'd get messier and confusing.&lt;/li&gt;
&lt;li&gt;If you are building websites with Vanilla JS, you might not use Tailwind at its full potential. Using same class names for every different component would make the code redundant, non-readable and messy.&lt;/li&gt;
&lt;li&gt;If you are building prototypes and time/deadline is a major factor, using tailwind will slow you down. Tailwind is best suitable for big projects which give you enough time to focus on design as well as logic.&lt;/li&gt;
&lt;li&gt;Similarly, using Tailwind with projects where backend logic or backend services is more important than design must be avoided. Because you'd end up spending more time on design when your focus should be on logic.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;Tailwind CSS is a utility based framework so you have to combine multiple utilities and create a component by yourself. That's why knowing about plain CSS is a must. You should have a clear understanding of sizing units, responsive design and media queries. Knowing about conflicting flexbox and grid properties would also save your confusion when you start building projects.&lt;br&gt;&lt;br&gt;
Don't jump to Tailwind if you are not comfortable with plain CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using Tailwind when you struggle with fundamentals will only lead to frustrations. But once your fundamentals are clear, no one can stop you from harnessing the full potential of Tailwind CSS! &lt;/p&gt;

&lt;p&gt;I have scheduled more blogs about starting Tailwind CSS so if you're interested, do subscribe to the newsletter and follow &lt;a href="https://clumsycoder.hashnode.dev/"&gt;my blog&lt;/a&gt;. Also, if you think there's anything that can be improved or added, I am happy to hear your opinion. I am most active on &lt;a href="https://twitter.com/clumsy_coder"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/7JKaushal"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy Designing! 🎨&lt;/p&gt;

</description>
      <category>tailwindcss</category>
      <category>beginners</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>JavaScript Basics: Double Equals (==) and Triple Equals (===)</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Wed, 22 Dec 2021 05:16:21 +0000</pubDate>
      <link>https://dev.to/clumsycoder/javascript-basics-double-equals-and-triple-equals--46e0</link>
      <guid>https://dev.to/clumsycoder/javascript-basics-double-equals-and-triple-equals--46e0</guid>
      <description>&lt;p&gt;When I started learning JavaScript, one thing that amazed me was the use of &lt;em&gt;three equals to symbols&lt;/em&gt;  to compare variables. As someone who learnt C++, Java and python before JS, this was really confusing. &lt;/p&gt;

&lt;p&gt;I also remember the frustration when my code wasn't working because I used a wrong operator. I ended up wasting an hour trying to find a bug. hehe.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are those called? 🧐
&lt;/h1&gt;

&lt;p&gt;The double equality operator (==) is called 'Loose Equality' but sometimes also referred to as 'Abstract Equality' operator. Triple equality operator (===) is called as 'Strict Equality' operator and some people love to call it 'Identity operator'.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why they exist? 🤔
&lt;/h1&gt;

&lt;p&gt;Both have similar purpose, that is comparing variable at right side of the operator with the left one and compute the output. The result is Boolean true if both variables are same and false if they are different.&lt;br&gt;&lt;br&gt;
What's the difference, you might ask! Here comes the JavaScript with its bright yellow color to stop you right there...&lt;/p&gt;
&lt;h1&gt;
  
  
  Exact difference 😲
&lt;/h1&gt;

&lt;p&gt;Though the purpose seems similar, if we go under the hood and see how they function; we get the idea about their individual existence.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The loose equality operator &lt;strong&gt;first performs type conversions, if necessary&lt;/strong&gt;. Then it computes the result based on the new converted variable.&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a = 20
let b = "20"

console.log(a == b) // Expected output: true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, variable &lt;code&gt;b&lt;/code&gt; of data type &lt;code&gt;string&lt;/code&gt; first gets converted into number data type and then gets compared with &lt;code&gt;a&lt;/code&gt; which already has a data type of number.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Identity operator in other hands, &lt;strong&gt;does not&lt;/strong&gt; performs any type conversion and presumes that both variables have same data type.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a = 20
let b = "20"

console.log(a === b) // Expected output: false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the answer is false because data types of variables being compared are different and not getting converted either.&lt;br&gt;
Let's dive deep...&lt;/p&gt;
&lt;h1&gt;
  
  
  Loose Equality Operators
&lt;/h1&gt;

&lt;p&gt;By now, we know this twin pair does type conversion before comparing variables. But what happens when we compare between 0, empty string, null, undefined and Booleans with each other? This is where it gets weird and difficult to understand. Let me explain it by example itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Huh! take a breath. things are about to get worse.... because now we will deal with objects and strings!&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing objects with loose equality
&lt;/h2&gt;

&lt;p&gt;When two objects are being compared, the result is &lt;code&gt;true&lt;/code&gt; if and only if both variables are referencing to same object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;foo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;foo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;obj3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Comparing with string and string objects
&lt;/h2&gt;

&lt;p&gt;Quite similar to how objects are compared, if we compare a primitive string with string object (&lt;code&gt;new String()&lt;/code&gt;), object string will be converted to a primitive string and values will be compared.&lt;br&gt;&lt;br&gt;
But if both variables are created using String objects, then they should reference to same object to get &lt;code&gt;true&lt;/code&gt; as an output.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;String&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`String`&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;String&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str4&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;String&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str5&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;String&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str6&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;String&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;str7&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;str6&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str5&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;str6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case, every comparison will be computed as &lt;code&gt;true&lt;/code&gt; except one between &lt;code&gt;str5&lt;/code&gt; and &lt;code&gt;str6&lt;/code&gt;. Since both of those are declared as objects and don't reference to same variable, the output will be &lt;code&gt;false&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
For the same reason, if we compare &lt;code&gt;str5&lt;/code&gt; and &lt;code&gt;str7&lt;/code&gt;, the output will be &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Strict Equality Operators
&lt;/h1&gt;

&lt;p&gt;There is nothing much that can be added here. Strict equality operators are less confusing... &lt;strong&gt;BUT!&lt;/strong&gt; We need to be extra careful while comparing two objects with strict equality.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Adam&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Adam&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;({}&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="p"&gt;{})&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;obj3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj3&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;obj3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The simplest explanation I found about this is from a blog published by &lt;a href="https://twitter.com/rauschma"&gt;Axel Rauschmayer&lt;/a&gt;. He says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Objects have unique identities and are compared by reference:&lt;br&gt;&lt;br&gt;
Every object you create via an expression such as a constructor or a literal is considered different from every other object; a fact that can be observed via the equality operator (===).&lt;br&gt;&lt;br&gt;
That operator compares objects by reference: two objects are only equal if they have the same identity. It does not matter whether they have the same content or not."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The detailed blog can be found &lt;a href="https://2ality.com/2011/03/javascript-values-not-everything-is.html"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Most of the times in real world scenarios, we end up using strict equality operator just because how simple and straightforward it is. &lt;/p&gt;

&lt;h1&gt;
  
  
  Key Takeaways 📝
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Loose Equality Operators (==)
&lt;/h3&gt;

&lt;p&gt;Loose Equality operator performs type conversion before comparing values.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;when comparing &lt;code&gt;null&lt;/code&gt; and &lt;code&gt;undefined&lt;/code&gt;, return &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If &lt;code&gt;Number&lt;/code&gt; and &lt;code&gt;String&lt;/code&gt; are being compared, try to convert the string into a numeric value.&lt;/li&gt;
&lt;li&gt;If both variables are objects, return &lt;code&gt;true&lt;/code&gt; only if both reference to the same object.&lt;/li&gt;
&lt;li&gt;If they have same data type,

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Number&lt;/code&gt;: return &lt;code&gt;true&lt;/code&gt; only if both variables have same value.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;String&lt;/code&gt;: return &lt;code&gt;true&lt;/code&gt; only if both variables have exact same characters in exact same order.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Boolean&lt;/code&gt;: Convert &lt;code&gt;true&lt;/code&gt; to &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;false&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt; and compare likewise.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Strict Equality Operator (===)
&lt;/h3&gt;

&lt;p&gt;Strict equality operator presumes that both variables have same data types and directly compares them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When variables have different data types - return &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When both of them are &lt;strong&gt;either&lt;/strong&gt; &lt;code&gt;null&lt;/code&gt; &lt;strong&gt;or&lt;/strong&gt; &lt;code&gt;undefined&lt;/code&gt; - return &lt;code&gt;true&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Return &lt;code&gt;false&lt;/code&gt; if any of the variable is &lt;code&gt;NaN&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When both variables are objects, return &lt;code&gt;true&lt;/code&gt; only if both refer to same object.&lt;/li&gt;
&lt;li&gt;If they have same data types:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Numbers&lt;/code&gt;: Must have numeric values between &lt;code&gt;+0&lt;/code&gt; and &lt;code&gt;-0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;String&lt;/code&gt;:  both variables have exact same characters in exact same order.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Boolean&lt;/code&gt;: both of them must be &lt;strong&gt;either&lt;/strong&gt; &lt;code&gt;true&lt;/code&gt; &lt;strong&gt;or&lt;/strong&gt; &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;The strict equality operator is best when it comes to real world calculations and software development. 99 percent of the time we should use the same in our code.&lt;br&gt;&lt;br&gt;
And for the 01 percent, ask yourself do you really know what you want and what you are doing. If answers are satisfactory, go on!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>I started DSA and CP and fell right hard to the ground!</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Thu, 02 Dec 2021 13:21:58 +0000</pubDate>
      <link>https://dev.to/clumsycoder/i-started-dsa-and-cp-and-fell-right-hard-to-the-ground-3bjf</link>
      <guid>https://dev.to/clumsycoder/i-started-dsa-and-cp-and-fell-right-hard-to-the-ground-3bjf</guid>
      <description>&lt;p&gt;As like most of CS undergrad students in India, I decided to start competitive programming to level up my coding skills. It was August 2021 and I thought I can easily get comfortable in a year - so it will help me in my college placements. &lt;br&gt;
But things got chaotic and I started questioning my entire software development experience and four years of college life. I became so stressed that I quit doing CP and lost confidence to build basic websites.&lt;/p&gt;

&lt;p&gt;It's been four months now and I have enough confidence to start everything once again. In my fallback, I tried to analyse what went wrong and what steps should I have taken to not make it worse. &lt;/p&gt;

&lt;p&gt;There were plenty of things that I did wrong. I started without knowing anything about CP or DSA. I just jumped in the river thinking how cool I would look while diving deep into the water without guessing the depth of the water.&lt;/p&gt;



&lt;p&gt;Here are a few things that I want to share from my experience of one month of doing CP and DSA:&lt;/p&gt;
&lt;h2&gt;
  
  
  🧮 Understand the difference
&lt;/h2&gt;

&lt;p&gt;The first mistake that I made was that I treated both things equally - in the wrong way! 'Data Structures and Algorithms' or DSA and 'Competitive Programming' or infamously known as CP are inter-related but quite opposite things.&lt;/p&gt;

&lt;p&gt;DSA is all about solving real world problems mainly using programming concepts that are vaguely related to computer science. You are supposed to find the solution that is most suitable for real world scenarios. Later you need to implement it using code.  &lt;/p&gt;

&lt;p&gt;The best word I have come across to describe CP is 'mind sport'. You compete with other coders to solve a problem using your programming, logic and analytics skills in a minimal amount of time and memory.&lt;/p&gt;

&lt;p&gt;It is said that DSA helps to solve real world problems that you might face in your actual job. Focusing too much on CP would surely help you land a good job but the later path would be difficult. You can achieve similar things with both but sticking on one path would help you to achieve it sooner. In either case, your problem solving skills will play an important role. &lt;/p&gt;
&lt;h2&gt;
  
  
  🎯 Set your goal
&lt;/h2&gt;

&lt;p&gt;Ask yourself, what is your final goal behind this. Do you want to ace programming interviews, increase your development skills, want a mind sport to train your brain, get better at problem solving and critical thinking or anything else?&lt;br&gt;&lt;br&gt;
Based on your goal, you can focus on a few important things rather than trying everything out and getting nothing sufficient in return.&lt;/p&gt;

&lt;p&gt;If you are preparing for interviews, you want to focus more on development and problem solving skills. You don't need to keep up with each and every online coding competition. Solving problems on &lt;a href="https://leetcode.com/"&gt;LeetCode&lt;/a&gt;, &lt;a href="https://www.geeksforgeeks.org/"&gt;GeeksForGeeks&lt;/a&gt; and &lt;a href="https://www.hackerrank.com/dashboard"&gt;HackerRank&lt;/a&gt; would be enough. Your main focus must be on logic building and Data Structures and Algorithms.&lt;/p&gt;

&lt;p&gt;But if your goal is to train your brain like a pro coder and get better at problem solving and critical thinking; you should try competitive programming. The main trick is to use every aspect of programming that you know to solve the problem in the most efficient way possible. &lt;/p&gt;

&lt;p&gt;Doing competitive programming would automatically prepare you for interview rounds since you are working on your DSA skills at the same time. However, it's hard to say the other way around.&lt;/p&gt;
&lt;h2&gt;
  
  
  📑 Start gathering information
&lt;/h2&gt;

&lt;p&gt;Once you have decided what to do - DSA or CP, give yourself two days and collect everything that you find useful. Books, roadmaps, YouTube playlists, websites, portals, influencers, everything you can. I am saying this because I found some useful stuff AFTER I quit. So having some base in your hand before you start will give you an idea of what you will do next.&lt;br&gt;&lt;br&gt;
One important thing that you should do is talk to people who have been doing it and have a better experience. Ask for help, they can guide you better than most of the things I mentioned in the last paragraph.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  💡 Pro Tip
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Do not blindly follow anyone, especially YouTubers and influencers. Just take the informative part that they have to offer and completely ignore everything else.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  ✅ Clear your fundamentals
&lt;/h2&gt;

&lt;p&gt;Okay, so now your prerequisites are completed. It's time to jump to the main part. I believe that this is the second worst mistake that I made Which overwhelmed me and I got exhausted too early. I didn't clear my fundamentals and directly started with CP thinking I would catch up on anything that I might have missed as I go. &lt;strong&gt;AND I WAS WRONG!&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Starting without clearing your fundamentals won't look like a problem at first but it'll slowly affect your performance as you move on to the intermediate stuff. Make sure you are familiar with following this before you start solving problems:&lt;/p&gt;
&lt;h3&gt;
  
  
  Language
&lt;/h3&gt;

&lt;p&gt;The language choice won't make a lot of difference if you ask me but it is always better if you are doing it with C++, Java or Python. During most of the interviews, at least in India, you're not allowed to use languages other than C, C++, Java and Python. And since time plays an important role in CP, choosing a faster language (Like C++!) is always beneficial.&lt;/p&gt;
&lt;h3&gt;
  
  
  Programming fundamentals
&lt;/h3&gt;

&lt;p&gt;If you're reading this, there is a high chance that your programming fundamentals are already clear. But don't forget to brush up on your learnings before you start. You can use the following list as a checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data types&lt;/li&gt;
&lt;li&gt;Functions / methods / classes&lt;/li&gt;
&lt;li&gt;Type conversions&lt;/li&gt;
&lt;li&gt;Decision Making&lt;/li&gt;
&lt;li&gt;File I/O&lt;/li&gt;
&lt;li&gt;Bits / strings / arrays manipulation&lt;/li&gt;
&lt;li&gt;Time and space complexities&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Language fundamentals
&lt;/h3&gt;

&lt;p&gt;Every language has something unique to offer, learn it. There might be efficient ways to implement logic that you were unaware of. This would help to improve your understanding of the language which will help you to solve problems quicker.  &lt;/p&gt;

&lt;p&gt;If you have chosen Java, using the collection framework will save a lot of time, redundancy and lines of your code. Similarly, using the STL library in C++ would make your code more time efficient.&lt;/p&gt;
&lt;h3&gt;
  
  
  Maths
&lt;/h3&gt;

&lt;p&gt;You do not only need to know these concepts on the surface but also be able to solve questions that are related to concepts using code. Start with following concepts and you'll learn other concepts as you go to next levels.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Number theory&lt;/li&gt;
&lt;li&gt;Bitwise operating&lt;/li&gt;
&lt;li&gt;Modulo arithmetic&lt;/li&gt;
&lt;li&gt;LCM / HCF&lt;/li&gt;
&lt;li&gt;Square roots / Factors&lt;/li&gt;
&lt;li&gt;Fibonacci numbers&lt;/li&gt;
&lt;li&gt;Prime numbers&lt;/li&gt;
&lt;li&gt;Logs (To understand complexities)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🧸 Start with baby steps
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Rome was not built in a day! &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Start slowly. Take one step at a time. Take enough time to understand the problem and solve it wisely. You would fall at beginning. You will get stuck. You might spend an entire day on a single problem. You might get demotivated, exhausted and overburdened. But it is just a start and you will eventually get better if you keep practising!&lt;/p&gt;

&lt;p&gt;Trust the process and do not quit - unlike I did :)&lt;/p&gt;

&lt;p&gt;If you feel stuck, figure out what exactly is bothering you and spend some time getting to know it better. Take small breaks and try to solve again.&lt;/p&gt;
&lt;h2&gt;
  
  
  ✍️ Document your progress
&lt;/h2&gt;

&lt;p&gt;Whatever you learn, make notes from what you have learnt. I recommend creating a spreadsheet that has information about the problem that you solved. This would help you later to find similar patterns and better approaches while solving new problems. &lt;/p&gt;
&lt;h2&gt;
  
  
  🤞 Don't beat yourself up
&lt;/h2&gt;

&lt;p&gt;This might be ironic because it's coming from me, I know.&lt;br&gt;
Take breaks once in a while. Do some other stuff that doesn't include programming. I was so exhausted on the third week that I too rest for the rest of the week. &lt;/p&gt;


&lt;h2&gt;
  
  
  📝 Summing Up
&lt;/h2&gt;

&lt;p&gt;I have summarized everything on my Twitter, here's a look:&lt;br&gt;
&lt;/p&gt;
&lt;blockquote class="ltag__twitter-tweet"&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ldnFtdLV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/1448649982689513494/sZu7U74q_normal.jpg" alt="Kaushal Joshi profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Kaushal Joshi
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @clumsy_coder
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ir1kO05j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      I started DSA and CP and fell right hard to the ground!&lt;br&gt;&lt;br&gt;In August'21, I decided to start competitive programming to get better in problem solving &amp;amp; coding rounds. &lt;br&gt;But things got chaotic and I had to quit within a month.&lt;br&gt;&lt;br&gt;Here's what I have learnt: 🧵👇
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      07:38 AM - 02 Dec 2021
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1466310763266535425" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fFnoeFxk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-reply-action-238fe0a37991706a6880ed13941c3efd6b371e4aefe288fe8e0db85250708bc4.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1466310763266535425" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k6dcrOn8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-retweet-action-632c83532a4e7de573c5c08dbb090ee18b348b13e2793175fea914827bc42046.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/like?tweet_id=1466310763266535425" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRQc9lOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/twitter-like-action-1ea89f4b87c7d37465b0eb78d51fcb7fe6c03a089805d7ea014ba71365be5171.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;h3&gt;
  
  
  External Resources
&lt;/h3&gt;

&lt;p&gt;If you want to start DSA, get yourself comfortable with these websites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://leetcode.com/"&gt;LeetCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.geeksforgeeks.org/"&gt;GeeksForGeeks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.hackerrank.com/dashboard"&gt;HackerRank&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is a wonderful playlist that I will follow in my journey: &lt;a href="https://youtube.com/playlist?list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ"&gt;DSA With Kunal&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you are planning for CP, check these sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.codechef.com/"&gt;CodeChef&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://a2oj.com/"&gt;A2OJ&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codeforces.com/"&gt;CodeForces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UCh-5M0r0SBgb5xNCFXG7aXQ"&gt;CodeChef YouTube channel&lt;/a&gt; also posts some amazing content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;I directly jumped on DSA and CP and got a wonderful reward for it. After researching it for about four months, I believe I have enough knowledge as well as the confidence to start DSA once again. As mentioned in the last few points, I am planning to document the learning - at least the fundamentals and share it on my blogs and socials.  &lt;/p&gt;

&lt;p&gt;If you have any experience in the field of DSA or problem solving, I would really love to hear your experience and have your guidance. I am active on &lt;a href="https://twitter.com/clumsy_coder"&gt;Twitter&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/7JKaushal"&gt;LinkedIn&lt;/a&gt; if you want to say hi!&lt;br&gt;
You can also subscribe to my newsletter to stay updated with future blogs.&lt;/p&gt;

&lt;p&gt;Happy Problem Solving! 🥵🥇&lt;/p&gt;

</description>
      <category>programming</category>
      <category>datastructures</category>
      <category>competitiveprogramming</category>
      <category>experience</category>
    </item>
    <item>
      <title>My experience with LGM'SOC-21!</title>
      <dc:creator>Kaushal Joshi</dc:creator>
      <pubDate>Thu, 12 Aug 2021 15:52:51 +0000</pubDate>
      <link>https://dev.to/clumsycoder/my-experience-with-lgm-soc-21-1j5a</link>
      <guid>https://dev.to/clumsycoder/my-experience-with-lgm-soc-21-1j5a</guid>
      <description>&lt;p&gt;Welcome to my very first blog as well as very first actual open source experience! 🥳&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VhpsvFlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdi4lhcbyjeke5roywtx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VhpsvFlF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdi4lhcbyjeke5roywtx.png" alt="Idea"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;'&lt;a href="https://letsgrowmore.in/"&gt;Let's Grow More&lt;/a&gt;' is a community of developers helping other developers to 'grow' as a developer. The community aims to help new software developers and provide learning opportunities to build a better tomorrow by organizing various events.&lt;/p&gt;

&lt;p&gt;One of the events is &lt;strong&gt;LetsGrowMore's Summer of Code&lt;/strong&gt;, an open-source event which was conducted from May to August of 2021. It was my second experience of contributing to an open-source event but the first one that contributed significant PRs.&lt;/p&gt;

&lt;p&gt;The main thing I learnt during this event is the importance of time. There are so many other developers with same or better experience than you who want to work on the same project. So, if you are assigned to an issue, solve it ASAP or forget about PR!&lt;/p&gt;

&lt;p&gt;Other few things I'd like to mention is I gained confidence to design websites with vanilla JS. I used Bulma in two projects and got my hands dirty with Bulma CSS too.&lt;/p&gt;

&lt;p&gt;It was great working with real projects and contributing to the wide range of projects during the month of development. Though I didn't find enough time to contribute to many issues, I enjoyed and learnt a lot while resolving the one I was assigned!&lt;/p&gt;

&lt;p&gt;Happy Contributing! 🎉&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
