<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Pradeep Pradyumna</title>
    <description>The latest articles on Forem by Pradeep Pradyumna (@pradeepradyumna).</description>
    <link>https://forem.com/pradeepradyumna</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%2F470746%2Fe6ebb8e8-dc64-40b7-a533-05c067709d11.JPG</url>
      <title>Forem: Pradeep Pradyumna</title>
      <link>https://forem.com/pradeepradyumna</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pradeepradyumna"/>
    <language>en</language>
    <item>
      <title>Build your first Hangfire job .NET8 with PostgreSQL</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Thu, 22 Feb 2024 12:29:29 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/your-first-hangfire-job-fornet8-with-postgresql-30nd</link>
      <guid>https://forem.com/pradeepradyumna/your-first-hangfire-job-fornet8-with-postgresql-30nd</guid>
      <description>&lt;p&gt;In this article, I will share a few simple steps you will need to create your first hangfire job using .NET 8(the latest at the time of writing this article) with Postgres as the database.&lt;/p&gt;

&lt;p&gt;Also, please be aware that in this article I'm not going to brief what Hangfire is, as there are plenty of articles already written by wise authors. :)&lt;/p&gt;

&lt;p&gt;Alright, let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. First step first
&lt;/h2&gt;

&lt;p&gt;We can create either an ASP.NET Core Web App or API (it doesn't really matter what you choose). However, for simplicity, I'm using an API project targeting.NET8&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Install Nuget Packages
&lt;/h2&gt;

&lt;p&gt;You'll need to install the following Nuget packages&lt;br&gt;
&lt;code&gt;Npgsql.EntityFrameworkCore.PostgreSQL&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Microsoft.EntityFrameworkCore.Design&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hangfire.AspNetCore&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Hangfire.PostgreSql&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's all you need!&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Create a DBContext
&lt;/h2&gt;

&lt;p&gt;You will need a custom DBContext class to run a DB Migration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    public class DefaultDbContext : DbContext
    {
        public DefaultDbContext(DbContextOptions&amp;lt;DefaultDbContext&amp;gt; options)
            : base(options) { }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Create a DB in Postgres
&lt;/h2&gt;

&lt;p&gt;Just go ahead and create a database called &lt;code&gt;HangfireSample&lt;/code&gt;&lt;br&gt;
This is all you need to do at the DB level!&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Configuration
&lt;/h2&gt;

&lt;p&gt;Now before you run migration configure the DB path in &lt;code&gt;appsettings.json&lt;/code&gt; and update &lt;code&gt;program.cs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"ConnectionStrings": {
  "defaultConnection": "Host=localhost;Port=5432;Username=postgres;Password=YOUR_PWD;Database=HangfireSample"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update the below code in &lt;code&gt;program.cs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;builder.Services.AddEntityFrameworkNpgsql().AddDbContext&amp;lt;DefaultDbContext&amp;gt;(options =&amp;gt; {
    options.UseNpgsql(builder.Configuration.GetConnectionString("defaultConnection"));
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Run migration
&lt;/h2&gt;

&lt;p&gt;Just open Package Manager Console and run the below commands&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dotnet ef migrations add InitContext
dotnet ef database update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create &lt;code&gt;__EFMigrationsHistory&lt;/code&gt; under &lt;code&gt;public&lt;/code&gt; schema&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Almost done
&lt;/h2&gt;

&lt;p&gt;Now configure Hangfire service in &lt;code&gt;program.cs&lt;/code&gt; with the below code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;builder.Services.AddHangfire(x =&amp;gt;
    x.UsePostgreSqlStorage(builder.Configuration.GetConnectionString("defaultConnection")));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And update middleware&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.UseHangfireDashboard("/dashboard");
app.UseHangfireServer();

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

&lt;/div&gt;



&lt;p&gt;This was all you had to do create the hangfire server and storage.&lt;/p&gt;

&lt;p&gt;Now, let's create a simple job.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. First Hangfire job
&lt;/h2&gt;

&lt;p&gt;Just copy the code below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BackgroundJob.Enqueue(() =&amp;gt; Console.WriteLine("My first handfire job!"));

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

&lt;/div&gt;



&lt;p&gt;Now, you run the solution!&lt;/p&gt;

&lt;p&gt;To see your job, visit&lt;br&gt;
&lt;a href="https://localhost:44397/dashboard"&gt;https://localhost:44397/dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you go to &lt;a href="https://localhost:44397/dashboard/jobs/succeeded"&gt;https://localhost:44397/dashboard/jobs/succeeded&lt;/a&gt; &lt;br&gt;
you'll see the job you just executed.&lt;/p&gt;

&lt;p&gt;Also, just you know, if you check the &lt;code&gt;HangfireSample&lt;/code&gt; database, you'll the hangfire tables would be created under &lt;code&gt;hangfire&lt;/code&gt; schema.&lt;/p&gt;

&lt;p&gt;Just for your reference &lt;a href="https://github.com/pradeepradyumna/HangfireSample"&gt;here&lt;/a&gt; is the complete working sample of the code I just explained.&lt;/p&gt;

&lt;p&gt;I hope it helped you!&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>hangfire</category>
      <category>dotnet</category>
      <category>dotnetcore</category>
    </item>
    <item>
      <title>Want to improve your code?</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Wed, 18 Jan 2023 14:51:34 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/want-to-improve-your-code-19fn</link>
      <guid>https://forem.com/pradeepradyumna/want-to-improve-your-code-19fn</guid>
      <description>&lt;p&gt;&lt;strong&gt;This article I published originally&lt;/strong&gt; &lt;a href="https://medium.com/@pradeepradyumna/want-to-improve-your-code-b20064ea6a4b"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are a programmer and write lots a lot of code then it always important to keep a few things in mind like how you want to proceed. But also it is important to set the mentality right if you have intentions for improving your approaches. Here are some tips I believe which helped me a lot in writing and improving my code over the years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PATIENCE, INTEREST&lt;/strong&gt;&lt;br&gt;
You always have to be patient and trust your gut. Always assume that your code will break. No matter how experienced you are. Just keep calm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PRACTICE&lt;/strong&gt;&lt;br&gt;
Once you’re able to fix a problem, practice the habit of going through the solution once again. It brings confidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TIME&lt;/strong&gt;&lt;br&gt;
You cannot be the best overnight. It takes time and interest. And you need to make an effort for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OBSERVE&lt;/strong&gt;&lt;br&gt;
Always observe your code. Once you have written a logic/ code, just compare it with others. Get it reviewed by your peers and get their opinion. And see how better could it be. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MOTIVATED, POSITIVE&lt;/strong&gt;&lt;br&gt;
Be motivated and if you do not, go get motivation when you want to do something good. Unless you are not, then you cannot improve your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BREAK, BREATHE&lt;/strong&gt;&lt;br&gt;
If you’ve spent hours writing a program and trying to clean it up the same time or breaking your head, probably it’s a bad idea. Go take a break. Breathe.  &lt;/p&gt;

&lt;p&gt;End of the day, it’s the happiness and sense of satisfaction you get once you see your work. &lt;/p&gt;

&lt;p&gt;So what do you think? Let me know in the comments&lt;/p&gt;

</description>
      <category>improve</category>
      <category>goodcode</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Super Mario</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Wed, 03 Aug 2022 07:37:24 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/super-mario-1367</link>
      <guid>https://forem.com/pradeepradyumna/super-mario-1367</guid>
      <description>&lt;p&gt;Who doesn't like the Super Mario game here? It's one of my favorites that I loved playing during my childhood. To cherish the moment, I tried building the game using plain HTML, Javascript, and CSS. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e2c-TfSc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gaow24ryeyyoqe4c5c82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e2c-TfSc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gaow24ryeyyoqe4c5c82.png" alt="Game" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Spoiler Alert&lt;/strong&gt; It's very basic one.&lt;span&gt; 😁&lt;/span&gt;   &lt;/p&gt;

&lt;p&gt;I have embedded the sound effects to retain the feel too. And &lt;a href="https://pages.github.com/"&gt;hosted it on Github&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here is the game&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://pradeepradyumna.github.io/SuperMario/" rel="noopener noreferrer"&gt;
      pradeepradyumna.github.io
    &lt;/a&gt;
&lt;/div&gt;
 

&lt;p&gt;My highest score was 17. What is yours? Do let me know in the comments.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>6 things required to integrate SourceTree with Azure Repos</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Tue, 22 Jun 2021 06:57:06 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/6-important-things-to-keep-in-mind-while-integrating-sourcetree-with-azure-repos-1m5o</link>
      <guid>https://forem.com/pradeepradyumna/6-important-things-to-keep-in-mind-while-integrating-sourcetree-with-azure-repos-1m5o</guid>
      <description>&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;Open your Azure DevOps account and select any repository and click the &lt;strong&gt;Clone&lt;/strong&gt; button&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;Click on &lt;strong&gt;Generate Git Credentials&lt;/strong&gt; button, it will show &lt;code&gt;Username&lt;/code&gt; &amp;amp; &lt;code&gt;Password&lt;/code&gt;. Just a make copy of it in a notepad&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;Launch SourceTree and go to &lt;strong&gt;Remote&lt;/strong&gt; tab and click on &lt;strong&gt;Add an account…&lt;/strong&gt; button&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a8apPKOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5c2btt7gruj40oae7nm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a8apPKOp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5c2btt7gruj40oae7nm.png" alt="image" width="432" height="379"&gt;&lt;/a&gt;&lt;br&gt;
Set following values:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hosting Service: Azure DevOps&lt;br&gt;
Host URL: &lt;a href="https://yourorganisationname.visualstudio.com"&gt;https://yourorganisationname.visualstudio.com&lt;/a&gt;&lt;br&gt;
Preferred Protocol: HTTPS&lt;br&gt;
Authentication: Personal Access Token&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and click on the &lt;strong&gt;Refresh Personal Access Token&lt;/strong&gt; button, it will prompt for &lt;code&gt;username&lt;/code&gt; &amp;amp; &lt;code&gt;password&lt;/code&gt;, just copy-paste the values from Step 2&lt;br&gt;
That’s it! You’re all set to clone your repositories&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5
&lt;/h3&gt;

&lt;p&gt;In the &lt;strong&gt;Remote&lt;/strong&gt; tab, it will start listing down all your repositories. Now pick any repository you want and click on the &lt;strong&gt;Clone&lt;/strong&gt; option&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6
&lt;/h3&gt;

&lt;p&gt;All the fields will be prefilled for you, so just go ahead and click Clone&lt;br&gt;
It will start downloading the code to your drive&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gnquQzjP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ipqymy6uwdhuhqrrib2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gnquQzjP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ipqymy6uwdhuhqrrib2.png" alt="image" width="599" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;span&gt; &lt;/span&gt;&lt;span&gt; ✌&lt;/span&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>sourcetree</category>
      <category>showdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>Azure CLI: Get Azure repositories list in 4 steps</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Tue, 01 Jun 2021 10:29:37 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/azure-cli-get-repositories-list-1b40</link>
      <guid>https://forem.com/pradeepradyumna/azure-cli-get-repositories-list-1b40</guid>
      <description>&lt;p&gt;If you're looking for an azure cli command to get a list of repositories, you can follow the steps:&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 1:
&lt;/h1&gt;

&lt;p&gt;Download Azure CLI from &lt;a href="https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 2:
&lt;/h1&gt;

&lt;p&gt;Add the Azure DevOps extension&lt;br&gt;
&lt;code&gt;az extension add --name azure-devops&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 3:
&lt;/h1&gt;

&lt;p&gt;Configure defaults. Give YOUR organization and project names&lt;br&gt;
&lt;code&gt;az devops configure --defaults organization=https://dev.azure.com/&amp;lt;ORGANIZATION_NAME&amp;gt; project=&amp;lt;PROJECT_NAME&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Step 4:
&lt;/h1&gt;

&lt;p&gt;Get list by running either of the below commands&lt;/p&gt;

&lt;p&gt;&lt;code&gt;az repos list --org "https://dev.azure.com/&amp;lt;ORGANIZATION_NAME&amp;gt;" -p "&amp;lt;PROJECT_NAME&amp;gt;" -o tsv --query [].name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;az repos list --query '[].{Name:name, Url:remoteUrl}' -o json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Cheers!&lt;br&gt;
Thanks for reading!&lt;span&gt; 💛&lt;/span&gt;&lt;/p&gt;

</description>
      <category>azure</category>
      <category>git</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Learned how to change the background color of a React function component randomly</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Wed, 30 Dec 2020 14:18:22 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/learned-how-to-change-the-background-color-of-the-react-function-component-randomly-2lel</link>
      <guid>https://forem.com/pradeepradyumna/learned-how-to-change-the-background-color-of-the-react-function-component-randomly-2lel</guid>
      <description>&lt;p&gt;Currently, I'm working on a web app using React JS and it has a lot of functional components that I render selectively when required. I have defined styles for almost every component in my &lt;code&gt;App.css&lt;/code&gt; file. But, I wanted one of my components to change its background color randomly every time it loads. I wasn't sure of the JS syntax and when I looked upon the internet I didn't get the exact syntax I was looking for. &lt;/p&gt;

&lt;p&gt;After some trial and error, I finally cracked a syntax and it worked! So, I thought of sharing with the community here.&lt;span&gt; 😁&lt;/span&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&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;MyComponent&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="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// I found this formula&lt;/span&gt;
  &lt;span class="c1"&gt;// here: https://css-tricks.com/snippets/javascript/random-hex-color/&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;randomColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;random&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;16777215&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// The trouble I had was about how to use&lt;/span&gt;
  &lt;span class="c1"&gt;// the variable randomColor in "style:{}" tag&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"parent-container"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;
        &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"child-container"&lt;/span&gt;
        &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&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;randomColor&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="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;h4&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;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;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;MyComponent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'm not sure if this the only way of doing it. But if there are any other ways too, pls share them in the comments. I would be happy to learn!&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;span&gt; &lt;/span&gt;&lt;span&gt; ✌&lt;/span&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>react</category>
      <category>tutorial</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Form Teams Online: A React App</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Sat, 26 Dec 2020 07:37:01 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/form-teams-online-a-react-app-3a4m</link>
      <guid>https://forem.com/pradeepradyumna/form-teams-online-a-react-app-3a4m</guid>
      <description>&lt;p&gt;I have built an app using React JS and hosted it over Netlify. I'm &lt;strong&gt;not going to brag&lt;/strong&gt; about how I built this app and other technicalities, as there are just so many ReactJS tutorials available on this community already&lt;span&gt; &lt;/span&gt;&lt;span&gt; 😀&lt;/span&gt;, BUT I'm gonna share &lt;strong&gt;why I built this app&lt;/strong&gt; and &lt;strong&gt;how it helps my folks&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem Statement&lt;span&gt; &lt;/span&gt;&lt;span&gt; 🔥&lt;/span&gt;
&lt;/h2&gt;

&lt;p&gt;There are a lot of fun activities and games that my company organizes on various occasions and being a part of the creative team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We send out registration forms to all employees across the company&lt;/li&gt;
&lt;li&gt;In turn, we get a lot of nominations&lt;/li&gt;
&lt;li&gt;We calculate on a total of how many teams that we can have out so many participation received/ how many teams can we form for a specific count of participation in a team.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;For example: Suppose we have received 60 nominations&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;if we need 15 teams, how can we equally distribute 60 participants in 15 teams. How many extras (participants left out) would we get.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;if we want 12 participants in one team, how many teams could we form, and how many would be the extras&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;We then have to form teams where we ensure that participants are equally distributed and shuffled at the same time in different teams.&lt;/li&gt;
&lt;li&gt;Sometimes we get nominations at the very last moment, and we try to fit that new participant in a team and end up reorganizing teams.&lt;/li&gt;
&lt;li&gt;The same process goes on if any participant backs out after all team formations are done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And this whole task of forming teams is just so time-consuming.&lt;/p&gt;

&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt; 😒&lt;/span&gt;&lt;span&gt; 😒&lt;/span&gt;&lt;span&gt; 😒&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Hence, I decided to build an app for this to speed up the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idea&lt;span&gt; &lt;/span&gt;&lt;span&gt; ☕&lt;/span&gt;
&lt;/h2&gt;

&lt;p&gt;I built a very user-friendly app that would have simple UI controls to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add/ Remove participants&lt;/li&gt;
&lt;li&gt;An input field that takes in the number of teams to create?&lt;/li&gt;
&lt;li&gt;An input field that takes in the number of participants per team?
&lt;p&gt;&lt;span&gt; 😎&lt;/span&gt;&lt;span&gt; 😎&lt;/span&gt;&lt;span&gt; 😎&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://formteamsforme.netlify.app/"&gt;https://formteamsforme.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built this app using React JS and hosted it over Netlify to achieve CI/ CD in no time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Advantages&lt;span&gt; &lt;/span&gt;&lt;span&gt; 😁&lt;/span&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Now anybody can form teams easily in minutes&lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Shuffling participants is no big deal&lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Teams shuffle for every new entry/ removal of participants &lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Any addition/ removal of participants, teams adjust automatically&lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Get extras i.e. the list participants who fall out of teams &lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;In case you accidentally close the TAB in which the application is running, it would prompt you a message as a precautionary measure &lt;span&gt; 🔥&lt;/span&gt;. This is to prevent the user from losing any changes. &lt;br&gt;
&lt;span&gt; ⚡&lt;span&gt; &lt;/span&gt;&lt;/span&gt;Out of all, it is super fast, super easy and fun to create teams. So much time is saved!&lt;/p&gt;

&lt;h2&gt;
  
  
  Yet to be done
&lt;/h2&gt;

&lt;p&gt;I have some styling and alignment issues pending, which I'm working on. But do let me know if there's anything you like and needs to be added/ improved in the app. I'm all ears.&lt;/p&gt;

&lt;p&gt;The Github link for this application is available &lt;a href="https://github.com/pradeepradyumna/iformteamshere"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;span&gt; &lt;/span&gt;&lt;span&gt; ✌&lt;/span&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>showdev</category>
      <category>netlify</category>
    </item>
    <item>
      <title>Want to run your exe from just anywhere on your computer?</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Tue, 08 Dec 2020 11:46:06 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/want-to-run-your-exe-from-anywhere-on-your-computer-4bkh</link>
      <guid>https://forem.com/pradeepradyumna/want-to-run-your-exe-from-anywhere-on-your-computer-4bkh</guid>
      <description>&lt;p&gt;Wouldn't it be cool, if we were able to launch an exe that we built/ saved in a particular folder in say F:\ drive be runnable even outside that folder or anywhere you want by typing just the exe name and not including the entire path referencing to it? &lt;span&gt; 😀&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;And by "anywhere" I mean, you can launch your application&lt;br&gt;
&lt;span&gt; ⚡&lt;/span&gt;  From start menu (shortcut - &lt;strong&gt;Windows&lt;/strong&gt; key)&lt;br&gt;
&lt;span&gt; ⚡&lt;/span&gt;  From Run command dialog box (shortcut - &lt;strong&gt;Windows + r&lt;/strong&gt;) &lt;br&gt;
&lt;span&gt; ⚡&lt;/span&gt;  By typing application name in Windows Address bar of any drive/ folder on your computer&lt;br&gt;
&lt;span&gt; ⚡&lt;/span&gt;  By typing application name from a command prompt opened from any drive/ folder directly without worrying to change the directory.&lt;/p&gt;

&lt;p&gt;&lt;span&gt; ✨&lt;/span&gt;&lt;strong&gt;Sounds interesting?&lt;/strong&gt; &lt;span&gt; ✨&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;For demonstration purposes, I have built a very basic C# .NET console application with the name "SayMyName" which outputs the currently logged-in username.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;

&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;SayMyName&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Program&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;UserName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ToUpper&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
            &lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ReadLine&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;The output path of this application is&lt;br&gt;
&lt;code&gt;T:\MyExe\SayMyName\SayMyName\bin\Debug\SayMyName.exe&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Just make a copy of your exe's path looking like this on a notepad and that's it. It is &lt;strong&gt;all you need&lt;/strong&gt; and we are very much good to go!&lt;/p&gt;

&lt;p&gt;We will be basically doing two things here to let our computer know about this application.&lt;br&gt;
One, registering the path to exe in the system registry &lt;a href="https://en.wikipedia.org/wiki/Windows_Registry#HKEY_LOCAL_MACHINE_(HKLM)" rel="noopener noreferrer"&gt;HKLM&lt;/a&gt;&lt;br&gt;
Two, registering the path to exe in &lt;a href="https://en.wikipedia.org/wiki/PATH_(variable)" rel="noopener noreferrer"&gt;PATH&lt;/a&gt; environment variable&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://support.microsoft.com/en-us/windows/how-to-open-registry-editor-in-windows-10-deab38e6-91d6-e0aa-4b7c-8878d9e07b11" rel="noopener noreferrer"&gt;Open windows registry&lt;/a&gt; and go to &lt;code&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;Right-click on &lt;code&gt;App Paths&lt;/code&gt; and add a &lt;code&gt;Key&lt;/code&gt; with the name &lt;code&gt;saymyname.exe&lt;/code&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;On the right side, you see the &lt;code&gt;(Default)&lt;/code&gt; value name? Right-click on it click &lt;code&gt;Modify...&lt;/code&gt;. Now copy-paste the path &lt;code&gt;T:\MyExe\SayMyName\SayMyName\bin\Debug\SayMyName.exe&lt;/code&gt; and click OK. Now add one more value, by right-clicking -&amp;gt; New -&amp;gt; String value and name it &lt;code&gt;Path&lt;/code&gt; and set its data value to the exe's containing folder followed by a semicolon i.e. &lt;code&gt;T:\MyExe\SayMyName\SayMyName\bin\Debug;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You're almost done! These steps will enable your application to be accessible via the Windows Address bar of any drive and folder, start menu, and Run box.&lt;/p&gt;

&lt;p&gt;For ease, you can find the &lt;a href="https://github.com/pradeepradyumna/saymyname/blob/main/UpdateYourRegistry.reg" rel="noopener noreferrer"&gt;.reg file here&lt;/a&gt;, which I have customized. You can just download, edit, and import it into your registry.&lt;/p&gt;

&lt;p&gt;Now, perform just this one last step to make your application accessible from any command prompt anywhere.&lt;span&gt; 😁&lt;/span&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4
&lt;/h3&gt;

&lt;p&gt;Now go to the Environment Variable window. You can do this by, right-click 'This PC'-&amp;gt;Properties-&amp;gt; Advance System Properties-&amp;gt;System properties-&amp;gt; Advanced Tab. There you can find the 'Environment Variables...' button. Just smash it!&lt;/p&gt;

&lt;p&gt;You will find &lt;code&gt;Path&lt;/code&gt; variable under the 'User variables' section. Edit it. In the variable value, copy-paste the path &lt;code&gt;T:\MyExe\SayMyName\SayMyName\bin\Debug;&lt;/code&gt; and click OK.&lt;/p&gt;

&lt;p&gt;That's it! There you go. You just made your application a global star on your computer. You can call it from anywhere now with just the name.&lt;/p&gt;

&lt;p&gt;Like this&lt;span&gt;  😎&lt;/span&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F26460677%2F101518660-39168c00-39a8-11eb-9ea4-d4994bde8b00.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F26460677%2F101518660-39168c00-39a8-11eb-9ea4-d4994bde8b00.gif" alt="outcome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is also a tutorial demonstrating the same and it is available &lt;a href="https://github.com/pradeepradyumna/saymyname/blob/main/Tutorial.mp4" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;span&gt; 👍&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;span&gt; 💛&lt;/span&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>tutorial</category>
      <category>csharp</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Machine Learning: Visual Introduction</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Thu, 03 Dec 2020 14:26:30 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/visual-introduction-to-ml-3n9p</link>
      <guid>https://forem.com/pradeepradyumna/visual-introduction-to-ml-3n9p</guid>
      <description>&lt;p&gt;While researching machine learning, I came across this cool article that has a visual representation for a beginner-level introduction to the concept. So, just wanted to share with the community here.&lt;/p&gt;
&lt;p&gt;😀&lt;/p&gt; Do check out this link &lt;a href="http://www.r2d3.us/visual-intro-to-machine-learning-part-1/"&gt;here&lt;/a&gt;

&lt;p&gt;Just wanted to appreciate the efforts of the team behind &lt;a href="http://www.r2d3.us/"&gt;http://www.r2d3.us/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>showdev</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Azure pipeline: Simple way to compile a Setup project (.vdproj) in pipeline</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Sat, 07 Nov 2020 08:56:20 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/azure-pipeline-simple-way-to-compile-a-setup-project-vdproj-in-pipeline-3o8p</link>
      <guid>https://forem.com/pradeepradyumna/azure-pipeline-simple-way-to-compile-a-setup-project-vdproj-in-pipeline-3o8p</guid>
      <description>&lt;p&gt;After my team decided to incorporate &lt;a href="https://azure.microsoft.com/en-in/services/devops/pipelines/"&gt;Azure Pipelines&lt;/a&gt; on existing projects, one of the most difficult parts of the task for me was to look for the right &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/tasks?view=azure-devops&amp;amp;tabs=yaml"&gt;pipeline task&lt;/a&gt; that would compile the &lt;a href="https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects"&gt;setup project (vdproj)&lt;/a&gt; present in my solution using a pipeline.&lt;/p&gt;

&lt;p&gt;After a lot of research and hours of testing, I found a way to achieve it.&lt;/p&gt;

&lt;p&gt;Just use a &lt;a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/command-line?view=azure-devops&amp;amp;tabs=yaml"&gt;command line task&lt;/a&gt; and use a script in the format shown below to compile the solution &lt;/p&gt;

&lt;p&gt;&lt;code&gt;"&amp;lt;full path to devenv.exe" "&amp;lt;full path to solution file (.sln)&amp;gt;" /Rebuild "&amp;lt;configuration&amp;gt;|&amp;lt;platform&amp;gt;"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Executing this task would compile all the projects present in the solution file, including setup projects. The outcome of setup projects like EXE and MSI files could be found in the configured the &lt;a href="https://docs.microsoft.com/en-us/visualstudio/ide/how-to-change-the-build-output-directory?view=vs-2019"&gt;output path&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have a requirement of compiling the solution as an administrator, then that's easy too. Just create a &lt;a href="https://stackoverflow.com/a/4132570/3978980"&gt;shortcut of devenv.exe as an admin&lt;/a&gt; in any desired location, and use that path in the command line given above.&lt;/p&gt;

&lt;p&gt;Let me know if it helped you!&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>pipeline</category>
      <category>setup</category>
    </item>
    <item>
      <title>Visual Studio IDE Shortcut keys: 5 cool handy tips to speed your programming</title>
      <dc:creator>Pradeep Pradyumna</dc:creator>
      <pubDate>Mon, 21 Sep 2020 16:00:51 +0000</pubDate>
      <link>https://forem.com/pradeepradyumna/visual-studio-shortcut-keys-5-cool-handy-tips-to-speed-your-programming-j8</link>
      <guid>https://forem.com/pradeepradyumna/visual-studio-shortcut-keys-5-cool-handy-tips-to-speed-your-programming-j8</guid>
      <description>&lt;p&gt;I have been coding in C# on Visual Studio for almost around 8 years and I have realized using some of the keyboard short keys while writing the code is just so fast than using a mouse and going around options to click. Using shortcut keys is not just cool but also increases productivity. And one more cool fact about these is you don't have to do anything in the settings to enable it. They are there already, configured by default when you install a fresh copy of Visual Studio (any version).  &lt;/p&gt;

&lt;p&gt;Keyboard shortcuts are my favorite and there just so many I love. But I'm going to list down the 5 shortcut keys that I use the most to increase my programming speed.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Power of DOUBLE-TAB
&lt;/h2&gt;

&lt;p&gt;If I want to write a class, a constructor, a for-loop, etc, I just type the keyword and &lt;strong&gt;hit TAB twice&lt;/strong&gt;. Tada! The snippet is generated. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2Fc3c8c00951528761aadae01c1838b1389a7ec131%2FKeyboardShortcut.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2Fc3c8c00951528761aadae01c1838b1389a7ec131%2FKeyboardShortcut.gif" alt="Snippet generator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Switch-Case: Case generator
&lt;/h2&gt;

&lt;p&gt;If I want to write a switch-case for all values present in a very tall enum (an enum with a huge list of entries), I just generate the switch-case template using my trick of Double-Tab, enter the enum name in the switch-on place and &lt;strong&gt;Click on the default keyword just once&lt;/strong&gt;. Tada!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2F3344d33575ddfad1cbe7ef149094731fd9deb723%2FSwitchCaseGenerator.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2F3344d33575ddfad1cbe7ef149094731fd9deb723%2FSwitchCaseGenerator.gif" alt="switch case generator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Commenting uncommenting game
&lt;/h2&gt;

&lt;p&gt;Often writing code, I would like to make tweaks while testing. And this requires commenting-uncommenting the lines. So, I just use&lt;br&gt;
&lt;strong&gt;Ctrl + K + C&lt;/strong&gt; for commenting and &lt;strong&gt;Ctrl + K + U&lt;/strong&gt; for uncommenting. It is so quick!  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2Fd87cf3d26bc1516e1f0dea2b16fcf77a89b28d81%2FCommentingUncommenting.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fgist.githubusercontent.com%2Fpradeepradyumna%2Ff6c85257fe5a071898f5df64c4abab80%2Fraw%2Fd87cf3d26bc1516e1f0dea2b16fcf77a89b28d81%2FCommentingUncommenting.gif" alt="Commenting uncommenting"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Code alignment
&lt;/h2&gt;

&lt;p&gt;Often writing code, it tricks me if my code is not aligned properly at all. It is difficult to identify which part belongs to other parts of the code. So, I just do &lt;strong&gt;Ctrl + K + D&lt;/strong&gt; after writing the code and it is aligned. And also, if you are generating code snippets using the double-tab method, most of the code will auto-aligned. So cool!&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Member references and definition
&lt;/h2&gt;

&lt;p&gt;If I'm working on a gigantic codebase with multiple project files in a solution and I want to see all the references of a particular member like Class, Method, Variable, or Properties, I just click on that member and do &lt;strong&gt;Shift + F12&lt;/strong&gt;. That's it! The reference window will be open.&lt;/p&gt;

&lt;p&gt;And, if I'm going through code and want to know the definition of a member like Class, Variable, or a Method, I just click on it and hit &lt;strong&gt;F12&lt;/strong&gt;. It takes me to the original place where it defined.&lt;/p&gt;

&lt;p&gt;These tricks are always so fun to use. I hope you find this article useful. If you know any cool shortcut that's cool, please let me know in comments.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>codenewbie</category>
      <category>showdev</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
