I’ve eventually decided to start using the *NIX system for the software development.
Being a windows user and the .NET developer for many years now, it might seem like a radical change, but let me tell you this it was a great decision and here is the explanation.
At first a really short introduction it was Friday (14th of October) and I was working on something at the office. Then this Windows popup came out of nowhere saying: “You have 20 minutes left, after that period we will install the updates. And you can do nothing about it.”.
It was maybe 15 minutes later and I could see my laptop shutting down already.
Then 2 or 3 updates were installed which took almost an hour, in the middle of the day (and work). So yeah, screw you Windows 10.
Windows 10 “out of nowhere” update.
However, it wasn’t a decision that I made purely based on emotions. Honestly, if it wasn’t for the latest project for which I needed a device with the touchscreen (Lenovo Yoga 900 user here) I’d probably bought the Macbook instead. I guess that one day Apple will make a Macbook with touchscreen and call it revolutionary, but that’s another story.
I still have Windows 10 (un)fortunately on my PC due do the fact, that I need to migrate 1 or 2 more projects into the .NET Core . However, on my laptop that I use at work I did totally wipe out anything related to the Microsoft system and installed linux Mint .
Why Mint? I don’t know, some people on the internet said that if you’re new into the Linux (I do remember some commands, though, good, old times at the university) you should pick this one instead of Ubuntu (no hard feelings bro), so I did.
Before I did manage to install a fresh system on my laptop I had to disable UEFI, create valid partitions with special flags etc. it took me a while to figure this out, yet it wasn’t that difficult.
The installation part was really quick and within a few minutes, I was already able to login to my brand new OS.
Brand new Linux Mint.
First thing I did was to install the .NET Core framework. It was almost that simple as it’s written on this page. Almost, because there was some missing dependency to some .NET Core preview library that couldn’t be resolved so I had to Google it. Once I had my framework running I was finally able to build and run one of my applications. It “worked”. Again, “worked”, because there was one thing that was causing an issue a reference to the System.Drawing in the project.json .
Although the application did run correctly, it threw an exception that gdiplus.dll could not be found. It makes sense, that’s a Windows component so it’s not available on Linux.
But my point here is that although being the .NET Core application it’d still crash, so imagine what would happen if I’d publish it to some Linux server everything would seem to work, but actually it wouldn’t. Another point for the .NET Core development on the Linux instead of Windows.
It turned out that there’s some great extension called OmniSharp (you can also use it with Atom, Brackets, Sublime or even Vim) and it works well with the VS Code. Surely, it’s not a Visual Studio + Resharper, but I can use some most basic as well as important features such as find by file, by method/type, rename, go to definition or display references.
I’ve also tried to use the Project Rider but no luck here. It did load my solution correctly, but there was some internal exception caused by the Resharper built into this IDE and I couldn’t really build my projects (I was able to write the code, but shortcuts didn’t work either).
However, I do believe that once JetBrains fixes most of these bugs it will be the best cross-platform IDE available for the .NET development (can’t wait for it to happen). Last but not least, there’s nothing a simple bash script can not solve in terms of project automation (running, testing and so on).
Visual Studio Code + OmniSharp is the way to go.
And the last part, which is Docker . So, the story is that I was planning to put my hands on Docker for quite some time now. I did play with it a little bit in the past but couldn’t find a real use for my projects. Yet, the things are different now since we’ve started developing some of our application using theMicroservices + CQRS patterns it seems like a good idea to make use of the Docker images and containers.
And that’s another advantage of using the Linux instead of Windows for the software development process. Linux is a natural environment for the Docker if it works on my machine I can be sure that it will work on some remote server.
I was able to run the Docker on my Windows 10, but you need to use the HyperV or VirtualBox and when I did try to run a docker build it would throw an error due to some system variable or $PATH which I’d need to take care of only because I’m running the Docker on Windows.
Oh, and I guess I did forget to mention why I wasn’t able to run my aurelia application on Linux so it was built on Windows and the path endings in aurelia.json file were “\\”. I had to replace them as “/” to make it work on Linux (which of course doesn’t work on Windows).
And well, I’m not even going to mention here how great the *NIX bash is and that setting up the NGINX with SSL certificate, reverse proxy and redirection was so simple.
Running Docker as a natural part of ecosystem.
To sum up I’m not trying to say that Windows is not so good for the software development. For example, the Visual Studio will be probably hard to beat for many years amongst many other great tools. My point is that if you’re not tied up to some specific technology which is not cross platform (which usually means for the Windows users only), you might want to give a try to some other environment. It’s always a good thing to try out something new, hone skills and broaden your horizons.
本文系统（linux）相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统