Please complain correctly

10 January 2018

As of late, I have been learning how to reconfigure and port my web-based projects over to Docker developing on a Windows machine.

This journey, which is still not over, brought me along frustrating dead ends, to poorly documented blog posts, and gave me elating epiphanies when they finally deign come.

This post is not about that journey.

While I was reading around, thoroughly digging for articles explaining ways of installing Docker on Windows or describing the infamously broken symlinks inside Vagrant synced folders, I found many articles to have an unnecessary anti-Microsoft bias.

To dismiss Windows as a development platform while implying that the best development platform runs on Apple is shortsighted in most cases.

I don’t care for that debate

I do not intend to argue against Apple doing quality high-end products, nor do I want to say Microsoft is any better or worse. They are both good, with strong points and griping flaws here and there.

I feel the differences tend to balance out in the end. Because both alternatives are different tools, it’s also OK to prefer one over the other for varying reasons whether they are technical or sentimental.

Choosing between Mac and Windows is also the most irrelevant choice you can make for web development.

The real issue – the one I keep batting my head on during my Docker journey – does not come from me having to use Windows. The issue is trying to make Linux tools work on another platform.

Modern = developer centric

Apple and Microsoft are both very modern in the way they build their solutions nowadays. We can even throw Facebook, Google, and Amazon in that basket. Every single one of these successful companies is – or has been forced into becoming – developer-centric. They all want developers to use their products as much as they want to attract regular consumers.

Part of this means that all these companies are pushing for technology stacks they built for their proposed environment and constantly improve their stack in that loop.

Everybody old enough probably remembers this video:

That was an important moment for Microsoft because Steve Ballmer was, at the time, leading a shift in ideology that placed developers at the core of most of the corporation’s products. It is not by mistake that Microsoft is leading in adoption and it is also not by coincidence that C# remains a real contender to Java.

To me, a similar moment happened at Apple when Steve Jobs decided to ship iPhones without Flash support. In doing so while rapidly improving Webkit/Safari, I would say the company singlehandedly bullied the Internet into standardizing. The result is a much more friendly and consistent playground for web developers. It has also become developer-centric.

The right tool for the stack

It should come as no surprise that building a LAMP stack on something else than a Linux machine may cause hiccups.

For instance, if I were doing C# projects on top of IIS and SQL Server, everything would pretty much be plug and play on Windows because that is the stack they support best.

I too think many web libraries are often easier to install on MacOS compared to doing so on Windows. However, I feel that has a lot more to do with Mac coming from Unix, a common ancestor also shared by Linux, rather than philosophical ongoing choices made by the corporation.

What’s in production?

If you really want to get into an argument over the best OS for web development, anything short of Debian would be a poor choice.

Knowing the final production server is going to be a Linux box, and knowing the tools I want to use are really only natively supported by Linux, is it really logical to develop on another platform?

A Linux desktop may not be extra practical for some, but it would certainly be an efficient environment.

Virtualization to end this

For the reasons mentioned above, I am using Vagrant to pull a Linux box on which all Docker operations are made (or anything server-side really). That way my application runs on its native stack and I sidestep everything. My host computer can run on whatever it wants and it doesn’t matter.

That it “doesn’t matter” is really important. Web applications and their server libraries should not care about how they behave on anything but their intended production environment. Similarly, your host OS should not go out of its way to support libraries that don’t have compatible APIs.

When virtualizing your requirements, the hard job of harmonizing the conversation between these APIs become the virtualization driver’s responsibility. It also happens it is what it was tailored to be doing.

It is unfair for both OSes and vendors to be expected to build flawless experiences on every platform when that is not their core focus.

We surely can complain when things don’t work so well so long as we are complaining about the correct problem.