Microsoft has been revamping Windows to make it more attractive to developers. What has it done, and why?
Not so long ago, Windows was doomed. Developers were buying Apple hardware, with every tech conference keynote illuminated by hundreds of glowing Apple logos. It wasn’t surprising: under the hood, macOS was a derivative of BSD Unix, allowing developers to quickly build the same toolchains on their laptops as ran on their servers or in the cloud. And if the apps you needed weren’t there, well, you could install Parallels and run those Windows apps as if they were part of the macOS desktop.
SEE: These are the programming languages most in-demand with companies hiring (TechRepublic)
Developers are a bellwether. Where they go, everyone else eventually follows. It was time for Windows to change, providing a developer-centric environment without changing the way everyone else used their PCs, whether they were business users or gamers. That was a challenge for Microsoft, but one that it has gone a long way to completing. Now developers are buying PCs again, and those glowing Apples no longer dominate the conference halls.
Changing Windows, hardware and software
How did that happen and, more importantly, how did it happen so quickly? Part of the story is Microsoft’s move into hardware, understanding that Apple’s blend of hardware and software was a big reason for its success. That led to Surface, with its choice of a paper-sized, high-quality, 4:3 display, and to the developer-friendly high-end Surface Book and Surface Laptop, with powerful processors and GPUs, plenty of memory, and comfortable, responsive keyboards.
With developers spending hours at their screens, making the right hardware was the first step on the journey. Now Windows had to lead the rest of the way. There, the transition from touch-first Windows 8 to the hybrid environment of Windows 10 was a big driver for change. The new operating system kept the multi-touch and tablet features of Windows 8, but married them with the familiar menu and windows of Windows 7.
While Surface hardware has helped bring developers back, Windows 10’s Windows-as-a-service model, with two releases a year, has allowed Microsoft to respond to developer demand quicker than in earlier versions of Windows. At the same time, it has begun to decouple SDKs and developer tooling from the Windows monolith, replacing the sting of big-bang releases with a more consistent release cycle and faster bug fixes.
Going to where the developers are: in the Terminal
Much of this is about what Microsoft has long described as ‘going to where the developers are’. That’s meant rethinking code that’s older than Windows, refactoring the way the company does documentation, and going beyond the traditional limits and rivalries that locked Windows into one way of working.
One key development is the new Windows Terminal. Replacing the old cmd.exe, the new Terminal takes a modern approach to the command line, using lessons learned from Linux and cross-platform terminal applications. The new Terminal is delivered either as a Store application or as a binary installer from GitHub. The Store release is being updated monthly, with a preview release for anyone who wants to try new features out. The latest builds support in-window multi-pane views (including read-only panes for monitoring application outputs), full colour support, as well as multi-tabbed windows, so you can work with multiple terminals at once.
Terminal makes it easy for developers to work in Windows or with remote servers using Windows’ recently added native support for SSH for secure connections (one of the first Windows features to take a dependency on an open-source project). As Terminal supports 24-bit colour and standard ANSI connections, you can go from the familiar Windows command line straight to a remote Linux system without changing context, and with full support for all the features of the Linux terminal.
Linux on Windows in Windows
At the same time as launching an open-source Terminal, Microsoft unveiled the second iteration of its Windows Subsystem for Linux (WSL). The original WSL 1 was designed to provide an emulated Linux environment using a set of tools to translate Linux system calls to Windows calls, allowing code to run on Windows. The idea was that the key elements of a Linux toolchain could run on Windows, so you could work with familiar dev tools and test code without leaving your PC.
WSL proved to be very popular among developers, arriving as Apple was changing how it supported UNIX on macOS. With a focus on cloud-native development models, like containers, Microsoft was making Windows a developer portal into its Azure cloud services, using both WSL and its Visual Studio Code programmer’s editor, released a year earlier in 2015.
The second WSL release took a different approach, building on Microsoft’s low-level Krypton hypervisor. Part of the Hyper-V family, Krypton is closely linked to the Windows kernel, allowing better resource sharing between host and virtualised OS. Krypton is also used to deliver virtualisation-based security in Windows 10, running the Windows Sandbox isolated test environment and Microsoft’s Edge browser’s Application Guard Mode.
With WSL 2, Microsoft was now shipping its own Linux kernel, and making it easier to support Linux containers on Windows. Docker’s Windows implementation is now based on WSL 2, simplifying building and testing Linux containers on Windows before deploying then to Kubernetes in the cloud. With a container running on Windows, you can use Visual Studio Code’s remote editing mode to work on code inside the container, giving you a seamless development environment with the editor and debugger inside the container and the GUI running inside Windows.
The combination of a popular editor and a converged cross-platform development environment turned out to be just what Windows needed. Inspired by Microsoft’s Surface line, hardware vendors like Dell, Lenovo, and Razer began to deliver developer-focused laptops that complemented the changes in Windows and gave both individual and corporate developers access to a choice of hardware.
Script your toolchain installation with Winget
Other changes have been less obvious. Microsoft has been working to improve installing applications and tools, with the intent of providing a scripted way of adding an entire suite of tools. You could, of course, use the third-party Chocolatey installer, but Microsoft has been experimenting with two routes of its own.
The first integrates the Windows command line with the Windows Store. Simply type ‘python’ and Windows will install the store version of the popular language. That makes it easy to quickly start working with data science projects, using tools like Visual Studio Code. There’s a lot going on under the hood here, and it required collaboration between the open-source Python project, the Windows command line team, and the Windows Store.
Microsoft is now going further and building a command line-driven installation tool. Winget works with a GitHub-hosted repository of package manifests that link to downloadable installers. The manifest contains details of an application, with versioning and support for different installers that support different processor architectures. Winget is rapidly developing a large library of applications, from developer tools to databases, allowing you to quickly build a set of scripts that can deploy an entire toolchain and development stack to a PC.
Adding developer-friendly tweaks to Windows
Other developer-friendly features come from add-ons like the new Windows Power Toys. Here you can set up Fancy Zones to manage screen layouts, add support for previewing SVG images in File Explorer, resize images, and configure a search-based application launcher. Power Toys is an open-source project and is adding new features regularly — one of the latest is a list of Windows’ keyboard shortcuts, which is ideal for developers who don’t want to lift their hands from their keyboards.
Delivering a good developer experience isn’t a matter for any one group inside Microsoft, or even within Windows. It requires getting many different moving parts aligned, and so seeing Microsoft work to cover this and other aspects of the Windows developer experience and tooling is an important development. With Windows own developer tooling getting a shakeup, the next few months should be very interesting for developers, both those using Windows and those building for Windows.
This post was written by and was first posted to TechRepublic
Do you find this article helpful? Your Friend might too. So, please Share it with them using the Share button above.
Will you like to get notified when I post new updates? Then Follow me on any of my social media handles: Google News, Telegram, WhatsApp, Twitter, Facebook, Pinterest.
You can also drop your email address below if you wish to be notified by mail.