<?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: Bivor Faruque</title>
    <description>The latest articles on DEV Community by Bivor Faruque (@bivor).</description>
    <link>https://dev.to/bivor</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%2F389228%2Fd9183397-9361-4f94-8c72-d3259115b27c.png</url>
      <title>DEV Community: Bivor Faruque</title>
      <link>https://dev.to/bivor</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bivor"/>
    <language>en</language>
    <item>
      <title>Top VS Code Extensions I use for Productivity</title>
      <dc:creator>Bivor Faruque</dc:creator>
      <pubDate>Sun, 26 Feb 2023 12:40:03 +0000</pubDate>
      <link>https://dev.to/bivor/top-vs-code-extensions-i-use-for-productivity-487o</link>
      <guid>https://dev.to/bivor/top-vs-code-extensions-i-use-for-productivity-487o</guid>
      <description>&lt;p&gt;Hello Developers, &lt;br&gt;
I am Bivor and I am working as a developer specializing in the Backend side. When I was starting my career as a developer I learned about VS Code. Though some of you already know, let me tell you about it …&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Visual Studio Code (VS Code) is a popular and highly customizable text editor among developers for its productivity features. One of the biggest benefits of VS Code is the &lt;strong&gt;ability to install extensions,&lt;/strong&gt; which allow users to customize their workflow and improve their productivity.&lt;/p&gt;
&lt;h2&gt;
  
  
  Ability to Install and Use Extensions!!!
&lt;/h2&gt;

&lt;p&gt;When I first installed VS code I like most people didn’t even know how to use it. I just wanted to write some code LOL. However, after finding that it can install extensions and about the marketplace of extensions, I immediately went on shopping. I played around with loads of extensions, watched a lot of YouTube videos, and read blog posts about what extensions others use that would help me to work smarter. As I am sure you all will too …&lt;/p&gt;

&lt;p&gt;In this post, we will look at some useful VS Code extensions that help me save time and work more efficiently. I hope it helps you guys out,&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer" rel="noopener noreferrer"&gt;Live Server&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Live Server is a VS Code extension that allows developers to preview their web pages in real-time. This extension can be especially useful for web developers who need to see their changes reflected immediately. Live Server can be activated by clicking on the "Go Live" button in the status bar, and it will automatically refresh the browser every time you save your changes. This extension also supports live reloading, which means that changes made to linked CSS or JavaScript files will also be reflected in the browser without the need to reload the page.&lt;br&gt;
Here is also a youtube video that might help,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=y4qqQeUDCBQ&amp;amp;ab_channel=JulioCodes" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=y4qqQeUDCBQ&amp;amp;ab_channel=JulioCodes&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;GitLens is a powerful VS Code extension designed to make working with Git repositories easier and more efficient. It provides a wealth of information about the code you are working on, including commit history, blame annotations, and code authorship. With GitLens, you can quickly see who made a particular change, when it was made, and why. This extension also provides a variety of useful features, such as code diffs, branch comparisons, and pull request reviews, all from within the VS Code editor.&lt;/p&gt;

&lt;p&gt;If you are working in a team, which will happen more often than you think GitLens will help you a lot. Trust me on this,&lt;/p&gt;

&lt;p&gt;Here is a youtube video that might help you,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=UQPb73Zz9qk&amp;amp;ab_channel=GitKraken" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=UQPb73Zz9qk&amp;amp;ab_channel=GitKraken&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.bettercomment#:~:text=Simply%20chooses%20to%20toggle%20a,a%20line%20comment%20is%20toggled." rel="noopener noreferrer"&gt;Better Comments&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Better Comments is a VS Code extension that helps developers write more readable and maintainable code by formatting comments in a way that distinguishes them from regular code. This extension supports different comment types, such as alerts, queries, and explanations, and it color-codes them to make them stand out. Better Comments can also be customized to match your preferences, allowing you to create your own comment types and formatting rules.&lt;/p&gt;

&lt;p&gt;Here is a YouTube video,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=WHwi6-hzJhA&amp;amp;ab_channel=CoolITHelp" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=WHwi6-hzJhA&amp;amp;ab_channel=CoolITHelp&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode" rel="noopener noreferrer"&gt;Prettier - Code formatter&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Prettier - Code formatter is a VS Code extension that automatically formats your code according to a set of predefined rules. This extension supports multiple file types, including JavaScript, TypeScript, CSS, HTML, JSON, and Markdown. With Prettier, you can save a lot of time and avoid the hassle of manually formatting your code. This extension also supports custom formatting rules, allowing you to tailor the formatting to your specific needs.&lt;/p&gt;

&lt;p&gt;Though I don’t like it that much now [Just my personal opinion], it helped me a lot in the past&lt;/p&gt;

&lt;p&gt;Here is a YouTube video,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=__eiQumLOEo&amp;amp;ab_channel=CodingWithAdam" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=__eiQumLOEo&amp;amp;ab_channel=CodingWithAdam&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Honorable Mention
&lt;/h2&gt;
&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2" rel="noopener noreferrer"&gt;Bracket Pair Colorizer 2 [Deprecated]&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Though it is Deprecated after 2022 I love it, &lt;br&gt;
Bracket Pair Colorizer 2 is a popular VS Code extension that helps developers read and navigate through code more easily. This extension color-codes the brackets in different colors, making it easier to distinguish between opening and closing brackets. This can be especially helpful when working with nested code blocks. Bracket Pair Colorizer 2 also supports custom bracket colors, making it easy to customize the extension to match your preferences.&lt;/p&gt;

&lt;p&gt;To colorize in VS Code now you will just have to paste this in your settings.json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;editor.bracketPairColorization.enabled&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint" rel="noopener noreferrer"&gt;ESLint&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;ESLint is a popular VS Code extension that helps developers write cleaner and more consistent code by identifying and highlighting errors and code smells in their code. This extension integrates seamlessly with VS Code and provides real-time feedback on your code as you type. ESLint supports a wide range of rules, including best practices, coding style, and security issues. With ESLint, you can ensure that your code is of the highest quality and conforms to the best coding practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: If you are just starting your development journey, do not use it now. Use it after you are a little bit comfortable with it.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Here is a YouTube video,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=eMgLHOrDkAs&amp;amp;ab_channel=WEBCIFAR" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=eMgLHOrDkAs&amp;amp;ab_channel=WEBCIFAR&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In this post, we have looked at some VS Code extensions that can help developers save time, work more efficiently, and write better code. Whether you need to navigate through code more easily, preview web pages in real-time, work with Git repositories, write more readable comments, or automatically format your code, there is likely an extension that can help. These extensions can significantly improve your productivity and help you customize your workflow to match your preferences. So, go ahead and explore the vast library of VS Code extensions to find the ones that work best for you!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>Why DTOs are a Must-Have in Nest.js API Development</title>
      <dc:creator>Bivor Faruque</dc:creator>
      <pubDate>Sat, 28 Jan 2023 11:17:51 +0000</pubDate>
      <link>https://dev.to/bivor/why-dtos-are-a-must-have-in-nestjs-api-development-3j2j</link>
      <guid>https://dev.to/bivor/why-dtos-are-a-must-have-in-nestjs-api-development-3j2j</guid>
      <description>&lt;p&gt;&lt;strong&gt;DTO&lt;/strong&gt;, or &lt;strong&gt;Data Transfer Objects&lt;/strong&gt;, are a crucial concept in building robust and maintainable APIs, especially when using Nest.js. They serve as a way to structure and validate the data that flows between the client and the server.&lt;/p&gt;

&lt;p&gt;One of the main advantages of using DTOs in Nest.js is that they allow for a clear separation of concerns between the client and the server. By defining a specific set of data that the client can send to the server, and a specific set of data that the server will send back, we can ensure that the API is only handling the data that it needs to. This can help to reduce the complexity of the API and make it easier to maintain.&lt;/p&gt;

&lt;p&gt;Here is an example of how to define a DTO in Nest.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import { IsString, IsInt } from 'class-validator';

export class CreateProductDto {
  @IsString()
  readonly name: string;

  @IsInt()
  readonly price: number;
}

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

&lt;/div&gt;



&lt;p&gt;DTOs also provide a way to validate the data that is being sent to the API. By defining a set of rules and constraints for each DTO, we can ensure that the data that is sent to the API is in the correct format and contains all of the necessary information. This can help to prevent errors and bugs in the API, and make it more reliable and robust.&lt;/p&gt;

&lt;p&gt;For example, in this CreateProductDto, we are using the class-validator package to ensure that the name property is a string and the price property is an integer.&lt;/p&gt;

&lt;p&gt;Another important aspect of DTOs is that they can be used to transform the data that is sent to the API. For example, we can use DTOs to convert data from one format to another, or to add or remove fields from the data. This allows us to have more control over the data that is being sent to the API, and can help to make the API more flexible and adaptable.&lt;/p&gt;

&lt;p&gt;In summary, DTOs are a powerful tool for building robust and maintainable APIs in Nest.js. They allow for a clear separation of concerns between the client and the server, and provide a way to validate and transform the data that is sent to the API. By using DTOs in your Nest.js API, you can ensure that your API is reliable, flexible and easy to maintain.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>tauri</category>
      <category>privacy</category>
      <category>github</category>
    </item>
    <item>
      <title>Alias for git add, commit and push all together.</title>
      <dc:creator>Bivor Faruque</dc:creator>
      <pubDate>Tue, 09 Aug 2022 11:49:30 +0000</pubDate>
      <link>https://dev.to/bivor/alias-for-git-add-commit-and-push-all-together-5ako</link>
      <guid>https://dev.to/bivor/alias-for-git-add-commit-and-push-all-together-5ako</guid>
      <description>&lt;p&gt;As we are developers we love to automate stuff. However, I feel that our use of git is quite a manual process and takes our time. In this article, I am going to discuss how I use alias to help me. Hope this is useful to you.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alias for add, commit and push
&lt;/h2&gt;

&lt;p&gt;So we all remember the tedious commands for pushing our code to a remote git branch whenever we make any changes to our code we have to use,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt; //To add all your changes 

git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"my commit"&lt;/span&gt; //commit the changes that are made with a message

git push //push the commit to your repo 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It seems like small but it is a very tedious process once you do it over and over again. Thus, comes the following alias to do add, commit and push it all in one command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; alias.cmp &lt;span class="s1"&gt;'!f() { git add -A &amp;amp;&amp;amp; git commit -m "$@" &amp;amp;&amp;amp; git push; }; f'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this command in your cmd. You can just do the following to add, commit and push your changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git cmp &lt;span class="s2"&gt;"my commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Alias for add and commit
&lt;/h2&gt;

&lt;p&gt;However, sometimes we just need to do a local commit.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt; //To add all your changes 

git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"my commit"&lt;/span&gt; //commit the changes that are made with a message
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No worries, I am lazy too,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; alias.ac &lt;span class="s2"&gt;"!git add -A &amp;amp;&amp;amp; git commit -m "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this command in your cmd. You can just do the following to add and commit your changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git ac &lt;span class="s2"&gt;"my commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Thanks for reading, and happy coding!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>github</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
