Experimenting with Windows 10 for software development as a macOS user

I have spent my entire professional career writing code on a Mac of some sort. But recent releases of the MacBook Pro introduced a variety of regressions to the experience, notably the touch bar replacing the Esc key and the entire function row and a keyboard that only lasts a few months. Additionally, Apple has also failed to keep pace with other laptops in terms of specs. This has made me wonder what life would be like if I used a device from another manufacturer and Windows or Linux as my primary workstation OS.



As luck would have it, I was invited to participate in the Microsoft Change Agents program which promised me a brand new Microsoft laptop in exchange for, primarily, me using the #MSFTChangeAgents hashtag on content that is relevant to the folks that follow me on Twitter - assuming, I suppose, that the content is in some way related to Microsoft.





Last week I had to drop off my one-year-old MacBook Pro for repairs because the keyboard was frequently unresponsive to presses of certain keys, the bluetooth keyboard that I used as a replacement stopped connecting unless it was plugged in, and one of only two ports on the device didn't work. Today they let me know that after doing all of the work to essentially rebuild it from scratch around my SSD, they had installed a faulty logic board so it will be another few days. The following is a rough outline of my experience using a Surface Pro 6 with Windows 10 as a work device.



Getting set up

The first thing that I did upon receiving this device was install Ubuntu from the Windows Store. Yes, you read that right - the Windows Store has an Ubuntu app. The app is essentially a Bash terminal with core Linux command line tools that run on top of WSL, a Linux kernel interface to the Windows kernel that translates system calls and responses between the two kernels. Installation requires enabling WSL manually before running the installer, not a big hassle but a small cut that foreshadows more to come.



Next I went ahead and tried to install Node, and I couldn't figure out how to copy + paste into Bash so I manually recited the incantations. I had to do the same to install Yarn afterwards. Next, I attempted to install expo-cli with Yarn, but it reported that the network was timing out. After some investigation I learned that I had to exclude the Yarn cache directory from Windows Defender or Windows Defender would slow the installation to a crawl by re-scanning the directory every time a file was added (or something like that, I just wanted it to work and ignored the finer details of why). While I was at it I also added a project workspace directory to the exclusions list because the same issue would occur for project-specific node_modules directories too. Next, I ran expo init and opened a project on my iPhone - it worked! But if I switched from Tunnel to a LAN connection it would not connect. I had to open a few ports (19000, 19001, and also 3000 for future usage) with Windows Firewall, then all was well again.



While fighting through the above I frequently hit the wrong keyboard shortcuts due to my deeply ingrained macOS muscle memory. So I installed SharpKeys and remapped Caps Lock ⇛ Ctrl and swapped Ctrl and Windows.





This improved the situation considerably, unfortunately there's no workaround that I'm aware of to globally change the tab switching hotkey from Ctrl + number or arrow to Alt, so I can't use my macOS muscle memory associated with Cmd for switching tabs. Not a big deal, I could easily get over this if the rest of the experience ends up being good.



Next, I installed Visual Studio Code. Using the Settings Sync extension it was (almost) effortless to transfer my settings and extensions over. I say almost effortless because my extensions weren't initially installed and this was not expected behavior. It turned out that I had to install another extension after syncing for the synced extensions to activate.



Now I circled back to the terminal - why can't I copy + paste? It seems that the best you can do with the default WSL Ubuntu terminal is make right-click paste. This would not do. Hyper seemed to be the best alternative, and with it I could paste with Ctrl + Shift + V, not perfect but close enough for now. An additional perk is that it is prettier out of the box and easier to customize.







Getting work done

An obvious limitation of using Windows as my workstation OS is that I can't work on projects that require Xcode. I can still work on React Native iOS related projects that are written in JavaScript using the Expo client app and expo-cli , although I can't run an iOS simulator on Windows and I usually prefer to use it over a device.



So, I figured I would work on some documentation. I cloned the Expo repository and ran yarn in the docs directory. The first run failed with this error, the second run worked. Aside from not being able to use my favorite design tool Sketch to draw diagrams, the experience here was comparable to doing the job on my MacBook Pro. Having a stylus and touch screen to sketch out ideas on is potentially useful but I did not use it in this case.





I decided to move on to triaging my Github notifications and I was drawn to a pull request that adds a TypeScript type definition to a library I maintain called react-navigation. The pull request includes a rewrite of a sandbox app to TypeScript in order to dogfood the definitions. First objective: get the sandbox app to typecheck. Running yarn in the sandbox app directory repeatedly led to the same error that I briefly encountered when working on the documentation, but this time it was much more frequent and exacerbated by the need to update dependency versions. The installation would succeed about one in seven times, and each failed attempt took around a minute. It could be that the number of and size of dependencies makes this bug more acute. It's possible that using npm instead of yarn would have solved this issue, but perhaps it would have opened the door to another. These types of tools are generally not built Windows-first so I'm not surprised to be hitting difficulties. Either way, this iteration speed was too slow for me so I dropped it.



Edit: I went back and tried out npm - as anticipated, I did encounter a couple of other issues but those were solvable. First, I faced an EACCES error, solved with npm i --unsafe-perm=true --allow-root (thanks to this comment). Next, I was back to ENOENT which was resolved by updating wsl.conf to set case=off as per this thread. I also noticed while doing this that deleting node_modules was incredibly slow, so I switched from Bash to zsh as that apparently helps.



Another edit: I've found that working in large git repositories is extremely painful because of WSL disk I/O performance problems.



In terms of work related tasks outside of programming, I've used the Surface for video calls, Slack, Discord, and the usual Chrome-based activities without any issues, it's a very comparable experience to macOS.



Hardware notes

The Surface Pro 6 trackpad is awful compared to the offering in a modern MacBook. It's far too small, it has a hard time differentiating between two finger gestures, you often have to press it until it makes a clicking noise for a tap to register, and its palm detection seems overly aggressive leading to the cursor occasionally not moving at all when you touch the trackpad. The software side of it is also lacking - gestures aren't reflected on screen as continuous animations, rather they seem to just fire static animations once a gesture has completed. It feels rough and unpredictable.



The keyboard is a pleasure to use, but because it's detachable and fairly loosely locked in, you can't rest it on your lap very well.



If a 1" bezel doesn't bother you, the screen is beautiful. I quite like being able to touch the screen to zoom and scroll, and enjoy using the stylus for drawing and organizing my thoughts.





I have the base model and it really shows in performance. Visual Studio Code takes about ten seconds to start up and initialize my extensions (and I only use a few extensions). While writing this I drew my silly face diagram and there was a >500ms delay between touching the screen with the pen and a line showing up in OneNote. It works perfectly if I close most apps... unless I connect to an external display via mini DisplayPort (no HDMI). Then it slows down again to the point of being difficult to use... unless close the Surface Pro so only the external display is active.





I also tried connecting my wireless Apple Keyboard and Trackpad. This was a bit awkward since it's unclear how to ask either device to enter pairing mode. Once you pass that hurdle, you realize that you realize that of course Apple doesn't offer drivers for these devices on Windows, so to adjust the configuration beyond what you can do for generic devices of the same class you need a tool like Magic Utilities. I was unable even with this tool to get the trackpad to feel remotely similar to how it does on macOS, sadly.





My verdict

Microsoft is moving in a good direction with WSL to improve the developer experience on Windows machines but it's still not quite as smooth as macOS and the I/O performance problems need to be resolved. Visual Studio Code makes it easy to jump across operating systems and maintain a consistent development environment in the same way that Chrome gives you a consistent web browsing environment. If you are willing to struggle through some quirks in the setup experience and occasional issues with tools built for other operating systems first, you may find that going from a macOS device to a Windows device could save you some money while getting you a more powerful machine for web development, and you might actually like it. Personally, I'll continue to use the Surface Pro 6 for these sorts of tasks occasionally, but it's not quite powerful enough so it will mainly be a communication and entertainment device.





Thanks Microsoft Canada for giving me the device! I was not asked to review it or even comment on it, but I wasn't asked not to either, so here we are.

#1 jim (0)
#2 jim (0)
#3 jim (0)
#4 jim (0)
Replies
➥   Jim started this thread 7 years ago 1 response.

To reply you need to sign in.