Back to Windows
Goal is to combine best of two worlds. Use Windows as your everyday OS while using Linux for scripting and development.
-
Install Windows (don’t add spaces to your Windows username or you might regret it later)
-
Install Windows subsystem for Linux. To do this open powershell as an administrator then copy and paste following command:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
-
Download distribution of choice from Windows store. Tutorial on how to install WSL and linux distro can be found here.
-
Install VSCode
-
Install WSL-Remote extension from extensions marketplace or accept suggestion from VSCode
When you open VSCode there will be green icon on the bottom left side of IDE. Click on it and choose Remote-WSL new window. That's all you have to do. You are writing your code on linux while running Windows. Open terminal inside IDE and you will see that it is a bash. There is also remote explorer on the sidebar that helps you quickly navigate between your projects on linux.
You are not limited to use this extension for WSL, you can connect and develop on any remote machine using SSH. Have a look at official docs.
GIF source: Microsoft
**Long version**5-6 years ago I have decided to drop Windows in favor of linux. Reason for that decision was simple. Couple of years before that change I started working with Node.js and suddenly realized that npm is slow, packages like bcrypt doesn’t work, I had urgent need to write some shell scripts and not to mention issues with cordova. At the end of 2014 - begining of 2015 I was involved in a project that had a fast pace. I couldn’t afford luxury to resolve system issues on my workstation while programming tasks are on hold. Just about that time I was preparing to leave last company that I worked for and start working for myself. On that old job due to company policy and tools that they were using I was still highly dependent on Windows but not for long. My home computer was already on Linux and I didn’t regret. Don’t get me wrong I like Windows and my highly biased opinion is that Windows is made for humans, Linux for professionals, while Mac is made for … I rather not say.
I always had symapthy for Linux and tried to keep the pace as much as I could with tutorials while running virutal machines. From time to time I had to install and configure Linux servers for my side projects. The more I worked on cloud (primarily on AWS) the more I had to improve my Linux skills until I finally end up running it as my first operating system.
When I realized that I need *nix operating system two solutions seemed natural. Either go with MacOS or pick the right Linux distribution. I had access to mac just enough to experiment. What I hated about Windows can be applied on mac but that is not subject of this post. Decision to go with Linux was somewhat influenced by a fact that I bought Dell XPS 15 9550 few months earlier which was not cheap at all. With i7 processor, 16GB RAM, 4K touch screen and 512GB SSD it was ok to pay something about 2200 EUR - give it or take. Running Linux on this beast was a great experience. I was moving fast, everything was configurable and compatible with my cloud work.
My biggest issue with Linux is poor support for multimedia. To use chromecast I had to use shell to make it work properly if it worked at all. If you haven't tried, Linux GUI (gnome) is quite nice. There are few more issues that can be solved with some alternatives. For example Windows has a wide range of software for db administration, much better than on Linux. However it is possible to find alternatives. Windows was not an option, so I had to settle with what I had. Obviously there are some tradeoffs that I had to make but I continued to work on Linux. For my legacy applications and occasional debug/test/update VM was sufficient. Perfect solution would be to combine best of both worlds, but it was impossible before. That being said, I am moving back to Windows again, so what changed?
Three major things!
1) Microsoft announced Windows Subsystem for Linux. I was really excited and even tweeted about it when it happened. I have a shell, I am able to run most of my tasks but development is still painful. In order to develop something and compile on Linux one would need to write code on Windows (no Linux GUI in WSL), then open bash, compile, deploy, then repeat process over and over again. This is simplified explanation but the feel is like running virtual machine with Linux distro. Not something that I was after. WSL was 50%, GUI was missing.2) Microsoft announced VSCode cross-platform IDE. It didn't take long for me to adopt it. I am still using it and not looking elsewhere at least for now. I have an IDE that works on both platforms, I have a Linux that runs nativly on Windows, so how to connect those two? Well...
3) Remote-WSL extension for VSCode!
Finally I can combine best of two worlds. I have a big expectations. My multimedia works as expected, favorite programs are there, and the most important thing is that I am actually using Linux for development without running virutal machines or switching computers, dual boot, nothing like that. I don't know, perhaps I will regret this decision and move back to Linux again. Let's wait and see. Mac is sitting under the table and it will remain there as usual. I am using it when I have to deploy app on iOS or test something on MacOS. Mac is still not an option as my primary platform for anything.