This is not a Windows vs Linux thread. Thx
Hello everyone! I’ve been listening to a lot of software engineering podcasts lately, reading a lot of books on software development and software engineering, and following some folks on Twitter that are professional software engineers, programmers, software developers, insert preferred title here.
I have noticed common theme. Note, these talking points represent, in my opinion, a vocal minority. But this vocal minority is influencing the opinion of future software engineers.
- People seem to be misguided on the capabilities of modern Windows.
- People don’t understand the difference between a development environment and a production environment.
- The focus is on irrelevant details and information rather than the art and science of software engineering.
- People are primarily Mac fanboys that work with JavaScript.
Lets just get the brunt of this nonsense out of the way:
Windows does not perform as well at serving traffic on the Internet as a Linux operating system. *
* Cloud environments or solid networking hardware help – I.E. AWS Security Groups will process the traffic rules and then forward to your Windows host.
I don’t think it’s unreasonable to state that the networking stack is getting better on Windows. But, raw performance, Linux will win out, by milliseconds at least.
However, there are several tools and reasons available to use Windows as your primary development environment. Apple has dropped the ball as of late, formally being the de-facto computing environment for devs. Microsoft has capitalized on this ball dropping and offered an amazing suite of tools and SDKs to help developers do their jobs.
Those tools, as well as others, are what I’m going to primarily discuss here.
PowerShell Core
Latest Version at the time of this post.
Powershell Core AKA PowerShell version 6 is an open source, cross platform shell provided by Microsoft. PowerShell is not Bash, nor has it ever claimed to be. Yes, things are different in Bash than they are in PowerShell. Some concepts are the same or similar, but they are not the same tool. Getting upset that something doesn’t work in PowerShell like it does in Bash is like getting upset that something in Java doesn’t work the same it works in Ruby.
PowerShell Core has implemented a lot of the keyboard shortcuts that the *nix shells have. It’s also been stripped of a lot of the bloat and modules from PowerShell version 5. If a particular functionality in PowerShell Core doesn’t exist, you have a few options: Write your own in C# or PowerShell, import it from someone else, make a request in the GitHub repo, check to see if there is an official module or other cmdlet that will facilitate the functionality you are looking for.
PowerShell Core (and v5) can also serve as an interpreter. node
, npm
, python
, pip
, ruby
, gem
, javac
, java
, gcc
, et al. work in PowerShell. Learning the ins and outs of the shell is going to take some practice and elbow grease. But, you will instantly increase your productivity on a Windows environment, I promise you.
The cloud and cloud provision tools will also work with PowerShell, including aws-cli
, Azure tools, and terraform
. So if you’re an infrastructure developer or DevOps engineer, PowerShell will serve you well in your career.
You can also install a package manager utility, similar to homebrew
on MacOS, that has a massive repo to install and update software.
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
The above is the installation script that will get you taken care of. From there you run choco install x
where x
is the package you want to install. There are a list of packages available on the site above.
MobaXTerm
MobaXTerm is a multisession manager for Windows. It comes with a basic Cygwin configuration, but you can swap that for PowerShell, Windows Subsystem for Linux, or your preferred shell environment. Aside from ssh
and sftp
, MobaXTerm offers RDP
, VNC
, and AWS S3
, among others. The free version allows you to have 12 saved sessions, with an unlimited amount of connections or types of sessions. It’s fairly customizable, with a few skins out of the box and some aesthetic color schemes.
One of the nice things about MobaXTerm, aside from the features I mentioned above, is that, if permitted in the sshd_config
file, establishing an ssh
session allows scp/sftp. You can edit remote files, click and drag files to and from, etc.
VS Code
Visual Studio Code, the only Electron application that works Only kidding of course, but it has a ton of support and is vastly superior to Atom in the opinion of a lot of folks out there. They seem to be the same, to me. Whereas Atom suffered from long pauses during use, VS Code sometimes has a long startup time.
What starts as a basic editor can quickly evolve into a full fledged IDE. VS Code is extension heaven. Any and everything you need when writing software probably has an extension in VS Code. This goes beyond syntax highlighting and linting, often enabling menu options and go-to or click-to-run functionality (Terraform and Docker are for this). If you do anything in Go, the Go Analysis Tools make it worth switching to this environment. The Python linting is really great, too.
Aside from being an editor and smart(er) development environment, there are flexible shell options as well, you can run PowerShell, PowerShell Core, Windows Subsystem for Linux, CMDer, etc. The configuration has a GUI now, but you can still access the raw JSON to make changes and edits.
Docker
Microsoft has been heavily involved in the development of Docker. It has gone through dramatic changes, mostly getting better with some set backs now and then. As of this post, it still relies on Hyper-V, so consider that before you install it. In the future, the second version of Windows Subsystem for Linux will have native Docker compatibility.
You can use docker
and docker-compose
in PowerShell, CMDer, Windows Subsystem for Linux (with some tweaking), and Command Prompt.
Hey AdminDev, that’s great and all, but I still need Linux
Assuming this is the case and your employer will not provision you a Linux workstation, you have a few options.
Windows Subsystem for Linux
You’ll need to enable the developer mode:
Start > Settings > Update & Security > For developers > Developer mode
From there, you need to install the WSL underlying architecture:
Start > Turn Windows Features On or Off > Windows Subsystem for Linux
Reboot your computer to make sure the installation completes properly.
After that, head here and choose your distribution of choice.
You’ll set up a user account (this does not have to be the same as your local account/Windows live account). Don’t forget to update the distro when you’re done with the setup!
From there, install the tools and utilities as you normally would.
VMware Workstation/Player
I would ask if your employer will fit the bill for this, otherwise get permission and pay or just use the Player (still good for using VMs).
VMware Workstation, despite their recent legal issues, is one of the best hypervisors I’ve used on the desktop. With workstation, you can manage snapshots and encryption, as well as a ton of other features. Player gives the same functionality at the VM level, but I don’t think you can do encryption or snapshots (someone correct me if I’m wrong).
The drivers for full screen and sharing are easy to install, and you can manage multiple environments. I tend to run headless VMs, but full screen with GUI has worked a lot better on VMware over VirtualBox and Hyper-V.
What if I just want a Windows VM, and not mess with all the stuff on my gaming rig. Can I install all this in a VM?
Even better! Microsoft has an image ready to go for your hypervisor of choice.
You can download it here. Be sure to take a snapshot, so after the trial period you can roll back and patch the system/tools. This activity is encouraged by Microsoft, so you’re not violating any T&S or legal issues.
Visual Studio: Community
Microsoft has released a community edition, similar to JetBrains’s IntelliJ, for open source developers, individual developers, and folks that want to check the platform out.
Visual Studio is a KICK ASS IDE. Their debugger is really great, very intuitive, and easy to work with. They’ve added a ton of platforms to their tool, including various JavaScript frameworks, Python development, and database development. I’ll admit, their Python linting isn’t as great on VS Community as it is on VS Code, but it’s nice to work with nonetheless.
There are packages for writing C and deploying to Linux, or writing C, C++, C#, etc. and deploying to Docker. Depending on your workflow, it can be a one stop shop, even for cross platform development (.NET Core, C++, C, Node/Express JS).
So, if you’re stuck with Windows or, if you’re like me, and just don’t mind using it sometimes, check out the above tools and get your environment rocking and rolling!