<?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: Idrees Khan</title>
    <description>The latest articles on DEV Community by Idrees Khan (@dotnetdreamer).</description>
    <link>https://dev.to/dotnetdreamer</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%2F287796%2F4865a421-ee6a-44ab-bdce-fdaf9a41e405.png</url>
      <title>DEV Community: Idrees Khan</title>
      <link>https://dev.to/dotnetdreamer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dotnetdreamer"/>
    <language>en</language>
    <item>
      <title>Simple Rules to Master 'this' Context</title>
      <dc:creator>Idrees Khan</dc:creator>
      <pubDate>Fri, 29 May 2020 10:50:23 +0000</pubDate>
      <link>https://dev.to/dotnetdreamer/simple-rules-to-master-this-context-4jig</link>
      <guid>https://dev.to/dotnetdreamer/simple-rules-to-master-this-context-4jig</guid>
      <description>&lt;p&gt;When I was learning JS for the first time, the first difficult thing to grasp was &lt;strong&gt;this&lt;/strong&gt;. Yes! you won't believe it but that is what I felt. &lt;br&gt;
So in this article I will do my best to explain 3 basic rules that I learned at that time which will make you master the &lt;code&gt;this&lt;/code&gt; context in browser environment.&lt;br&gt;
A quick side note before we proceed, many issues of &lt;strong&gt;this&lt;/strong&gt; context are actually solved in ES6+ standard and so I will be using ES5 to demonstrate it.&lt;br&gt;
Consider following example and guess What's &lt;code&gt;this&lt;/code&gt; pointing too?&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxrrr3qspxwdrskq98xxr.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxrrr3qspxwdrskq98xxr.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well to &lt;code&gt;car&lt;/code&gt;. If you have guessed it right then you are at a good place. Let me change this abit and guess what is &lt;code&gt;this&lt;/code&gt; pointing to?&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9clj1celmky1cv2j2kvz.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9clj1celmky1cv2j2kvz.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well to &lt;strong&gt;Window&lt;/strong&gt; object. Yes! you heared it right. You didn't expect it to see but trust me it does! &lt;br&gt;
Now consider following example and guess what is &lt;code&gt;this&lt;/code&gt; pointing to?&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feew47ckhfuf5qd3uwv6t.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feew47ckhfuf5qd3uwv6t.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case it will point to 'c' object. Now if I change this abit more guess what it is pointing to?&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyoz9uulqpnb2brg4zn3h.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyoz9uulqpnb2brg4zn3h.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is pointing to &lt;strong&gt;Window&lt;/strong&gt; object! Isn't this weird? it is, specially if you have came to JS from other languages such as C#. &lt;br&gt;
This is getting boring let me break it down into following rules.&lt;/p&gt;

&lt;h1&gt;
  
  
  Rule of Thumb for &lt;code&gt;this&lt;/code&gt;
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dot call operator&lt;/strong&gt;: If you see a dot call operator e.g &lt;code&gt;car.beepBeep()&lt;/code&gt;, &lt;code&gt;this&lt;/code&gt; will be pointing to whatever is in the left side of '.' operator&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;new&lt;/code&gt; keyword&lt;/strong&gt;: If you are invoking a function with constructor e.g &lt;code&gt;var c = new Car("Some Car!")&lt;/code&gt; then the context within your constructor will be i.e c (in our case)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;call&lt;/code&gt; or &lt;code&gt;apply&lt;/code&gt;&lt;/strong&gt;: Finally if you are using &lt;code&gt;call()&lt;/code&gt; or &lt;code&gt;apply()&lt;/code&gt; function then the context will be whatever you pass in first argument e.g &lt;code&gt;car.beeBeep.call(otherCar)&lt;/code&gt;. In this case the context will be &lt;strong&gt;otherCar&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;In JS functions don't know where they live, they only know how they are called. So if none of the above rules apply then &lt;code&gt;this&lt;/code&gt; will be pointing to &lt;strong&gt;global&lt;/strong&gt; or &lt;strong&gt;window&lt;/strong&gt; object&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Access VS Code from your phone browser...</title>
      <dc:creator>Idrees Khan</dc:creator>
      <pubDate>Fri, 22 May 2020 11:58:26 +0000</pubDate>
      <link>https://dev.to/dotnetdreamer/access-vs-code-from-your-phone-browser-1ok9</link>
      <guid>https://dev.to/dotnetdreamer/access-vs-code-from-your-phone-browser-1ok9</guid>
      <description>&lt;p&gt;So in my &lt;a href="https://dev.to/dotnetdreamer/using-android-phone-as-a-development-machine-3f39"&gt;last post&lt;/a&gt; I explained how to use your phone as a development machine. But this time I want to show you, how you can access your code from your phone browser.&lt;/p&gt;

&lt;h1&gt;
  
  
  How it works ?
&lt;/h1&gt;

&lt;p&gt;Basically you will host your PC (probably at office or another home device) and then access it from home via &lt;strong&gt;phone or any other&lt;/strong&gt; device. For this you will need a PC (where you should have already installed VS Code) and a Microsoft account. First you will need to install &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack" rel="noopener noreferrer"&gt;Remote Development Extension&lt;/a&gt; published by Microsoft. &lt;/p&gt;

&lt;p&gt;After installation, open a project that you want to access and go to &lt;strong&gt;Remote Explorer&lt;/strong&gt; and Double click on &lt;strong&gt;Register self-hosted Codespace&lt;/strong&gt; (as shown in below image), select subscription, resource group, region, a plan and finally name this Codespace. Don't worry its free 😜 as mentioned &lt;a href="https://docs.microsoft.com/en-gb/visualstudio/online/overview/what-is-vsonline" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1uac8vfj87bpcqv6yc0i.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1uac8vfj87bpcqv6yc0i.gif" alt="Steps to create region"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After downloading some dependencies (in my case) and setups at Microsoft cloud, you should see your Codespace as shown below 😉:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0i0bv6ujwtrqmmty72a.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0i0bv6ujwtrqmmty72a.png" alt="Codespace"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Connect it!
&lt;/h1&gt;

&lt;p&gt;Perfect, all you need to do now is to grab your phone and plug it to a monitor with keyboard and mouse and go to &lt;a href="https://online.visualstudio.com/environments" rel="noopener noreferrer"&gt;https://online.visualstudio.com/environments&lt;/a&gt;. There you will see the Codespace that you named it in previous steps (in my case ik-surface-pro). Click on those dots and select &lt;strong&gt;Connect&lt;/strong&gt;. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff1yqqhfyc40o46wo2fhm.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff1yqqhfyc40o46wo2fhm.png" alt="Connect"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thats it 😍, after a while you have now access to your code from a browser, which means from anywhere! 😉&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F59vpujqmhl92int5vgu3.png" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F59vpujqmhl92int5vgu3.png" alt="VS Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Gotchas
&lt;/h1&gt;

&lt;p&gt;While this all sounds cool but please note that the experience isn't perfect but it is nearly perfect. Also in mobile (specially in Android) as you touch VS Code, the screen will be zoomed in. For that I used &lt;a href="https://play.google.com/store/apps/details?id=org.mozilla.focus" rel="noopener noreferrer"&gt;Firefox Focus browser&lt;/a&gt;. You might need to try different browsers and see which one works best.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Useful LSTM network example using brain.js</title>
      <dc:creator>Idrees Khan</dc:creator>
      <pubDate>Tue, 12 May 2020 13:26:59 +0000</pubDate>
      <link>https://dev.to/dotnetdreamer/useful-lstm-network-example-using-brain-js-4ohl</link>
      <guid>https://dev.to/dotnetdreamer/useful-lstm-network-example-using-brain-js-4ohl</guid>
      <description>&lt;h2&gt;
  
  
  Problem
&lt;/h2&gt;

&lt;p&gt;They say every problem has a solution (not necessarily). I am using an app called &lt;a href="https://play.google.com/store/apps/details?id=com.Splitwise.SplitwiseMobile" rel="noopener noreferrer"&gt;Splitwise&lt;/a&gt;. There, as you try to type description while adding an expense (check the screenshot no 3 on PlayStore), it will automatically select a category for you. I was thinking if I can do same (without writing complex code) through any &lt;strong&gt;JavaScript&lt;/strong&gt; machine learning library. And guess what? i checked out &lt;a href="https://brain.js.org/" rel="noopener noreferrer"&gt;brain.js&lt;/a&gt;.&lt;/p&gt;

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

&lt;p&gt;Fortunately the library does solve this kind of problem very easily and that is through common machine learning model called &lt;strong&gt;RNN&lt;/strong&gt; (Recurrent Neural Networks). One of the special kind of RNN network (for above use-case I used) is &lt;strong&gt;LSTM&lt;/strong&gt; (Long Short Term Memory) network. A tremendous explanation is done in &lt;a href="https://colah.github.io/posts/2015-08-Understanding-LSTMs/" rel="noopener noreferrer"&gt;this&lt;/a&gt; article which helped me a lot too.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Data
&lt;/h2&gt;

&lt;p&gt;You can find a working example in &lt;a href="https://github.com/dotnetdreamer/dev_to_lstm" rel="noopener noreferrer"&gt;this&lt;/a&gt; repo. So first we will need to build a model and for model we need data. You could use data from your existing database or from any other source. But you definitely need some sort of data. For this demonstration, I have added static data in JSON &lt;a href="https://github.com/dotnetdreamer/dev_to_lstm/blob/master/_data/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Please note that I have not organized the data on purpose as in real world, you will not always have an organized data. A sample 1 record is shown below.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb7tlaz2phcp6rktyhjv9.PNG" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb7tlaz2phcp6rktyhjv9.PNG" alt="Expense sample data record"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enough! Show me the demo
&lt;/h2&gt;

&lt;p&gt;First, we need to install brain.js by simply running following command.&lt;br&gt;
&lt;code&gt;$ npm i brain.js --save&lt;/code&gt;&lt;br&gt;
Next we need to prepare a training set from our data. A training set (in our case) should have an input and output properties. The input I will be passing is the description property of our data and the output property I will be passing the category property. In simple words I want to training my model on existing description which has appropriate selected category. The final code looks like below:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvoqu0ykjjfk39n38b6m0.PNG" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvoqu0ykjjfk39n38b6m0.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Training
&lt;/h3&gt;

&lt;p&gt;Now that I have the data set or training data, its time to build our model. We can do that in &lt;code&gt;brain.js&lt;/code&gt; by creating an instance of &lt;code&gt;LSTM&lt;/code&gt; network and call &lt;code&gt;train()&lt;/code&gt; method. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhck4liuhot6v8hf619ce.PNG" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhck4liuhot6v8hf619ce.PNG" alt="brain.js train()"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;train()&lt;/code&gt; method accepts the 2 parameters i.e data and optional config. The config object has several useful properties which you will need to play with as it depends on your data. You might need to specially play with &lt;code&gt;iterations&lt;/code&gt; and &lt;code&gt;errorThresh&lt;/code&gt;. Full config object can be found &lt;a href="https://github.com/BrainJS/brain.js/blob/master/README.md" rel="noopener noreferrer"&gt;here&lt;/a&gt;. If you still want to know more on &lt;code&gt;errorThresh&lt;/code&gt; and &lt;code&gt;iterations&lt;/code&gt; properties then checkout &lt;a href="https://stackoverflow.com/a/27596780/859968" rel="noopener noreferrer"&gt;this&lt;/a&gt; awesome answer on StackOverflow. &lt;/p&gt;

&lt;p&gt;Finally as I don't want any delay while utilizing this model, I will export it using brain.js helper method i.e &lt;code&gt;network.toJSON()&lt;/code&gt;. All we need to do now is to save it somewhere and do our predictions. I will run now the demo project using &lt;code&gt;http://localhost:3000/app/build&lt;/code&gt; and let it generate the &lt;code&gt;.json&lt;/code&gt; file. You will have to be patience as it will take time to build the model. Its a good idea to decrease the iterations if you want to see results soon. &lt;/p&gt;

&lt;h3&gt;
  
  
  Prediction
&lt;/h3&gt;

&lt;p&gt;Now that our model is ready, we can simply use this &lt;code&gt;.json&lt;/code&gt; file in our client project i.e mobile/web app. For this demo, i will simply use it in api. &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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6skklh4zjfwvlgznq4jo.PNG" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6skklh4zjfwvlgznq4jo.PNG" alt="Prediction"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple create here an instance of &lt;code&gt;LSTM&lt;/code&gt; network and call &lt;code&gt;fromJSON()&lt;/code&gt; method. This will make sure you build the model once and re-use it everywhere you want. &lt;br&gt;
&lt;code&gt;network.run&amp;lt;string&amp;gt;(description)&lt;/code&gt; wil return the predictions that we are expecting. Its time to test it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Testing
&lt;/h3&gt;

&lt;p&gt;Head over to browser in Demo project and type &lt;code&gt;http://localhost:3000/app/predict?description=grocery&lt;/code&gt; and you will get following:&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx0yugs2bxx4dfapkhsnn.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx0yugs2bxx4dfapkhsnn.gif" alt="Prediction Demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Although brain.js is making everything easy for us, but it is still good to know the basics of what you algorithm you need to use for a particular problem. Also be aware that brain.js is still in alpha. The example i have provided might not work in the future. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>machinelearning</category>
      <category>node</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Using Android phone as a development machine</title>
      <dc:creator>Idrees Khan</dc:creator>
      <pubDate>Tue, 05 May 2020 11:42:33 +0000</pubDate>
      <link>https://dev.to/dotnetdreamer/using-android-phone-as-a-development-machine-3f39</link>
      <guid>https://dev.to/dotnetdreamer/using-android-phone-as-a-development-machine-3f39</guid>
      <description>&lt;p&gt;So recently I was wondering if I could use my phone as a development machine. So I give it a try and I am sharing my experience below. If you are using any Desktop mode supported devices then thats more better e.g Samsung DeX, Huawei Desktop mode.&lt;br&gt;
You can go to PlayStore and find many applications that lets you install Linux without root however, I personally found two to be more easy to use i.e &lt;a href="https://play.google.com/store/apps/details?id=tech.ula"&gt;UserLand&lt;/a&gt; and &lt;a href="https://play.google.com/store/apps/details?id=studio.com.techriz.andronix"&gt;AndroNix&lt;/a&gt;. But I choosed AndroNix due to their &lt;a href="https://andronix.app/modded-os/"&gt;ModdedOS&lt;/a&gt; option which comes with pre-installed &lt;strong&gt;VS Code&lt;/strong&gt; and other useful tools.&lt;br&gt;
Once i downloaded the application, I purchased the Ubuntu XFCE environment (there are free options as well). They have plenty of options/videos on how to install this, its pretty straight forward.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cJGbxVal--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2hxvqb15q7ww7jjgmbln.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cJGbxVal--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2hxvqb15q7ww7jjgmbln.PNG" alt="AndronNix Modded OS"&gt;&lt;/a&gt;&lt;br&gt;
And here modded OS options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1TbBU5ZM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/22944j4i5b2xld3y6hbx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1TbBU5ZM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/22944j4i5b2xld3y6hbx.PNG" alt="All Modded OS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installation (please follow their instructions. It is clear enough), I connected Bluetooth mouse and keyboard to my Galaxy S20 Ultra and went to Samsung DeX mode. Then I opened the &lt;a href="https://play.google.com/store/apps/details?id=com.termux"&gt;Termux&lt;/a&gt; (if already closed) and ran the &lt;code&gt;./start-andronix.sh&lt;/code&gt;. You can learn more by checking their &lt;a href="https://andronix.app/faq-frequently-asked-questions/"&gt;FAQ&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RAwFIg5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ndr7jge0zffy4puf028j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RAwFIg5C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ndr7jge0zffy4puf028j.PNG" alt="Termux command"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I just ran the &lt;code&gt;vncserver&lt;/code&gt; command and it was up and running. Do not forget to note the port i.e in my case &lt;code&gt;:1&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YScL5hhC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/84p3wnvyqpo688l8901n.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YScL5hhC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/84p3wnvyqpo688l8901n.PNG" alt="VNC Server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, I downloaded &lt;a href="https://play.google.com/store/apps/details?id=com.realvnc.viewer.android"&gt;VNC Viewer&lt;/a&gt; and entered the &lt;code&gt;localhost:1&lt;/code&gt; in address (as shown below) and thats it. I was then able to connect my running Linux environment😍. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--09lqoaj8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bw54tqciin6za7ndo9l0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--09lqoaj8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bw54tqciin6za7ndo9l0.PNG" alt="VNC Viewer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next I downloaded Node.js by following &lt;a href="https://www.linuxuprising.com/2018/04/how-to-install-and-configure-nodejs-and.html"&gt;this&lt;/a&gt; blog using following command. I am adding commands below for reference.&lt;br&gt;
&lt;code&gt;curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -&lt;/code&gt;&lt;br&gt;
&lt;code&gt;sudo apt install nodejs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eUm9QHKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8hdpqrnfwxrajsw6ehxd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eUm9QHKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8hdpqrnfwxrajsw6ehxd.PNG" alt="Node.js Installation"&gt;&lt;/a&gt;&lt;br&gt;
Now that I had Node.js, I installed Ionic, Angular and other required tools that I needed. Then ran my project in Ionic successfully. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VSuWlji_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jpuyl0kyty6rk63s1rx1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VSuWlji_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/jpuyl0kyty6rk63s1rx1.PNG" alt="VS Code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;I was really surprised about this as this was my first experience after Samsung stopped Linux on DeX (LoD) support on Android 10. Its really great alternative to LoD and I can clearly see many use cases of this e.g in case when traveling or unreachable to your PC. If you wanna add more addition to this then definitely checkout &lt;a href="http://nexdock.com/"&gt;NexDock 2&lt;/a&gt;.&lt;br&gt;
Let me know if this setup sounds useful to you. Be kind as this is my first post 😁.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>linux</category>
      <category>android</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
