Windows WSL - Thoughts from a Rails Developer29 Jan 2018
I have love Linux and use to live in it for 6 years. Few months back I got a laptop for personal use, a HP Envy. It came with Windows with a 128 SSD. It was not enough for me to facilitate dual-boot. So I thought of giving Windows a try. For my personal projects I thought of utilizing WSL. This is what I think after many days of coding.
Its a good start
I never thought I would use Windows, ever. But here I am today giving it a chance. I can finally with little worry run and develop Rails apps in Windows. Its a great and I am excited.
WSL for the first time gives developers access to Linux and Windows in the same machine. I find this attractive as I now have access to Lightroom + Photoshop while been able to work on my Rails projects.
I found out most of my apps work in WSL with few exceptions like PostgreSQL database. This was not a
deal breaker. I install PG in Windows and the
libpq-dev package on Ubuntu. This allowed me to use
the PostgreSQL database from WSL.
You will have to make sure to configure Git to leave out stupid
\r used by Windows. Also when
running Rails apps, Ruby warnings will show about the stupid
I have mixed feelings about efficiency.
Before WSL I used Vagrant + Virtual Box for development. I found that I would get about 2 hours or less of time with a full charge. With WSL this has never been an issue. The estimate was well over 5 hours. Its power efficient. Good if you are on the move and have no access to a wall outlet.
Unlike running a VM, you don’t have a huge memory penalty. In fact I think the penalty is a matter of few megabytes. This is a clear win for WSL over a virtual machine (ex: Virtual Box).
While battery usage and memory are a huge plusses for WSL. How ever speed is not in its favor. A simple
rails s would take over 15 seconds to load. I also found changes to ruby rails not getting applied in
Rails and needing me to restart.
I tracked this issue down to an issue regarding caching. I am sure the developers are trying hard to improve the product, but at the moment it sucks donkey balls.
WSL is a good first step. It needs a lot of improvements. I quite frankly believe Microsoft should ditch Windows and start a Windows shell for Linux.
I am barely hanging in there. I don’t mind its occasional hiccups because it is my personal laptop and I use it on my personal projects. How ever I must say, I might jump ship any time.