<?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: Himujjal Upadhyaya</title>
    <description>The latest articles on DEV Community by Himujjal Upadhyaya (@himujjal).</description>
    <link>https://dev.to/himujjal</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%2F135064%2Fb4f3b1b8-4c83-465e-812e-911dd4f5dfe5.jpeg</url>
      <title>DEV Community: Himujjal Upadhyaya</title>
      <link>https://dev.to/himujjal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himujjal"/>
    <language>en</language>
    <item>
      <title>Setting up Windows for development</title>
      <dc:creator>Himujjal Upadhyaya</dc:creator>
      <pubDate>Mon, 06 Jul 2020 14:40:49 +0000</pubDate>
      <link>https://dev.to/himujjal/setting-up-windows-for-development-1628</link>
      <guid>https://dev.to/himujjal/setting-up-windows-for-development-1628</guid>
      <description>&lt;h1&gt;
  
  
  Contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Notes before you start&lt;/li&gt;
&lt;li&gt;Make your Windows fast&lt;/li&gt;
&lt;li&gt;Enable developer mode&lt;/li&gt;
&lt;li&gt;Install chocolatey&lt;/li&gt;
&lt;li&gt;Install Git and other basic softwares&lt;/li&gt;
&lt;li&gt;Setting up Windows Terminal for development&lt;/li&gt;
&lt;li&gt;Install Windows Subsystem for Linux (WSL)&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;After a smooth upgrade to Windows 10 2004 May 2020 edition, I can finally conclude that this is all a developer needs. A Windows environment for writing programs in Windows and a Linux kernel to write programs in Ubuntu (which can also be almost shipped to MAC-OS X).&lt;/p&gt;

&lt;p&gt;Finally this makes Windows the best developer platform. But, this setup doesn't come by default. Not all Windows users are developers after all (well, most of them are not). Therefore, this post will serve as a go-to guide for all the developers out there to setup the perfect Windows development environment for all kinds of development.&lt;/p&gt;

&lt;h1&gt;
  
  
  Notes before you start
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;If you don't have Windows this guide is not for you.&lt;/li&gt;
&lt;li&gt;You might need a good internet connection. You might spend around 3-4 GB of data during this process. But its a one time thing, so don't worry.&lt;/li&gt;
&lt;li&gt;This is a highly opinionated guide. Comments are welcome.&lt;/li&gt;
&lt;li&gt;This guide will be for fresh installation of Windows. But you can still follow the guide even if you have various tools installed.&lt;/li&gt;
&lt;li&gt;If you have a pirated copy of Windows. Well. Activate it. Its important! :P&lt;/li&gt;
&lt;li&gt;This article will keep on getting updated with time. So, its not constant. This is a reference guide kind of article for users who need to make Windows suitable for developers.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Make your Windows fast.
&lt;/h1&gt;

&lt;p&gt;This is a highly opinionated section. I am not a pretty big fan of the GUI and stuffs. I like to keep it minimal so as to make Windows run faster. Windows is indeed a heavy operating system. This helps me not worry about performance while working (which I do most of the time.). Let's see how we can make our Windows fast.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Uninstall all the anti-virus softwares and enable Windows defender.&lt;/strong&gt; I won't go in very details into this topic. As a developer you can be in peace with Windows Defender which is just fantastic. For more information on how to do it, checkout: &lt;a href="https://www.techadvisor.co.uk/feature/windows/do-you-need-antivirus-3668819/"&gt;TechAdvisor - Do you need an antivirus?&lt;/a&gt;&lt;br&gt;
&lt;a href="https://howtoway.com/enable-windows-defender-windows-10/"&gt;Enable Windows Defender Windows 10&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Disable startup programs&lt;/em&gt;. You can disable all the startup programs using the Task Manager:&lt;br&gt;
a. Simply press: &lt;code&gt;Ctrl+Shift+Esc&lt;/code&gt;. It opens up the Task Manager.&lt;br&gt;
b. Then open &lt;code&gt;Startup&lt;/code&gt; tab.&lt;br&gt;
c. Disable everything. I have disabled all the third-party updaters and everything. Docker, Slack, Adobe, OneDrive, GDrive, Sound and Graphics Driver utilities, etc. Disable them all. Start them manually only when you need it. Don't worry. It won't do any harm to your PC. I have done it and I am at peace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Disable special effects and themes&lt;/em&gt;: This is optional as people like to have a sexy looking animation and themes on Windows. I actually prefer to have a simple one. Let's see how we can do it.&lt;br&gt;
a. Press &lt;code&gt;Win + I&lt;/code&gt;. (Open Windows settings)&lt;br&gt;
b. Go to &lt;code&gt;Personalization&lt;/code&gt; and then select &lt;code&gt;Colors&lt;/code&gt;.&lt;br&gt;
c. Disable &lt;code&gt;Make Start, taskbar and action center transparent&lt;/code&gt; in old versions of Windows 10. In the latest version, deselect the options under &lt;code&gt;Show accent color...&lt;/code&gt;&lt;br&gt;
d. Close the settings window.&lt;br&gt;
e. Right click on the &lt;strong&gt;Start menu&lt;/strong&gt; and select *Advanced System settings&lt;code&gt;. In&lt;/code&gt;Visual Effects&lt;code&gt;tab, select&lt;/code&gt;Adjust for best performance&lt;code&gt;. That's it. Animations will be off but performance gets a slight boost.&lt;br&gt;
f. Now, open settings again. (&lt;/code&gt;Win + I` key).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Lower your resolution.&lt;/em&gt;. This is optional but a guaranteed hack to make your PC fast. So, if you are ready to sacrifice a tad-bit of resolution for faster workflow. Do it.&lt;br&gt;
a. Go to &lt;code&gt;System&lt;/code&gt; option and then &lt;code&gt;Display&lt;/code&gt;.&lt;br&gt;
b. Scroll down to display resolution. change it to &lt;code&gt;1366 x 768&lt;/code&gt; or nearby. &lt;code&gt;1980x1080&lt;/code&gt; will make your laptop slower if your resolution is high.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Still if you are facing issues refer to this link: &lt;a href="https://www.cnet.com/how-to/easy-ways-to-speed-up-windows-10/"&gt;CNET - Speed up windows 10&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Enable developer mode:
&lt;/h1&gt;

&lt;p&gt;Performance tuning is over. Now, we have to enable Developer mode to run a few applications meant for developers like Windows Subsystem for Linux. Follow the instructions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Win + I&lt;/code&gt; to open Windows settings.&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;Update &amp;amp; Security&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Go to &lt;code&gt;For Developers&lt;/code&gt; section on the left menu bar.&lt;/li&gt;
&lt;li&gt;Select &lt;code&gt;Developer mode&lt;/code&gt;. Wait for sometime. This might take a while. After the loading finishes. Move on to the next step.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Install Chocolatey
&lt;/h1&gt;

&lt;p&gt;Chocolatey is a simple package manager for Windows that helps install necessary software on a Windows machine. For installing Chocolatey:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start menu&lt;/li&gt;
&lt;li&gt;Find &lt;code&gt;powershell&lt;/code&gt;. Right click on it. And &lt;code&gt;more &amp;gt; Run As Administrator&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;yes&lt;/code&gt; on prompt.&lt;/li&gt;
&lt;li&gt;Type in the following:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
This will download Chocolatey and install it&lt;/li&gt;
&lt;li&gt;Test the installation:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;choco --version&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install &lt;em&gt;gsudo&lt;/em&gt;. (gsudo acts like &lt;code&gt;sudo&lt;/code&gt; command for linux i.e. it gives admin privilege to your commands)
&lt;code&gt;&lt;/code&gt;&lt;code&gt;choco install gsudo&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;From now on we will extensively use chocolatey and gsudo.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Install Git and other basic softwares
&lt;/h1&gt;

&lt;p&gt;We will now install a lot of softwares required for development:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First we need to install chocolatey as in the last step.&lt;/li&gt;
&lt;li&gt;Then simply paste the following code:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;gsudo choco install git visualstudio2019buildtools microsoft-windows-terminal vscode notepadplusplus.install&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;This might take time depending on your PC and internet connection. This is most of the software you will require.&lt;/li&gt;
&lt;li&gt;Once it's done. You will have the following softwares on your platform:&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Git&lt;/em&gt;: Version control. Probably you will use git more than ever.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Visual Studio Build Tools 2019&lt;/em&gt;: Build tools for running native applications. If you are a python/nodejs user, you might feel this is necessary. In fact. you will realize its necessity one day or the other.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Python&lt;/em&gt;: Many tools/build-scripts are written with Python. Even if you will never code in Python in your life, this will still be of use somewhere or the other.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Microsoft Windows Terminal&lt;/em&gt;: The best terminal in the world!&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;VSCode&lt;/em&gt;: This is an opinionated choice, but well! Its awesome to it core.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Notepad++&lt;/em&gt;: This acts like a perfect replacement for Notepad plus lots of features. Its super fast too! It lies somewhere in between the heavy VSCode and Notepad.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Setting up Windows Terminal for development
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Open powershell and type in:
&lt;code&gt;&lt;/code&gt;&lt;code&gt;cd $USERPROFILE
git clone https://github.com/kerol2r20/Windows-terminal-context-menu
cd Windows-terminal-context-menu
gsudo .\SetupContextMenu.ps1&lt;/code&gt;&lt;code&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;You have the Windows Terminal installed in your context menu. Right click on any file or empty folder space in Windows Explorer.&lt;/li&gt;
&lt;li&gt;Next open Windows Terminal and click on the downward facing caret icon on top and then select settings.&lt;/li&gt;
&lt;li&gt;Copy and paste all the contents of this &lt;a href="https://gist.githubusercontent.com/Himujjal/5bcab21bc33de5d879ad22383924f5c3/raw/ffcb3d82824951a0f8be909ba903488b0c95bf53/settings.json"&gt;Github Gist&lt;/a&gt; in the &lt;code&gt;settings.json&lt;/code&gt; file that opens up in Notepad or VS code.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Install Windows Subsystem for Linux (WSL)
&lt;/h1&gt;

&lt;p&gt;This is the whole freaking Linux on your Windows. Yes. You heard it right.&lt;/p&gt;

&lt;p&gt;WSL 1.0 is more of an simulated environment for Linux running on Windows NT kernel. But WSL 2.0 ships with a full Linux kernel!&lt;/p&gt;

&lt;p&gt;We are going to install WSL 2.0. Let's get started.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Update Windows to 2004 edition.&lt;br&gt;
a. Yes! For WSL 2.0, you need to update Windows 10 v2004 May 2020 edition. For manual update, download the updater &lt;a href="https://www.microsoft.com/en-us/software-download/windows10"&gt;Windows May 2020 Update&lt;/a&gt; And follow the screen instructions.&lt;br&gt;
b. Update done? Restart your Windows and come back to this dev post.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enable Hyper-V&lt;br&gt;
a. You computer also needs to support Hyper-V Virtualization to run WSL 2.&lt;br&gt;
b. To enable Hyper-V, open Powershell and type in:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;gsudo Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
d. Restart your PC after the last command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install WSL:&lt;br&gt;
There are two ways to intall WSL in Windows. First is through the Windows store. Windows Store is a bit tedious and really bad. Although it works fine for me. Anyways, we are going to install &lt;code&gt;WSL&lt;/code&gt; without Windows Store.&lt;br&gt;
a. Go to &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install-manual"&gt;WSL install manual&lt;/a&gt;.&lt;br&gt;
b. Download the distro of your choice from the links. We are going with &lt;a href="https://aka.ms/wslubuntu2004"&gt;Ubuntu 20.04&lt;/a&gt;.&lt;br&gt;
c. An &lt;strong&gt;.appx&lt;/strong&gt; will be downloaded. &lt;br&gt;
d. In the folder where the distro is downloaded, simply open up terminal as we have done in the previous section.&lt;br&gt;
e. Now put in the following code:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;Add-AppxPackage .\&amp;lt;your_download_distro_name&amp;gt;.appx&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
In my case the name of the distro is &lt;code&gt;Ubuntu_2004.2020.424.0_x64.appx&lt;/code&gt;&lt;br&gt;
f. Now once your installation is done, in the same terminal put:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
g. Restart your machine.&lt;br&gt;
h. Now open terminal (wherever you like) and type:&lt;br&gt;
&lt;code&gt;&lt;/code&gt;&lt;code&gt;wsl --set-default-version 2&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
That's it! From start menu open up Ubuntu.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There will be more to come. But I am hoping this will keep you from being a happy developer for now!&lt;/p&gt;

&lt;p&gt;Follow me on Github: &lt;a href="https://github.com/Himujjal"&gt;@Himujjal&lt;/a&gt;&lt;br&gt;
Follow me on Twitter: &lt;a href="https://twitter.com/HimujjalU"&gt;@HimujjalU&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking forward to reactions in the comments section.&lt;/p&gt;

</description>
      <category>windowsterminal</category>
      <category>windows</category>
      <category>development</category>
      <category>environment</category>
    </item>
    <item>
      <title>Preparing for Coding Interview using InterviewBit with C++ (DAY - 1) (STL lessons)</title>
      <dc:creator>Himujjal Upadhyaya</dc:creator>
      <pubDate>Thu, 07 Nov 2019 15:30:05 +0000</pubDate>
      <link>https://dev.to/himujjal/preparing-for-coding-interview-using-interviewbit-with-c-day-1-stl-lessons-21o7</link>
      <guid>https://dev.to/himujjal/preparing-for-coding-interview-using-interviewbit-with-c-day-1-stl-lessons-21o7</guid>
      <description>&lt;p&gt;Today's topic: STL&lt;br&gt;
Repo: &lt;a href="https://github.com/Himujjal/interviewbit"&gt;https://github.com/Himujjal/interviewbit&lt;/a&gt;&lt;br&gt;
YouTube Link: &lt;a href="https://www.youtube.com/playlist?list=PL_dsdStdDXbq8BTjGdUEWgWYFWYP6pwYb"&gt;CodesBay STL&lt;/a&gt;&lt;br&gt;
Pre-requisites: Basic Knowledge of C++&lt;/p&gt;

&lt;p&gt;Coding interviews are boring it seems. Specially for developers like me who love to create instead of solving puzzles.&lt;/p&gt;

&lt;p&gt;To grow as a developer algorithms and data structures seem to be an important part of the journey plus the benefits of the better jobs it provides thanks to the poor judgement of candidates by HRs and Tech Companies.&lt;/p&gt;

&lt;p&gt;I started this journey today using a primer of STL using this fantastic short tutorial by CodeBay from YouTube (&lt;a href="https://www.youtube.com/playlist?list=PL_dsdStdDXbq8BTjGdUEWgWYFWYP6pwYb"&gt;CodesBay STL&lt;/a&gt;). Go check it out.&lt;/p&gt;

&lt;p&gt;Today I did my lessons for around 3 hours. The topics which I covered are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Vectors, List and Algorithm&lt;/li&gt;
&lt;li&gt;Map, Multimaps&lt;/li&gt;
&lt;li&gt;Erase, Remove&lt;/li&gt;
&lt;li&gt;Sets, Multisets&lt;/li&gt;
&lt;li&gt;Comparators&lt;/li&gt;
&lt;li&gt;Queues, Stacks &amp;amp; Priority Queues.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find the code for today's lesson on &lt;a href="https://github.com/Himujjal/interviewbit/tree/master/00_stl"&gt;00 - STL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do check it out. Its fairly simple.&lt;/p&gt;

&lt;p&gt;P.S. To run the exercises, install NodeJS and MinGW (for windows). Then install &lt;strong&gt;Nodemon&lt;/strong&gt; using &lt;code&gt;npm i -g nodemon&lt;/code&gt;. In the folder that contains &lt;code&gt;nodemon.json&lt;/code&gt;, simply run &lt;code&gt;nodemon&lt;/code&gt;. This will make your code run in a &lt;strong&gt;watch&lt;/strong&gt; mode. Which means your code generates itself automatically once you save.&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>codinginterview</category>
      <category>interviewbit</category>
      <category>stl</category>
    </item>
  </channel>
</rss>
