<?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: Sonu Sharma 💙</title>
    <description>The latest articles on DEV Community by Sonu Sharma 💙 (@thealphamerc).</description>
    <link>https://dev.to/thealphamerc</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%2F345573%2F1bd97d4e-95aa-4c18-ad4b-bd01b334ede2.jpeg</url>
      <title>DEV Community: Sonu Sharma 💙</title>
      <link>https://dev.to/thealphamerc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thealphamerc"/>
    <language>en</language>
    <item>
      <title>Open Source vs Closed Source: The Pros and Cons</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Sat, 10 Jun 2023 07:52:04 +0000</pubDate>
      <link>https://dev.to/thealphamerc/open-source-vs-closed-source-the-pros-and-cons-3ifm</link>
      <guid>https://dev.to/thealphamerc/open-source-vs-closed-source-the-pros-and-cons-3ifm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When it comes to software development, there are two types of software: open source and closed source. Open source refers to software whose source code can be accessed, modified and shared by anyone, while closed source refers to software whose source code cannot be accessed by anyone outside of the company who created it. Both types of software have their own advantages and disadvantages, and it's important to understand them before deciding which one to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros of Open Source Software
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Flexibility:&lt;/strong&gt; Open source software is highly flexible, as the source code is freely available to anyone who wants to modify it. This allows developers to customize the software to fit their own specific needs and requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Cost-effective:&lt;/strong&gt; Open source software is often significantly less expensive than closed source software. This is because open source software can be freely distribut&lt;br&gt;
ed, and there are often no licensing fees associated with it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Transparency:&lt;/strong&gt; Because the source code is open, there is greater transparency in how the software works. This means that anyone can look at the code to see how the software is built, and can identify any bugs or flaws that need to be fixed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Community:&lt;/strong&gt; Open source software is built by a community of developers who work together to improve the software. This means that there is a wealth of knowledge and experience available to those who use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cons of Open Source Software
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Learning curve:&lt;/strong&gt; Open source software often has a steeper learning curve than closed source software, as it requires more technical knowledge to use and modify.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Support:&lt;/strong&gt; Although there is a community of developers that work together to improve open source software, there may not be an official support system available. This means that users may have to rely on forums or other online resources for help.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security:&lt;/strong&gt; Open source software is vulnerable to security threats, as anyone can access and modify the source code. While the community of developers often works to identify and fix security vulnerabilities, it is still possible for malicious developers to introduce security threats.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros of Closed Source Software
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Ease of use:&lt;/strong&gt; Closed source software is often easier to use than open source software, as it is designed to be user-friendly and intuitive.&lt;br&gt;
&lt;strong&gt;2. Support:&lt;/strong&gt; Because a company owns closed source software, they are often able to provide a dedicated support system for users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security:&lt;/strong&gt; Closed source software is often more secure than open source software, as the source code is not freely available to everyone. This means that malicious developers cannot easily introduce security threats.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Intellectual property protection:&lt;/strong&gt; A company that owns closed source software is able to protect their intellectual property through patents and copyrights.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cons of Closed Source Software
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Cost:&lt;/strong&gt; Closed source software is often more expensive than open source software, as licensing fees are required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Lack of flexibility:&lt;/strong&gt; Because the source code is not available to everyone, closed source software is often less flexible than open source software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Dependence:&lt;/strong&gt; Users of closed source software are dependent on the company that owns the software, as they are the only ones who can make changes to the software.&lt;/p&gt;

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

&lt;p&gt;In conclusion, both open source and closed source software have their own advantages and disadvantages. It is important for developers to carefully consider both options before making a decision on which one to use. While open source software offers greater flexibility and cost-effectiveness, closed source software offers greater ease of use and security. Ultimately, the decision will depend on the specific needs and requirements of the developer or business.&lt;/p&gt;

</description>
      <category>opensource</category>
    </item>
    <item>
      <title>The Rise of Low-Code Development: What You Need to Know</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Thu, 25 May 2023 04:53:19 +0000</pubDate>
      <link>https://dev.to/thealphamerc/the-rise-of-low-code-development-what-you-need-to-know-104e</link>
      <guid>https://dev.to/thealphamerc/the-rise-of-low-code-development-what-you-need-to-know-104e</guid>
      <description>&lt;p&gt;In recent years, low-code development has emerged as an innovative solution to the problem of overly complex software development. This approach makes app development more accessible, productive, and faster. Low-code development has the potential to revolutionize the way software is developed, deployed, and maintained. If you are not sure what low-code development is all about, do not worry. In this article, we will explain everything you need to know about this exciting new trend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/7RoYmHrHihmJn3buvF/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/7RoYmHrHihmJn3buvF/giphy.gif" alt="Gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Defining Low-Code Development
&lt;/h1&gt;

&lt;p&gt;Low-code development is an approach to software application development that requires minimal coding effort. Instead of writing code from scratch, developers use pre-built components and drag-and-drop interfaces to create applications quickly. This methodology aims to make application development more accessible for non-programmers, increase productivity and reduce development times, and improve maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Importance of Low-Code Development
&lt;/h2&gt;

&lt;p&gt;Software application development has traditionally been time-consuming, expensive, and complex, requiring a high level of technical expertise. Low-code development solves these problems by making app development fast, cost-effective, and less technically challenging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of Low-Code Development
&lt;/h2&gt;

&lt;p&gt;Low-code development offers several advantages over traditional coding approaches, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster Development Time&lt;/strong&gt; - Low-code enables developers to create applications faster owing to the reuse of pre-built components for coding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Easy to Learn&lt;/strong&gt; - Low-code development makes it easier to understand coding concepts for non-developers with the drag-and-drop building block feature, which makes it possible to code without the need for a development background.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increased Productivity&lt;/strong&gt; - Using a low-code approach, developers can work with more productivity, and the software development lifecycle significantly improves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Technical Complexity&lt;/strong&gt; - Low-code uses pre-built blocks that allow easy creation of applications with less technical code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Improved Collaboration&lt;/strong&gt; - Low-code platforms allow non-technical team members to contribute to the application development process, making the software creation team more diverse and inclusive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Future of Low-Code Development
&lt;/h2&gt;

&lt;p&gt;Low-code development is a rapidly growing trend, and the demand for low-code software development is forecasted to increase. As the number of businesses reliant on software applications for their everyday operations grows, low-code development can offer the solution they need to increase their operational efficiency and customer satisfaction.&lt;/p&gt;

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

&lt;p&gt;Low-code development is gaining momentum as one of the most innovative and approachable ways to create software applications. The advantages of low-code development, including the reduced complexity, faster development timeline, and ease of use, make it an integral approach to software development, particularly for non-technical developers. Due to its successes, low-code development is projected to grow significantly in the years to come, and businesses that adopt it to drive their software development will be well placed as the industry evolves.&lt;/p&gt;

</description>
      <category>lowcode</category>
      <category>productivity</category>
      <category>development</category>
    </item>
    <item>
      <title>Tips and Tricks That Every Typescript Developer Should Know</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Sun, 21 May 2023 12:04:17 +0000</pubDate>
      <link>https://dev.to/thealphamerc/tips-and-tricks-that-every-typescript-developer-should-know-e0h</link>
      <guid>https://dev.to/thealphamerc/tips-and-tricks-that-every-typescript-developer-should-know-e0h</guid>
      <description>&lt;h1&gt;
  
  
  Tips and Tricks for TypeScript Developers
&lt;/h1&gt;

&lt;p&gt;TypeScript has become the go-to language for building scalable web applications in recent years. It is a superset of JavaScript that offers static typing and a host of other features, making it easier to write code that is less error-prone and more maintainable.&lt;br&gt;
If you are a TypeScript developer or looking to become one, here are some tips and tricks you should know to enhance your development.&lt;br&gt;
&lt;a href="https://i.giphy.com/media/1xne5qPyBA5GGouLyo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/1xne5qPyBA5GGouLyo/giphy.gif" alt="Image" width="480" height="247"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  1. Embrace the Type System
&lt;/h3&gt;

&lt;p&gt;one of the primary advantages of typescript is its type system, which allows you to catch potential bugs at compile-time. Ensure that you take advantage of the type system in TypeScript by thoroughly annotating your types.&lt;/p&gt;

&lt;p&gt;Example:&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;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;number&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;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&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;
  
  
  2. Use Generics
&lt;/h3&gt;

&lt;p&gt;Generic types allow you to write reusable code that can adapt to different types easily. This feature can save you time and lines of code by allowing you to define functions and classes that work with multiple data types.&lt;/p&gt;

&lt;p&gt;Example:&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="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;IProduct&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;T&lt;/span&gt;&lt;span class="p"&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;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;IProduct&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1234&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Product Name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;500&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;
  
  
  3. Take Advantage of Enums
&lt;/h3&gt;

&lt;p&gt;An enum is a type of data that allows a variable to have one of several predefined values. They help you keep your code maintainable and easy to understand by defining a set of related values.&lt;/p&gt;

&lt;p&gt;Example:&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="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Direction&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;LEFT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;RIGHT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;UP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;DOWN&lt;/span&gt;&lt;span class="p"&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;direction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Direction&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LEFT&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Use Intersection Types
&lt;/h3&gt;

&lt;p&gt;Intersection types allow you to merge multiple types into a single type.&lt;/p&gt;

&lt;p&gt;Example:&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;type&lt;/span&gt; &lt;span class="nx"&gt;X&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;XY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;X&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;Y&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;xy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;XY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;world&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Use Optional Chaining
&lt;/h3&gt;

&lt;p&gt;Optional chaining allows you to access nested properties or methods without having to check if each level exists.&lt;br&gt;
Example:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unknown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Use Nullish Coalescing
&lt;/h3&gt;

&lt;p&gt;Nullish coalescing allows you to provide a default value when a value is null or undefined.&lt;br&gt;
Example:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unknown&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. Use Read-Only Properties
&lt;/h3&gt;

&lt;p&gt;Read-only properties ensure that a property value cannot be changed after it is instantiated, including in constructors.&lt;br&gt;
Example:&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;class&lt;/span&gt; &lt;span class="nx"&gt;Person&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;readonly&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&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;h3&gt;
  
  
  8. Use Destructuring
&lt;/h3&gt;

&lt;p&gt;Destructuring allows you to extract values from objects and arrays into separate variables.&lt;br&gt;
Example:&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  9. Use Type Aliases
&lt;/h3&gt;

&lt;p&gt;Type aliases allow you to create a name for a type that is used multiple times.&lt;br&gt;
Example:&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;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&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="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&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="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  10. Use Type Assertions
&lt;/h3&gt;

&lt;p&gt;Type assertions allow you to tell TypeScript to treat a value as a specific type in specific situations.&lt;br&gt;
Example:&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;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;unknown&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hello world&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;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  11. Use the never Type
&lt;/h3&gt;

&lt;p&gt;The never type represents a value that will never occur.&lt;br&gt;
Example:&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;function&lt;/span&gt; &lt;span class="nx"&gt;fail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nx"&gt;never&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&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;
  
  
  12. Use the Spread Operator
&lt;/h3&gt;

&lt;p&gt;The spread operator allows you to create a new array or object by merging existing ones.&lt;br&gt;
Example:&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;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  13. Use Union Types
&lt;/h3&gt;

&lt;p&gt;Union types allow you to define a type that can have one of several types.&lt;br&gt;
Example:&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;type&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;failure&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Status&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="s2"&gt;`status is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;status&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  14. Use Enums for String Literals
&lt;/h3&gt;

&lt;p&gt;Enums can also be used to define string literals.&lt;br&gt;
Example:&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="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Status&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Success&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Failure&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Failure&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="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Status&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="s2"&gt;`status is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;status&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="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  15. Use keyof to get Keys of Objects
&lt;/h3&gt;

&lt;p&gt;The keyof keyword allows you to get the keys of an object.&lt;br&gt;
Example:&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;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&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;keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;keyof&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&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="s1"&gt;firstName&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="s1"&gt;lastName&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  16. Use typeof to get the Type of a Variable
&lt;/h3&gt;

&lt;p&gt;The typeof keyword allows you to get the type of a variable at runtime.&lt;br&gt;
Example:&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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&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;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  17. Use in Operator For Checking Properties of Objects
&lt;/h3&gt;

&lt;p&gt;The in operator allows you to check if a property exists on an object.&lt;br&gt;
Example:&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;type&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;firstName&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;user&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="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&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="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello&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;h3&gt;
  
  
  18. Use String Interpolation
&lt;/h3&gt;

&lt;p&gt;String interpolation allows you to embed expressions in string literals.&lt;br&gt;
Example:&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;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;John&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;lastName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Doe&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="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;firstName&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="nx"&gt;lastName&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  19. Use typeof for Type Guards
&lt;/h3&gt;

&lt;p&gt;Using typeof in conjunction with if-else statements can serve as an alternative to type guard syntax.&lt;br&gt;
Example:&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;function&lt;/span&gt; &lt;span class="nx"&gt;example&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;foo&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&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="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&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="k"&gt;else&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;number&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;h3&gt;
  
  
  20. Use export * as to Re-Export Modules
&lt;/h3&gt;

&lt;p&gt;The export * as syntax allows you to re-export all named exports of a module under a separate namespace.&lt;br&gt;
Example:&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;// module1.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;foo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bar&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// module2.ts&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;module1&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;./module1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  21. Use Tuples for Fixed-Length Arrays
&lt;/h3&gt;

&lt;p&gt;Tuples allow you to define an array with a fixed number of elements, with different types.&lt;/p&gt;

&lt;p&gt;Example:&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;tuple&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;string&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  22. Utilize TSLint
&lt;/h3&gt;

&lt;p&gt;TSlint is a tool that provides linters for TypeScript, statically analyzing the code and providing guidelines on how to improve the quality of the codebase, resulting in cleaner and quality code.&lt;/p&gt;

&lt;p&gt;Example:&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;npm&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="nx"&gt;tslint&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;The techniques discussed in this article are a good starting point for becoming a Typescript developer, knowing the basics will save one a lot of shoot-my-foot moments during the code review and debugging phase.&lt;br&gt;
These are just a few tips and tricks that can greatly improve your development with TypeScript. Other options include applying object-oriented approaches and utilizing external libraries correctly. By applying these techniques and more, you can employ the full capabilities of TypeScript, building robust, scalable applications.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>programming</category>
      <category>productivity</category>
      <category>learning</category>
    </item>
    <item>
      <title>Top 10 Best Practices for Coding That Every Developer Should Follow</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Sat, 20 May 2023 03:51:45 +0000</pubDate>
      <link>https://dev.to/thealphamerc/top-10-best-practices-for-coding-that-every-developer-should-follow-3ab5</link>
      <guid>https://dev.to/thealphamerc/top-10-best-practices-for-coding-that-every-developer-should-follow-3ab5</guid>
      <description>&lt;p&gt;Coding is an essential part of software development, and it is essential to write clean, efficient, and maintainable code. In this article, we will discuss the top 10 best practices that every developer should follow while coding. &lt;br&gt;
&lt;a href="https://i.giphy.com/media/lT9Y1nrHdZWX9QoSH0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/lT9Y1nrHdZWX9QoSH0/giphy.gif" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following these best practices can help you to produce high-quality code that is easy to read, debug, and maintain.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Write Readable Code
&lt;/h1&gt;

&lt;p&gt;Writing readable code is the most crucial aspect of coding. Your code should be easy to read and understand, and other developers should be able to follow it.One of the best ways to write readable code is to use appropriate naming conventions for variables, functions, classes, and so on.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Poorly written code&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&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;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;14&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;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&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="c1"&gt;// ✅ Better written code&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;primes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;primes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&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;j&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;primes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;primes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;primes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;14&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;primes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="nx"&gt;primes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;j&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By using appropriate naming conventions and formatting, the second block of code is much more readable and easier to understand than the first block of code.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Use Consistent Coding Style
&lt;/h1&gt;

&lt;p&gt;Consistency in coding style is essential for a team of developers working on the same project. It saves time, reduces confusion, and improves the maintainability of the code. Adopt a coding style guide and stick to it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Inconsistent coding style&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;x&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ Consistent coding style&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&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;The second block of code has a consistent coding style, which makes it easier to read and understand the code.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Avoid Magic Numbers or Strings
&lt;/h1&gt;

&lt;p&gt;Magic numbers or strings are hard-coded values in the code that can make it difficult to read and maintain. Use constants or variables to replace them to improve the readability and maintainability of the code.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Magic numbers and strings&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&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="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;10&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="mi"&gt;25&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="c1"&gt;// ✅ Constants instead of magic numbers and strings&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;WIDTH_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&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;HEIGHT_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;WIDTH_2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&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;HEIGHT_2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;WIDTH_1&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT_1&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;WIDTH_1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT_1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;WIDTH_2&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT_2&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;WIDTH_2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;HEIGHT_2&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;By using constants instead of magic numbers or strings, the code becomes more self-explanatory and easier to understand.&lt;/p&gt;

&lt;h1&gt;
  
  
  4 Write Modular Code
&lt;/h1&gt;

&lt;p&gt;Modular code makes the code more organized and enhances its maintainability. It is much easier to update or add new features to modular code than to spaghetti code. Break your code into smaller, easier-to-manage modules or functions that carry specific responsibilities.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Monolithic Code&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculatePay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;pay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Manager&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;pay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Developer&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;pay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tester&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;pay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1000&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;pay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Modularity&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculatePay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&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;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bonus&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;getEmployeeBonus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Manager&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="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Developer&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="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tester&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="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1000&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="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculateEmployeeBonus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&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="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;getEmployeeBonus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculateTotalPay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&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;calculatePay&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;calculateEmployeeBonus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;employee&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 this example, modular code is used to break up a monolithic function into smaller, easier to understand and maintainable functions.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. Use Comments
&lt;/h1&gt;

&lt;p&gt;Adding comments to your code is a great way to document your code and make it more understandable. Do not hesitate to add comments explaining why a particular piece of code has been written.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Poorly commented code&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// function to add two numbers&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// returns the sum of two numbers&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ Better commented code&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// This function accepts two numbers x and y&lt;/span&gt;
  &lt;span class="c1"&gt;// It returns the sum of x and y&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&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;Adding comments that explain how the code works can help other developers understand and maintain the code.&lt;/p&gt;

&lt;h1&gt;
  
  
  6. Use Descriptive Function and Method Names
&lt;/h1&gt;

&lt;p&gt;Using descriptive function and method names can make your code more readable by providing information about what a given function or method does.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Poor function and method names&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;y&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;i&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="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Foo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;x&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="c1"&gt;// ✅ Descriptive function and method names&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;indexOfItemInArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;item&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;i&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="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;getXCoordinate&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;h1&gt;
  
  
  7 Use Version Control
&lt;/h1&gt;

&lt;p&gt;Version control is one of the essential tools for managing code. Use a version control system like Git or SVN to keep track of changes to your code and to collaborate better with your team members.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using a version control system like Git makes it easier to track changes, collaborate with team members and roll back changes when needed.&lt;/p&gt;

&lt;h1&gt;
  
  
  8. Use Debugging Tools
&lt;/h1&gt;

&lt;p&gt;Debugging your code is an essential part of the development process. Make use of debugging tools provided by your integrated development environment (IDE) or use debugging libraries like Log4J and Apache for better error handling.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&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;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type Error&lt;/span&gt;

&lt;span class="k"&gt;try&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;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;7&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Throws Type Error on console&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="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;h1&gt;
  
  
  9. Test Your Code
&lt;/h1&gt;

&lt;p&gt;Perform test cases to ensure the code is working correctly. Write unit tests and functional tests to identify errors at various stages of development. Adopt Test-Driven Development (TDD) to write tests before writing code.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Unit test example&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;testAddNumbers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&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="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
      &lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
      &lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
      &lt;span class="nx"&gt;addNumbers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&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="kc"&gt;true&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="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Functional Test Example&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;testLogin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;admin&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="s1"&gt;admin123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
      &lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;guest&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="s1"&gt;password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&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="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&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="kc"&gt;false&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;h1&gt;
  
  
  10. Refactor Regularly
&lt;/h1&gt;

&lt;p&gt;Refactoring is a technique used to improve the quality of code by cleaning up messy code. Refactor your code regularly to eliminate unnecessary dependencies, remove repetitive code and get rid of any potential bottlenecks.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// ❌ Poorly written code with duplication and lots of statements&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculateSalary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numberOfHours&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;overtime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bonus&lt;/span&gt;&lt;span class="p"&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;salary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;overtime&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&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="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&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="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bonus&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;1.1&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;salary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// ✅ Better written code without duplication and fewer statements.&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;calculateSalary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numberOfHours&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;overtime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bonus&lt;/span&gt;&lt;span class="p"&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;salary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;overtime&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numberOfHours&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;hourlyPay&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;bonus&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;*=&lt;/span&gt; &lt;span class="mf"&gt;1.1&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;salary&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;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Following these best practices can make a significant difference in the quality of code you produce. Writing clean and efficient code not only makes coding easier but also makes it more enjoyable. &lt;br&gt;
It helps you avoid potential errors, reduce debugging time and improve the overall quality of your work. &lt;br&gt;
By adopting these best practices, developers can achieve more efficient code development, reduce errors, and respond faster to new requirements. So, start implementing these best practices today and watch your code quality soar to new heights.&lt;/p&gt;

&lt;p&gt;Thank you for taking the time to read my article! If you found the information helpful and would like to stay up-to-date on the latest programming tips and tricks,You can follow me on &lt;a href="https://twitter.com/theAlphaMerc"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/thealphamerc"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://github.com/TheAlphamerc"&gt;GitHub&lt;/a&gt;, where I share articles, code snippets, and programming-related insights regularly. By following me, you will never miss out on any useful updates, and that way we can constantly improve our knowledge on programming together. Looking forward to seeing you in my social media community!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>learning</category>
      <category>development</category>
      <category>coding</category>
    </item>
    <item>
      <title>Bug: An Inevitable Part of the Development Process</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Tue, 07 Mar 2023 01:10:14 +0000</pubDate>
      <link>https://dev.to/thealphamerc/bug-an-inevitable-part-of-the-development-process-2djm</link>
      <guid>https://dev.to/thealphamerc/bug-an-inevitable-part-of-the-development-process-2djm</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Bugs are an inevitable part of the software development process. No matter how carefully code is written and tested, bugs will always arise. However, bugs can also play a crucial role in the development process, as they can help identify problems and improve the overall quality of the software.&lt;/p&gt;

&lt;p&gt;Bugs can also serve as a learning opportunity for developers. By identifying and fixing bugs, developers can improve their understanding of the code and become more efficient at identifying and fixing problems in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Role of Bugs in Development
&lt;/h2&gt;

&lt;p&gt;One of the primary roles of bugs in development is to identify problems in the code. When a bug is discovered, it can indicate that something is not functioning as intended. This can help developers identify and fix problems in the code, improving the overall quality and reliability of the software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different Types of Bugs
&lt;/h2&gt;

&lt;p&gt;There are several types of bugs that can occur in software development:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Syntax errors:&lt;/strong&gt; These are errors in the code that occur when the code does not conform to the syntax (grammar) of the programming language being used. Syntax errors can prevent the code from being compiled or executed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Logic errors:&lt;/strong&gt; These errors occur when the code is written correctly, but it does not produce the intended results. Logic errors may not be immediately apparent and can be difficult to detect and fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Run-time errors:&lt;/strong&gt; These errors occur when the code is executed and cause the program to crash or produce unexpected results. Run-time errors can be caused by a variety of factors, such as invalid input, memory issues, or problems with external dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Resource leaks:&lt;/strong&gt; These errors occur when a program does not release resources (such as memory or file handles) that it has acquired. This can lead to the program running out of resources and crashing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Security vulnerabilities:&lt;/strong&gt; These are vulnerabilities in the code that can be exploited by attackers to gain unauthorized access to the system or data. Security vulnerabilities can have serious consequences, so it is important to identify and fix them as soon as possible.&lt;/p&gt;

&lt;p&gt;These are just a few examples of the types of bugs that can occur in software development. There are many other types of bugs that can arise, and the nature of the bug will depend on the specific code and environment in which it occurs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Determining the Severity of a Bug
&lt;/h2&gt;

&lt;p&gt;There are several factors to consider when determining the severity of a bug:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Impact on functionality:&lt;/strong&gt; The more serious the bug, the greater the impact it will have on the functionality of the application. A bug that causes the application to crash or prevents a key feature from working would be considered more severe than a cosmetic issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Impact on users:&lt;/strong&gt; Consider the impact the bug will have on the users of the application. A bug that causes significant inconvenience or frustration for users would be considered more severe than a bug that has minimal impact on the user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Reproducibility:&lt;/strong&gt; The more easily a bug can be reproduced, the more severe it is likely to be. A bug that occurs consistently and is easy to reproduce would be considered more severe than a bug that is difficult to reproduce or occurs only occasionally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Workaround availability:&lt;/strong&gt; If there is a workaround available for the bug, it may be less severe than a bug for which there is no workaround.&lt;/p&gt;

&lt;p&gt;By considering these factors, you can determine the severity of a bug and prioritize it accordingly. Keep in mind that the severity of a bug may change over time, so it's important to regularly review and re-evaluate the severity of each bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Considerations for Reporting Bugs
&lt;/h2&gt;

&lt;p&gt;Here are some key points to consider when reporting a bug&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Describe the problem clearly:&lt;/strong&gt; Be as specific as possible when describing the issue. Include details such as the steps that led to the bug, any error messages that were displayed, and the expected behavior versus the actual behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Provide reproduction steps:&lt;/strong&gt; If possible, provide a step-by-step guide for reproducing the bug. This will help the development team understand the issue and make it easier for them to fix it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Include relevant information:&lt;/strong&gt; Include information such as the device, operating system, and browser that you were using when the bug occurred. This will help the development team narrow down the cause of the issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Attach screenshots or video:&lt;/strong&gt; If possible, attach screenshots or a video of the bug. This will give the development team a visual reference and may help them understand the issue better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Assign a severity level:&lt;/strong&gt; Assign a severity level to the bug based on its impact on the application and its users. This will help the development team prioritize their work and determine how urgently the bug needs to be addressed.&lt;/p&gt;

&lt;p&gt;By following these guidelines, you can help the development team understand the issue and fix the bug more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Documenting and Tracking Bugs
&lt;/h2&gt;

&lt;p&gt;There are several ways to document bugs effectively:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Use a bug tracking tool:&lt;/strong&gt; A bug tracking tool is a software application that is specifically designed to help teams manage and track bugs in a software development project. These tools typically allow you to create a bug report, assign it to a team member, and track its progress until it is resolved. Some popular bug tracking tools include JIRA, Bugzilla, and Trello.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Use a spreadsheet:&lt;/strong&gt; A spreadsheet is a simple and effective way to document and track bugs. You can create a spreadsheet with columns for the bug description, severity, status, and other relevant information. This can be shared with the development team and updated as the bug is addressed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Use a project management tool:&lt;/strong&gt; A project management tool is another option for tracking bugs. These tools allow you to create tasks, assign them to team members, and track progress. You can use a project management tool to document bugs and track their progress until they are resolved. Some popular project management tools include Asana and Trello.&lt;/p&gt;

&lt;p&gt;Regardless of the method you choose, it's important to include as much detail as possible in the bug report. This will help the development team understand the issue and make it easier for them to fix the bug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug Severity and Handling Strategies
&lt;/h2&gt;

&lt;p&gt;Here is a general strategy for handling bugs in a software application&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Low:&lt;/strong&gt; These bugs may be cosmetic or have minimal impact on the functionality of the application, but they should still be documented and scheduled for a future fix.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Minor&lt;/strong&gt; These bugs may cause some inconvenience or minor functionality issues, but they do not severely impact the use of the application. They should be prioritized and fixed as soon as possible, but they may not need to be addressed immediately if there are more pressing issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Major:&lt;/strong&gt; These bugs have a significant impact on the functionality of the application and should be addressed as soon as possible. They may require immediate attention, depending on the severity of the issue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Critical:&lt;/strong&gt; These bugs are severe and need to be fixed immediately. They may cause the application to fail or cause significant inconvenience for users.&lt;/p&gt;

&lt;p&gt;When addressing bugs, it's important to prioritize based on the severity of the issue and the impact it has on the application and its users. It's also important to properly document and track bugs so that they can be effectively managed and resolved.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good v/s Bad bug
&lt;/h2&gt;

&lt;p&gt;Bugs can be both good and bad, depending on the context.&lt;/p&gt;

&lt;p&gt;On the one hand, bugs can be good because they can help identify problems in the code and improve the overall quality of the software. By identifying and fixing bugs, developers can improve the reliability and stability of the software, ensuring that it functions as intended.&lt;/p&gt;

&lt;p&gt;On the other hand, bugs can be bad because they can cause problems for users and disrupt the functioning of the software. If a bug is severe or impacts a key feature of the software, it can cause significant inconvenience or frustration for users.&lt;/p&gt;

&lt;p&gt;Ultimately, the "goodness" or "badness" of a bug depends on the context in which it occurs and how it is addressed. By identifying and fixing bugs, developers can ensure that the software is as stable and reliable as possible, which is generally a good thing for users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Process for Fixing Bugs
&lt;/h2&gt;

&lt;p&gt;Here is a general process for fixing bugs in software development:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Identify the bug&lt;/strong&gt;: The first step in fixing a bug is to identify that it exists. This may involve receiving a report from a user or discovering the bug during testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Reproduce the bug:&lt;/strong&gt; In order to fix a bug, it is important to be able to reproduce it consistently. This may involve following a set of reproduction steps provided by the user or trying different scenarios to see when the bug occurs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Debug the code:&lt;/strong&gt; Once the bug has been identified and reproduced, the developer can begin the process of debugging the code. This may involve adding print statements or using a debugger to identify the root cause of the problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Determine the root cause:&lt;/strong&gt; Once the developer has a better understanding of the problem, they can determine the root cause of the bug. This may involve identifying a specific line of code that is causing the issue or identifying a problem with the logic of the code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Develop a fix:&lt;/strong&gt; Once the root cause of the bug has been identified, the developer can develop a fix for the problem. This may involve writing new code, refactoring existing code, or updating external dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Test the fix:&lt;/strong&gt; Before deploying the fix, it is important to test it to ensure that it addresses the issue and does not introduce any new problems. This may involve writing additional test cases or using automated testing tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Deploy the fix:&lt;/strong&gt; Once the fix has been thoroughly tested and is deemed stable, it can be deployed to the live application. This may involve releasing a new version of the software or pushing the fix to the live application through a patch or update.&lt;/p&gt;

&lt;p&gt;By following this process, developers can effectively troubleshoot and fix bugs in their code, improving the overall stability and reliability of the software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;To summarize, here are the key points to consider when handling bugs in a software application:&lt;/p&gt;

&lt;p&gt;Bugs are an inevitable part of the software development process. They can have both positive and negative impacts on the software, depending on how they are managed. To effectively handle bugs, it is important to prioritize them based on their severity and properly document and track them. There are several types of bugs that can occur, including syntax errors, logic errors, run-time errors, resource leaks, and security vulnerabilities.&lt;br&gt;
To fix a bug, developers must identify and reproduce the problem, debug the code to determine the root cause, develop a fix, test the fix, and deploy it to the live application. By following this process, developers can effectively troubleshoot and fix bugs, improving the stability and reliability of the software&lt;/p&gt;

</description>
      <category>github</category>
      <category>bolt</category>
      <category>opensource</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Pulse - Project Management app built in ReactJS</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Wed, 25 Jan 2023 04:46:52 +0000</pubDate>
      <link>https://dev.to/thealphamerc/pulse-project-management-app-build-in-reactjs-bk2</link>
      <guid>https://dev.to/thealphamerc/pulse-project-management-app-build-in-reactjs-bk2</guid>
      <description>&lt;p&gt;Introducing Pulse - the project/doc management app that will change the way you work!&lt;/p&gt;

&lt;p&gt;Built with React on the front end and Node.js on the backend, Pulse is designed to help you easily track the progress of your projects and tasks. Whether you're working on a small personal project or a large enterprise project, Pulse is the tool you need to stay organized and on track.&lt;/p&gt;

&lt;p&gt;With Pulse, you'll be able to quickly add and update your projects and tasks, view their status and progress. The intuitive interface makes it easy to use, so you can focus on what's important - achieving your goals.&lt;/p&gt;

&lt;p&gt;Screenshots:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmip8suagyp4kvgom1px.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%2Fbmip8suagyp4kvgom1px.png" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb6gsz90kk8zlfjkbi2i.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%2Fdb6gsz90kk8zlfjkbi2i.png" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3qmhdfp1kf7bv60za1n4.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%2F3qmhdfp1kf7bv60za1n4.png" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More screenshot &lt;a href="https://github.com/TheAlphamerc/pulse/wiki" rel="noopener noreferrer"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're looking for a better way to manage your projects, give Pulse a try. It's open-source and the source code is available on Github, feel free to check it out and let us know what you think.&lt;/p&gt;

&lt;p&gt;Check live version : &lt;a href="https://go.orgnise.in/home" rel="noopener noreferrer"&gt;https://go.orgnise.in/home&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code : &lt;a href="https://git.new/orgnise" rel="noopener noreferrer"&gt;https://git.new/orgnise&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Flutter Filter list package v1.0.0 released on pub.dev 🎉</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Fri, 21 May 2021 09:21:19 +0000</pubDate>
      <link>https://dev.to/thealphamerc/flutter-filter-list-package-v1-0-0-released-on-pub-dev-53b0</link>
      <guid>https://dev.to/thealphamerc/flutter-filter-list-package-v1-0-0-released-on-pub-dev-53b0</guid>
      <description>&lt;p&gt;filterList is a flutter package which provide utility to search/filter data from provided dynamic list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Change Logs
&lt;/h2&gt;

&lt;h2&gt;
  
  
  [1.0.0] 21 May 2021
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Improved visual customization. Including remove custom function.&lt;/li&gt;
&lt;li&gt;Added below arguments to improve the customization and make it translatable. 

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;allButtonText&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;applyButtonText&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resetButtonText&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;selectedItemsText&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;buttonRadius&lt;/code&gt; button border radius argument.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;controlContainerDecoration&lt;/code&gt; action buttons box decoration argument.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;buttonSpacing&lt;/code&gt; button spacing argument.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;validateRemoveItem&lt;/code&gt; custom remove function that returns the selected list items filtered by the user conditions.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;insetPadding&lt;/code&gt; dialog padding argument.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;wrapAlignment&lt;/code&gt; argument to control the choice chips alignment in main axis. &lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;wrapCrossAxisAlignment&lt;/code&gt; argument to control choice chip within a run should be aligned relative to each other in the cross axis. &lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;wrapSpacing&lt;/code&gt; argument to control the space to place between choice chip in a run in the main axis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Package link:- &lt;a href="https://pub.dev/packages/filter_list"&gt;Pub.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo App link:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/releases/download/v0.0.5/app-release.apk"&gt;Demo App&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list"&gt;Github Repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute a change to any of the existing features or add new in this repo,&lt;br&gt;
please review our &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/blob/master/CONTRIBUTING.md"&gt;contribution guide&lt;/a&gt;,&lt;br&gt;
and send a &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/pulls"&gt;pull request&lt;/a&gt;. I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>Flutter Filter list package v.0.06, v.0.07, v.0.08 and v.0.09</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Mon, 17 May 2021 13:57:03 +0000</pubDate>
      <link>https://dev.to/thealphamerc/flutter-filter-list-package-v-0-06-v-0-07-v-0-08-and-v-0-09-4a18</link>
      <guid>https://dev.to/thealphamerc/flutter-filter-list-package-v-0-06-v-0-07-v-0-08-and-v-0-09-4a18</guid>
      <description>&lt;p&gt;filterList is a flutter package which provide utility to search/filter data from provided dynamic list.&lt;/p&gt;

&lt;h2&gt;
  
  
  Change Logs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  [0.0.9] - 01 Apr 2021
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Migrated to null safety.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;label&lt;/code&gt; is replaced with &lt;code&gt;choiceChipLabel&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  [0.0.8] - 28 Mar 2021
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Added &lt;code&gt;choiceChipBuilder&lt;/code&gt; to build custom choice chip.&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;selectedChipTextStyle&lt;/code&gt;, &lt;code&gt;unselectedChipTextStyle&lt;/code&gt;, &lt;code&gt;controlButtonTextStyle&lt;/code&gt;, &lt;code&gt;applyButtonTextStyle&lt;/code&gt;, &lt;code&gt;headerTextStyle&lt;/code&gt; and &lt;code&gt;searchFieldTextStyle&lt;/code&gt; styles.&lt;/li&gt;
&lt;li&gt;Removed &lt;code&gt;applyButonTextColor&lt;/code&gt;, &lt;code&gt;allResetButonColor&lt;/code&gt;, &lt;code&gt;selectedTextColor&lt;/code&gt;, &lt;code&gt;unselectedTextColor&lt;/code&gt; colors properties.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  [0.0.7] - 20 Feb 2021
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Update Doc&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  [0.0.6] - 20 Feb 2021
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Convert filter list package to generic list filter package&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;allTextList&lt;/code&gt; changed to &lt;code&gt;listData&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;selectedTextList&lt;/code&gt; changed to &lt;code&gt;selectedListData&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FilterListWidget&lt;/code&gt; and &lt;code&gt;FilterListDialog&lt;/code&gt; can filter any type if list&lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;validateSelectedItem&lt;/code&gt; callback to validate which item needs to be selected &lt;/li&gt;
&lt;li&gt;Added &lt;code&gt;onItemSearch&lt;/code&gt; callback to expose search mechanism on user side to filter list.'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Package link:- &lt;a href="https://pub.dev/packages/filter_list"&gt;https://pub.dev/packages/filter_list&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo App link:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/releases/download/v0.0.5/app-release.apk"&gt;Demo App&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list"&gt;https://github.com/TheAlphamerc/flutter_plugin_filter_list&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute a change to any of the existing features or add new in this repo,&lt;br&gt;
please review our &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/blob/master/CONTRIBUTING.md"&gt;contribution guide&lt;/a&gt;,&lt;br&gt;
and send a &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/pulls"&gt;pull request&lt;/a&gt;. I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>GitConnect - A Github application built in flutter</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Tue, 20 Oct 2020 11:10:19 +0000</pubDate>
      <link>https://dev.to/thealphamerc/gitconnect-a-github-application-built-in-flutter-4j0i</link>
      <guid>https://dev.to/thealphamerc/gitconnect-a-github-application-built-in-flutter-4j0i</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Hey folks, For the past few months I have been working on an opensource flutter project.GitConnect is a github mobile app created in Flutter. The first version of the app is released on play store. As of now, the functionality of the app is quite simple. You can browse your recent activities, repositories, read their ‘readme’ files, view pull requests, issues, forks, stargazers, and commits.&lt;/p&gt;

&lt;p&gt;The notifications and search features are also integrated, making it easier to browse the repositories and/or developers. GitConnect also has a dark theme. You can turn it on manually in the settings. By default, the application’s theme is a dark theme. &lt;/p&gt;

&lt;h3&gt;
  
  
  Functionalities
&lt;/h3&gt;

&lt;p&gt;Below is a list of functionalities included in-app.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login with Github account&lt;/li&gt;
&lt;li&gt;See your public, private, and forked Repos&lt;/li&gt;
&lt;li&gt;See repo stargazers and fork Repos&lt;/li&gt;
&lt;li&gt;Activities&lt;/li&gt;
&lt;li&gt;Notifications&lt;/li&gt;
&lt;li&gt;Repositories&lt;/li&gt;
&lt;li&gt;Add to favorite&lt;/li&gt;
&lt;li&gt;Gists&lt;/li&gt;
&lt;li&gt;Commits&lt;/li&gt;
&lt;li&gt;Following/Followers&lt;/li&gt;
&lt;li&gt;View Gists and their files&lt;/li&gt;
&lt;li&gt;View users profile, contribution graph, activities, repositories, pull request, and issues&lt;/li&gt;
&lt;li&gt;Markdown and code highlighting support&lt;/li&gt;
&lt;li&gt;Search Users, Repos, Issues, Pull Requests, and Code&lt;/li&gt;
&lt;li&gt;Dual theme (Dark/Light)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  App Architecture
&lt;/h3&gt;

&lt;p&gt;Application uses &lt;a href="https://bloclibrary.dev/#/architecture"&gt;BloC&lt;/a&gt; architecture to manage app states. In order to implement BloC I use &lt;a href="https://pub.dev/packages/flutter_bloc"&gt;flutter_bloc&lt;/a&gt; package created by &lt;a href="https://twitter.com/felangelov"&gt;Felix Angelov&lt;/a&gt;. Using the bloc library allows us to separate our application into three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Presentation&lt;/li&gt;
&lt;li&gt;Business Logic&lt;/li&gt;
&lt;li&gt;Data

&lt;ul&gt;
&lt;li&gt;Repository&lt;/li&gt;
&lt;li&gt;Data Provider&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wTuhuepF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0h5zrnnti1y0dmwea44e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wTuhuepF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0h5zrnnti1y0dmwea44e.png" alt="Alt Text" width="636" height="1434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s the overview of our project structure: In the lib folder, I have created the following folders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The UI folder has all the code for the app ui. It has 3 subfolders.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;page : This folder has app screens.&lt;/li&gt;
&lt;li&gt;theme: This folder has app-text styles,color codes, and themes.&lt;/li&gt;
&lt;li&gt;widget: This folder consists global generic widget used in app.&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;The resources folder contains 5 subfolders&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gatway: The gatway folder contains classes to make external calls, like calls to get user profiles, repositories list etc. These classes don’t care about the UI or how the UI wants to display the data. They can throw an exception when something goes wrong.&lt;/li&gt;
&lt;li&gt;Service: This folder contains classes that are used to taken care of session management and local database.&lt;/li&gt;
&lt;li&gt;Repository: This folder contains various repositories classes to pass data from API gateway to blocs and vice versa.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GraphqlApi: This folder contains Github graphql queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Helper folder contains classes that convert the raw data from Services to the form that is useful in our app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Exceptions: This class gracefully handles exceptions that can occur in API call and convert them to messages which will be helpful to pass to blocs and display the message on screen if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The model folder contains model classes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The bloc folder contains multiple blocs that hold almost the business logic of app to connect the UI and application logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Package used
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/intl"&gt;intl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/dio"&gt;dio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/share"&gt;share&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/get_it"&gt;get_it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/flutter_svg"&gt;sqflite&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/graphql"&gt;graphql&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/equatable"&gt;equatable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/flutter_svg"&gt;flutter_svg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/path_provider"&gt;path_provider&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/flutter_bloc"&gt;flutter_bloc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/url_launcher"&gt;url_launcher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/google_fonts"&gt;google_fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/build_context"&gt;build_context&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/webview_flutter"&gt;webview_flutter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/shared_preferences"&gt;shared_preferences&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pub.dev/packages/cached_network_image"&gt;cached_network_image&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  App Preview
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/28Dcqr89N1g"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;p&gt;App link:- &lt;a href="https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_github_connect"&gt;Play Store&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Project source code link :- &lt;a href="https://github.com/TheAlphamerc/flutter-GitConnect"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found a bug or want to suggest a feature report it here:- &lt;a href="https://github.com/TheAlphamerc/flutter-GitConnect/issues"&gt;Issues&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute a change to any of the existing features or add new in this repo,&lt;br&gt;
please review our &lt;a href="https://github.com/TheAlphamerc/flutter-GitConnect/blob/master/CONTRIBUTING.md"&gt;contribution guide&lt;/a&gt;,&lt;br&gt;
and send a &lt;a href="https://github.com/TheAlphamerc/flutter-GitConnect/pulls"&gt;pull request&lt;/a&gt;. I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Created &amp;amp; Maintained By
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/TheAlphamerc"&gt;Sonu Sharma&lt;/a&gt; (&lt;a href="https://www.twitter.com/TheAlphamerc"&gt;Twitter&lt;/a&gt;) (&lt;a href="https://www.youtube.com/user/sonusharma045sonu/"&gt;Youtube&lt;/a&gt;) (&lt;a href="https://www.instagram.com/_sonu_sharma__"&gt;Insta&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I would love to hear from you. Please share your valuable feedback in the comments.&lt;br&gt;
If you like the project do show love by giving star the repo. &lt;/p&gt;

</description>
      <category>flutter</category>
      <category>github</category>
      <category>opensource</category>
      <category>flutterapp</category>
    </item>
    <item>
      <title>Flutter filter list package v.0.05 released on pub.dev</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Tue, 22 Sep 2020 10:15:52 +0000</pubDate>
      <link>https://dev.to/thealphamerc/flutter-filter-list-package-v-0-05-released-on-pub-dev-1kol</link>
      <guid>https://dev.to/thealphamerc/flutter-filter-list-package-v-0-05-released-on-pub-dev-1kol</guid>
      <description>&lt;p&gt;FilterList is a flutter plugin that is designed to provide ease in filter data from a list of strings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Changelogs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Add FilterListWidget widget.&lt;/li&gt;
&lt;li&gt;FilterList.showFilterList is renamed to FilterListDialog.display&lt;/li&gt;
&lt;li&gt;Add onApplyButtonClick callback to return selected text list from FilterListDialog.display.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Package link:- &lt;a href="https://pub.dev/packages/filter_list" rel="noopener noreferrer"&gt;https://pub.dev/packages/filter_list&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Demo App link:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/releases/download/v0.0.5/app-release.apk" rel="noopener noreferrer"&gt;https://github.com/TheAlphamerc/flutter_plugin_filter_list/releases/download/v0.0.5/app-release.apk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code:- &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list" rel="noopener noreferrer"&gt;https://github.com/TheAlphamerc/flutter_plugin_filter_list&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Data flow
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pass list of strings to &lt;code&gt;FilterListDialog.display()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Pass list of selected strings to show pre-selected text otherwise ignore it.&lt;/li&gt;
&lt;li&gt;Invoke method &lt;code&gt;FilterListDialog.display&lt;/code&gt; to display filter dialog.&lt;/li&gt;
&lt;li&gt;Make selection from list.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;All&lt;/code&gt; button to select all text from the list.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Reset&lt;/code&gt; button to make all text unselected.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Apply&lt;/code&gt; button to return selected list of strings.&lt;/li&gt;
&lt;li&gt;On &lt;code&gt;close&lt;/code&gt; icon clicked it close dialog and return a null value.&lt;/li&gt;
&lt;li&gt;Without making any selection &lt;code&gt;Apply&lt;/code&gt; button is pressed it will return an empty list of string.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Add library to your pubspec.yaml
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;filter_list&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^0.0.5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Import library in dart file
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nl"&gt;package:&lt;/span&gt;&lt;span class="n"&gt;filter_list&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;filter_list&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;dart&lt;/span&gt;&lt;span class="s"&gt;';
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. How to use FilterList
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Create a list of Strings
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;  &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;countList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s"&gt;"One"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Two"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Three"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Four"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Five"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Six"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Seven"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Eight"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Nine"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Ten"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Eleven"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Tweleve"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Thirteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Fourteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Fifteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Sixteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Seventeen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Eighteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Nineteen"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"Twenty"&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;selectedCountList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Create a function and call &lt;code&gt;FilterListDialog.display()&lt;/code&gt; on button clicked
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;_openFilterDialog&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;FilterListDialog&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;allTextList:&lt;/span&gt; &lt;span class="n"&gt;countList&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="mi"&gt;480&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;borderRadius:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;headlineText:&lt;/span&gt; &lt;span class="s"&gt;"Select Count"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;searchFieldHintText:&lt;/span&gt; &lt;span class="s"&gt;"Search Here"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;selectedTextList:&lt;/span&gt; &lt;span class="n"&gt;selectedCountList&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;onApplyButtonClick:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&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="p"&gt;{&lt;/span&gt;
          &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;selectedCountList&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&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="n"&gt;Navigator&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&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;h4&gt;
  
  
  Call &lt;code&gt;_openFilterDialog&lt;/code&gt; function on &lt;code&gt;floatingActionButton&lt;/code&gt; pressed to display filter dialog
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&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="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;appBar:&lt;/span&gt; &lt;span class="n"&gt;AppBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;widget&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="nl"&gt;floatingActionButton:&lt;/span&gt; &lt;span class="n"&gt;FloatingActionButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="n"&gt;_openFilterDialog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;tooltip:&lt;/span&gt; &lt;span class="s"&gt;'Increment'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;add&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="c1"&gt;/// check for empty or null value selctedCountList&lt;/span&gt;
        &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;selectedCountList&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;selectedCountList&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
            &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;Center&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'No text selected'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
              &lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ListView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;separated&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="nl"&gt;itemBuilder:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&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="n"&gt;ListTile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;selectedCountList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&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="nl"&gt;separatorBuilder:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Divider&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
                &lt;span class="nl"&gt;itemCount:&lt;/span&gt; &lt;span class="n"&gt;selectedCountList&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;length&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;h4&gt;
  
  
  To display filter widget use &lt;code&gt;FilterListWidget&lt;/code&gt; and pass list of strings to it.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;FilterPage&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;StatelessWidget&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;FilterPage&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="n"&gt;Key&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;allTextList&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nl"&gt;key:&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;allTextList&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&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="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;appBar:&lt;/span&gt; &lt;span class="n"&gt;AppBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;title:&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Filter list Page"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;SafeArea&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="n"&gt;FilterListWidget&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="nl"&gt;allTextList:&lt;/span&gt; &lt;span class="n"&gt;allTextList&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;height:&lt;/span&gt; &lt;span class="n"&gt;MediaQuery&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;hideheaderText:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="nl"&gt;onApplyButtonClick:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;list&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="n"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"selected list length: &lt;/span&gt;&lt;span class="si"&gt;${list.length}&lt;/span&gt;&lt;span class="s"&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="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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;No selected text from list&lt;/th&gt;
&lt;th&gt;FilterList widget&lt;/th&gt;
&lt;th&gt;Make selection&lt;/th&gt;
&lt;th&gt;Selected text from list&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_1.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_2.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_3.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_4.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Hidden close Icon&lt;/th&gt;
&lt;th&gt;Hidden text field&lt;/th&gt;
&lt;th&gt;Hidden header text&lt;/th&gt;
&lt;th&gt;Hidden full header&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_5.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_6.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_7.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_8.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Customised control button&lt;/th&gt;
&lt;th&gt;Customised selected text&lt;/th&gt;
&lt;th&gt;Customised unselected text&lt;/th&gt;
&lt;th&gt;Customised text field background color&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_9.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_10.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_12.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_11.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;FilterListWidget&lt;/th&gt;
&lt;th&gt;N/A&lt;/th&gt;
&lt;th&gt;N/A&lt;/th&gt;
&lt;th&gt;N/A&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_14.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_101.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_121.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;td&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgithub.com%2FTheAlphamerc%2Fflutter_plugin_filter_list%2Fblob%2Fmaster%2Fscreenshots%2Fscreenshot_111.jpg%3Fraw%3Dtrue"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Parameters and Value
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;height&lt;/code&gt; Type: &lt;strong&gt;double&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set height of filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;width&lt;/code&gt; Type: &lt;strong&gt;double&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set width of filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;borderRadius&lt;/code&gt; Type: &lt;strong&gt;double&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set border radius of filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;allTextList&lt;/code&gt; Type: &lt;strong&gt;List&amp;lt;String&amp;gt;()&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Populate filter dialog with text list.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;selectedTextList&lt;/code&gt; Type: &lt;strong&gt;List&amp;lt;String&amp;gt;()&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Marked selected text in filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;headlineText&lt;/code&gt; Type: &lt;strong&gt;String&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set header text of filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;searchFieldHintText&lt;/code&gt; Type: &lt;strong&gt;String&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set hint text in search field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;hideSelectedTextCount&lt;/code&gt; Type: &lt;strong&gt;bool&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide selected text count.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;hideSearchField&lt;/code&gt; Type: &lt;strong&gt;bool&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide search text field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;hidecloseIcon&lt;/code&gt; Type: &lt;strong&gt;bool&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide close Icon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;hideheader&lt;/code&gt; Type: &lt;strong&gt;bool&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide complete header section from filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;closeIconColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set color of close Icon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;headerTextColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set color of header text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;applyButonTextColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set text color of apply button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;applyButonTextBackgroundColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set background color of apply button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;allResetButonColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set text color of all and reset button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;selectedTextColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set color of selected text in filter dialog.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;selectedTextBackgroundColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set background color of selected text field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;unselectedTextbackGroundColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set background color of unselected text field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;unselectedTextColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set text color of unselected text in filter dialog&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;searchFieldBackgroundColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set background color of Search field.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;backgroundColor&lt;/code&gt; Type: &lt;strong&gt;Color&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set background color of filter color.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;onApplyButtonClick&lt;/code&gt; Type &lt;strong&gt;Function(List)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Returns list of strings when apply button is clicked &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute a change to any of the existing features or add new in this repo,&lt;br&gt;
please review our &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/blob/master/CONTRIBUTING.md" rel="noopener noreferrer"&gt;contribution guide&lt;/a&gt;,&lt;br&gt;
and send a &lt;a href="https://github.com/TheAlphamerc/flutter_plugin_filter_list/pulls" rel="noopener noreferrer"&gt;pull request&lt;/a&gt;. I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Created &amp;amp; Maintained By
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/TheAlphamerc" rel="noopener noreferrer"&gt;Sonu Sharma&lt;/a&gt; (&lt;a href="https://www.twitter.com/TheAlphamerc" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;) (&lt;a href="https://www.youtube.com/user/sonusharma045sonu/" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;) (&lt;a href="https://www.instagram.com/_sonu_sharma__" rel="noopener noreferrer"&gt;Insta&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>widget</category>
      <category>package</category>
    </item>
    <item>
      <title>Fwitter android app v1.0.6 is released on play store</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Sat, 18 Jul 2020 03:43:58 +0000</pubDate>
      <link>https://dev.to/thealphamerc/fwitter-android-app-v1-0-6-is-released-on-play-store-pem</link>
      <guid>https://dev.to/thealphamerc/fwitter-android-app-v1-0-6-is-released-on-play-store-pem</guid>
      <description>&lt;p&gt;A Fwitter is a working Twitter clone written in Flutter using firebase features like auth, realtime database and storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  New feature
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tweet filter functionality added on profile page.&lt;/li&gt;
&lt;li&gt;User profile pic view added to view user profile picture.&lt;/li&gt;
&lt;li&gt;User can tag other users in tweet, comment and in retweet.&lt;/li&gt;
&lt;li&gt;A notification will send to you if someone tag you in a tweet.&lt;/li&gt;
&lt;li&gt;If user tap on notification from system notification tray, it will redirect to user profile who tagged you.&lt;/li&gt;
&lt;li&gt;Chat list sorted by last message.&lt;/li&gt;
&lt;li&gt;Last message and time is added on chat user list page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;App link:- &lt;a href="https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_twitter_clone"&gt;https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_twitter_clone&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Source code:- &lt;a href="https://github.com/TheAlphamerc/flutter_twitter_clone"&gt;https://github.com/TheAlphamerc/flutter_twitter_clone&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Work progress status:- &lt;a href="https://github.com/TheAlphamerc/flutter_twitter_clone/projects"&gt;https://github.com/TheAlphamerc/flutter_twitter_clone/projects&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributing
&lt;/h2&gt;

&lt;p&gt;If you wish to contribute a change to any of the existing features or add new in this repo,&lt;br&gt;
please review our &lt;a href="https://github.com/TheAlphamerc/flutter_twitter_clone/blob/master/CONTRIBUTING.md"&gt;contribution guide&lt;/a&gt;,&lt;br&gt;
and send a &lt;a href="https://github.com/TheAlphamerc/flutter_twitter_clone/pulls"&gt;pull request&lt;/a&gt;. I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Created &amp;amp; Maintained By
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/TheAlphamerc"&gt;Sonu Sharma&lt;/a&gt; (&lt;a href="https://www.twitter.com/TheAlphamerc"&gt;Twitter&lt;/a&gt;) (&lt;a href="https://www.youtube.com/user/sonusharma045sonu/"&gt;Youtube&lt;/a&gt;) (&lt;a href="https://www.instagram.com/_sonu_sharma__"&gt;Insta&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>opensource</category>
      <category>twitterclone</category>
    </item>
    <item>
      <title>Spacexopedia | Built with Flutter</title>
      <dc:creator>Sonu Sharma 💙</dc:creator>
      <pubDate>Sat, 11 Jul 2020 04:16:58 +0000</pubDate>
      <link>https://dev.to/thealphamerc/spacexopedia-built-with-flutter-11e8</link>
      <guid>https://dev.to/thealphamerc/spacexopedia-built-with-flutter-11e8</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Hello guys, From the past 4 weeks I was working on a flutter project not dedicatedly but in my free time. The purpose of this project is to develop the ultimate SpaceX experience in a variety of platforms. A single experience, from a single codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  About Spacexopedia
&lt;/h3&gt;

&lt;p&gt;Spacexopedia has been developed to provide information about space projects of giant space company SpaceX. App is a light-weight, fast and easy to use. It fetches the data from the open-source r/SpaceX REST API, which can be found &lt;a href="https://github.com/r-spacex/SpaceX-API"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This Spacexopedia has been built using the Flutter framework, which allows to build an app for mobile, desktop &amp;amp; web, from a single codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  App features:-
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Past &amp;amp; upcoming launches: flight no., launch date, location, vehicle type,rocket used etc.&lt;/li&gt;
&lt;li&gt;Tesla Roadster : orbit, speed &amp;amp; distance of the Elon Musk's Tesla Roadster.&lt;/li&gt;
&lt;li&gt;Rockets catalog: read about all rockets, capsules &amp;amp; ships SpaceX has developed over the years.&lt;/li&gt;
&lt;li&gt;Dragon capsule catalog: type, diameter, height, weight, capacity, payload.&lt;/li&gt;
&lt;li&gt;Core &amp;amp; capsules details: more information about each core &amp;amp; capsules launched&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the completion of the first phase, it seemed to be in a stable state so I have decided to publish it on the play store. &lt;/p&gt;

&lt;h3&gt;
  
  
  Links
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;App link:- &lt;a href="https://play.google.com/store/apps/details?id=com.thealphamerc.flutter_spacexopedia"&gt;Play Store&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Project source code:- &lt;a href="https://github.com/TheAlphamerc/flutter_spacexopedia"&gt;Github&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;App preview:- &lt;a href="https://www.youtube.com/watch?v=RdNilu8mNPI&amp;amp;t"&gt;Youtube&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Wrapping it up
&lt;/h3&gt;

&lt;p&gt;This application is not affiliated with, funded or in any other way associated with SpaceX company.&lt;/p&gt;

&lt;p&gt;If this project inspires you to build anything interesting let me know in comments. If you have any ideas for new features or wants to contribute in project be sure to send a &lt;a href="https://github.com/TheAlphamerc/flutter_spacexopedia/pulls"&gt;pull request&lt;/a&gt;.&lt;br&gt;
If you found a bug or want to suggest a feature report it &lt;a href="https://github.com/TheAlphamerc/flutter_spacexopedia/issues"&gt;here&lt;/a&gt;. If you like the project then show your love by giving star the repo.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>spacex</category>
      <category>opensource</category>
      <category>functional</category>
    </item>
  </channel>
</rss>
