DEV Community

Cover image for The State of Developing on Windows 2019: Impressive!
Vinicius Brasil
Vinicius Brasil

Posted on

The State of Developing on Windows 2019: Impressive!

For many years Windows has been considered "bad for programming" if you don't develop in a Microsoft stack, like .NET. The main alternatives are Linux and macOS. The thing is not every developer can adapt easily to Linux, or can afford a Mac. Sometimes you just want all your software to run without a dual boot, VMs or compatibility layers (like Wine for Linux). And that's where Windows enters in.

Windows has lots of hardware drives that can be easily found, has countless software made for it, and of course, games. But still, some say it is really bad to develop on Windows for a couple of reasons:

  • There is no reliable package manager (like APT or Homebrew), which makes harder to install your programming language of choice, for instance.

  • The native command line shell is not as good as the good old Unix shell.

To maintain the best of both worlds - Unix and Windows - people usually use Windows with a Linux VM, which can cost lots of CPU and memory. How to keep the best of both worlds without virtual machines or dual boot?

The solution: Windows Subsystem for Linux (WSL)

The Windows Subsystem for Linux is a compatibility layer for running Linux binaries natively on Windows. In other words, you can run Linux distributions on Windows without virtual machines or dual boot. That means you can easily install packages (such as rbenv, node, git), run a web server inside WSL and still write code in your Windows environment with your code editor.

This Windows 10 feature is still evolving, and being improved each update. Of course, it doesn't replace a full Linux setup, but it fulfills most of the developers need.

I've been mainly using Windows Subsystem for Linux (WSL) Debian distribution to develop Ruby on Rails and NodeJS applications. I code on Visual Studio Code inside Windows and run the server on WSL. If I wanted to, I could even run my editor inside the Linux environment.

WSL Isn't Perfect (Yet)

Even though WSL is good, it is not perfect yet. There are some performance issues, especially with I/O. To solve these problems, you'll probably have to spend some time searching and tweaking settings for your use. Once you have configured your environment, you should have a smooth, convenient and stable hybrid (Windows + Linux) development environment.

As I mentioned before, WSL is getting better and better each Windows update, and I/O has been being a major WSL concern, shown by the last patches.

Windows Isn't Bad Anymore

Yes, Windows was bad for programming before. But that is definitely false in 2019. Microsoft has been making up the lost ground for non-Windows developers.


If you want to give WSL a try, follow this Microsoft guide. It should be up and running in a couple of minutes. To obtain the maximum performance, disable Windows Defender while using it.


Don't forget to follow me on Twitter and check out my other posts.

Top comments (20)

Collapse
 
martinalexander profile image
Martin-Alexander • Edited

I was blown away by WSL -- really the best of both worlds.

But developing on Linux or Mac is still a much better experience -- things "just work" at a much higher rate. Way less config/compatibility issues.

AFAIK Docker still doesn't play nice with WSL.

Running your GUI development tools on one OS and running the code on another can cause some issues you just don't have to deal with on Linux/OSX

Collapse
 
nickjj profile image
Nick Janetakis • Edited

I've been using the Docker CLI through WSL for about a year now and it's rock solid. You can easily configure it to interface with Docker for Windows and volumes just work out of the box after configuring your /etc/wsl.conf.

From your POV, it feels like you're running Docker directly from WSL. Things are really fast too. No problem at all compiling tons of CSS / JS through Webpack, or running large Rails, Flask or Phoenix applications with volumes.

I detailed all of that at: nickjanetakis.com/blog/setting-up-...

Collapse
 
enriquemorenotent profile image
Enrique Moreno Tent

So it is not really "developing in windows", but "developing in Linux in Windows".

I don't get it. Distros like Ubuntu easier to understand than macOs. I have the feeling that is more a matter of being intimidated, rather than not understanding Linux.

Collapse
 
_hs_ profile image
HS

For me it's matter of drivers. Graphic drivers still suck for me on GNU/Linux any distro I tried. I currently ended up with Manjaro but my laptop has switch-able graphics and Intel one that's only one being used by my distro as I don't do any graphics related stuff shows weird lines in terminal which appear and disappear while I type or click on terminal.

I still prefer it to develop than WSL as it's much easier for me to use any distro to develop than Windows much less overhead when setting up stuff and getting tools ready but when I wan't to just browse, read, watch films online I switch to Windows because of "eyes" experience. Some tools work poorly with scaling on Manjaro KDE (popups are not visible, fonts are to tiny as they are not being scaled etc.) but then again Windows blurs some stuff. If I didn't think MacBooks prices where blown out of proportion I would consider buying it.

Collapse
 
enriquemorenotent profile image
Enrique Moreno Tent

I will agree that heavy graphic computing is not something I would develop on Linux, but that is really just a small part of the programming world. Most of the programming does not need advanced graphic and the Propietary drivers are more than enough

Thread Thread
 
_hs_ profile image
HS

Not what I was pointing out. Simple daily usage of GNU/Linux is pain when you get all sorts of lines across terminal just for clicking on it or typing a command. Even watching video or some KDE animations when bringing up start menu have some hiccups. On the other hand WSL has some issues with tools for development. This has nothing to do with "small part" this is actually the huge part of programming world and why a lot of devs now use mac.

Thread Thread
 
enriquemorenotent profile image
Enrique Moreno Tent

I have not experienced such issues in the past 7 years. Something is not normal if that happens to you. If you'd like help about it, please feel free to contact me, I'd be happy to help you if I can.

Collapse
 
darryljmorley profile image
Darryl

I love Linux but I also use Windows. WSL just brings the convinience of not having to dual boot, which seems to cause strange quirks in Windows 10. For me, WSL isn't quite enough to not have a Linux system just yet. WSL2 looks promising though.

Collapse
 
maheshkale profile image
Mahesh K

WSL is not really a solution to be honest. But main point remains that languages like Ruby have too many issues on Windows. I spent days fixing gems issues. You really need to switch to Mac or Linux for that.

Collapse
 
vinibrsl profile image
Vinicius Brasil

I actually develop Ruby on Rails applications in a daily basis with WSL. You might just have to spend some time setting it up and tweaking, due to IO issues.

Collapse
 
entrptaher profile image
Md Abu Taher

I use docker and puppeteer extensively. There wasn't any day I did not use them. After some problem with now, I thought to give it a try. I ran VSCode and many other GUI inside WSL. Was really excited.

Critics:

  • DPI: My eyes!
  • GUI: It was slow no matter what I tried.
  • Docker and Chrome: Couldn't run them. No matter what. Found some workaround to run them, but it's painful to use such workarounds for every project.
  • File IO: Hella Slow. Xampp installation took 20+ minutes on WSL, 2 minutes on windows, 2 minutes on linux. Yes, 20 to 2.
  • VSCode: I could get debug and terminal working properly with wsl, but all other extensions that has formatting etc. failed.

I like what WSL did so far. I tested it when it was first released, I tested it 2 days ago. Spent almost 20+ hours on it over 2 days and result? I am disappointed and hopeful.

Linux has Wine, Windows has WSL. Both are just compatibility layers IMO, I better not have high hopes for them.

I should mention, I have a desktop and laptop. The desktop has dual boot, and even GPU passthrough inside linux to windows on KVM. I cannot dual boot my laptop yet. Everything is up and dandy on desktop, so...

I spent 20 hours to solve a 10 seconds problem (bootup my desktop).

Why? If I travel around, who is gonna setup all these? 🤷

Collapse
 
daniftodi profile image
Dan

I'm working as a Java developer and I have tried to use Linux on Windows, that was an awful experience. I don't want to repeat that experience.
Any Linux distro or MacOS is a better solution for development than Windows.

When you start thinking about cloud - they are running on linux 99%, consider this.

Collapse
 
sfarkas1988 profile image
Sandor Farkas

Here your missing package manager: chocolatey.org/
For the rest i totally agree.

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

As someone that grew up exclusively with Windows, I didn't realize how annoying it was to install what I needed for programming until I put Linux on a hand-me-down Macbook (the HDD was dead, so I'm booting from a Thumb drive).

Now I'm on a Google Pixelbook as my personal device of choice and after resetting the Linux Container multiple times for a post I was working on, I can say I really appreciate the ease of getting up and running on Linux.

If I go back to a Windows device outside of my work machine, I'll definitely be giving WSL a go!

Collapse
 
rafaelsorto profile image
Rafael Sorto

It still sucks, there are issues, like someone pointed out docker or Running a GUI, 777 permission to files on windows, etc. I ended up coding on windows but using a coder instance on vultr or digital Ocean, or c9 on aws

Collapse
 
janflyborg profile image
janflyborg

Some performance issues? I would say it is more or less unusable for most of the work I normally do on my Mac or Linux Workstation.

NTFS already has some performance issues so deciding to bolt a Linux filesystem emulation layer on top of that doesn't really help the situation.

If you use Node.js and run 'npm -i' for a normal sized project, the operation might take five minutes in WSL and fifteen seconds in Linux (on the same HW).

Same thing goes for compiling a large project in C/C++.

I had high hopes, but it's so utterly slow that it's unbearable to use (and yes, I have disabled Windows Defender for the folders in question).

Collapse
 
radicalbee profile image
Abdu

I have been using Linux in a virtual box. It does a good job when I do not develop in Microsoft stack.

Collapse
 
pedromagalhaes profile image
Pedro Magalhães • Edited

After installing WSL if you vs code, you can install this extension to switch to ubuntu terminal marketplace.visualstudio.com/items...

Collapse
 
artoodeeto profile image
aRtoo

WOW this is really cool. I'm just going to wait a bit and im going back to windows. :)))))) thanks for this.

Collapse
 
verrigo profile image
Radu Caprescu

And yet, the best IDE is still on Windows :)