by forrestthewoods · 2y ago · 0 comments
As a primarily Windows developer of video games I find developing on Linux far more frustrating, fragile, and error prone than Windows.
However it's less about which is better or worse, and more about the devil you know. Setting up a brand new macOS for development is excruciating. Learning Linux is an extremely long, time consuming, and painful experience. But once you've built up some scar tissue it doesn't seem so bad!
> The cleanest way is to just use Linux on Windows
Hard hard hard disagree. I could not possibly disagree more strongly. I violently and disrespectfully disagree.
> The other option is to use Windows proper
This is the way. Don't use Cygwin or MinGW-64. That is bad advice.
I write a lot of C++ code. It typically needs to run on Windows, macOS, Linux, and Android. My experience is that Windows developers are generally content to step out of their comfort zone and work on macOS and Linux "natively". My personal lived experience is that Linux-first developers are far and away the least likely to even think of Windows or other platforms. They frequently refuse to request a Windows machine so they can even test another platform. Which means I have to fix all their broken code, grumble grumble. If you hard coded /usr/lib or similar you're a bad person.
My recommendation is to simply learn Windows and do things the native Windows way. Stop assuming all platforms are Linux. Cross-platform is a solved and relatively simple problem. Trying to force everything to behave The Linux Way is pain and suffering.
Personally I think "The Linux Way" is generally quite bad. Try something different! Be open to new experiences! Don't dip your toes in the water, jump in the deep end! You might learn a thing or two. And who knows, you may even discover it's quite pleasant.
.NET development is another area where Windows shines. And if you're comfortable living in Visual Studio and not really venturing into the CLI world, I can see Windows development being very nice. VS is truly the premier IDE.
With that said, for most other types of development, Windows is unergonomic or an outright PITA compared to Linux and macOS. Web development, data science, embedded, scientific computing, general scripting, and anything related to CLI tooling and development. This isn't a secret either: it's why WSL was launched to such acclaim from developers.
EDIT: On second reading I see you meant specifically for C# where omnisharp in VS Code really leaves a lot to be desired but Rider is still at the very least a good peer if not straight up better and faster than Visual Studio
Tooling was historically also better from a GUI perspective. With nicer to-use debuggers. Now on Linux you can use Jetbrains products if you need them.
Vulkan is just as much an industry standard as DirectX 12 is. I did a lot of work with both. Choosing between them is often just a matter of being already used to one when it comes to PC support. You'll have to do DX for Xbox support and that's sometimes a bigger player base for you than Android/Linux/Switch/Mac(MoltenVK), though.
As a game developer, I can see how DX12 got a lead. As a Linux user, I'm a bit salty that it's being chosen so often! As we could have all united on an open multiplatform API :(
I don't follow this list. The large majority of both front-end and back-end web dev is almost entirely JavaScript, which completely abstracts the OS away and runs in a managed environment, mostly Chromium. This has first-class support on Windows anyway. What about writing CSS requires Linux? Web back-ends are usually written in one of JS, Python, C#, or Java, and all are platform-independent managed/interpreted languages.
Data science and scientific computing tend to be written in Python, especially considering ML/AI libraries, and Python works well on Windows.
As for general scripting, bash is a poor example. Python is again natively available, and better still, there is PowerShell, with straightforward access to the entire .NET/.NET Core libraries. I can absolutely write superb CLI interfaces in PowerShell (or even in C#, and then expose CLI interfaces in PowerShell). I don't see how Linux is in any regard superior.
Can you name specific examples?
I sort of have opposite experience with Linux where installing the right version of CUDA and GPU drivers was a quest (~5 years ago).
Same with conda for Python and npm for web.
I think the reason that this post exists is that, sadly, software devs don't always get to choose their OS. Many (lazy, old-fashioned) organisations with huge managed fleets of CrowdStrike-infected Windows laptops still insist on shipping the same machines to their software teams as they do to their salespeople, forcing the former to figure out how to get stuff built while effectively working in shackles. I think that's who this post is targeted at and the problem it tries to solve.
I disagree with you that cross-platform is a solved and relatively simple problem. That may be the case for UIs/desktop apps/games, but it certainly isn't for cloud-relevant software.
I 'violently and disrespectfully disagree' that somehow developers are trying to 'force everything to behave The Linux Way'. The software that powers the modern world and that we end up talking about on here most of the time, simply doesn't run on Windows, it runs on Linux. Windows may be a very popular desktop OS, but it is also a huge steaming pile of candy-crushed turd, and I don't think 'simply learning Windows and doing things the native Windows way' is advice I would ever give anyone, ever.
_Unless_ you're a game dev.
On that point, I do think this post is titled badly, and suffers a bit from the HN bias that 'development' always means clouds and data and scale. Maybe a better title, something like 'coercing Windows into building software that it isn't itself capable of running in production' would have saved you a few clicks.
But if you do need run/build on Windows it’s much better to do things The Windows Way, imho. Trying to force Windows to behave like Linux is a terrible, terrible idea in my experience.
I've done a fair amount of Windows services development as well as services deployed to Linux. I'll honestly take the Linux way, in particular Docker/containers as a target. It works when you build, works when you deploy, no surprises, no separately installing a dozen dependencies that blow each other up, like in Windows a lot of times.
> If you're writing services that will be deployed on Linux servers
Yeah I just use Linux for that.
I wish all programming languages allowed you to trivially cross-compile. This is something that Zig does very well. Rust kinda sorta supports it, but it's a hacky painful broken mess. C++ doesn't have a standard build system so it's just lolbad.
glibc is a total disaster. It's stuck in bad design from the 80s. Zig largely solves it and lets you trivially target any ancient version of glibc. The hoops they jump through for Linux cross-compile support is an order of magnitude more complex than macOS and Windows.
There are thinks I do like about Windows... that said, I've seen far too many problems trying to upgrade software on Windows Server(s) to ever choose it again.
We've gotten to the point where outside of some consumer-facing niches like gaming, or industries with vendor locked-in tooling, it's largely true that it's all Linux
the native windows way is often even worse than the linux way, but sometimes it's actually better and it's too bad linux doesn't do some things the windows way. exhibit a: the x11 protocol
what do you think of .net core? because as far as i know that's the only native-code-generating compiler for windows other than mingw-64 (and proprietary compilers)
Not the parent commenter, but... This is not relevant; .NET Core is a managed environment. If your needs dictate it, then it's a very good choice.
> that's the only native-code-generating compiler for windows other than mingw-64 (and proprietary compilers)
clang also generates native Windows code. You can even set clang to automatically target Windows and expect the Windows SDK by running `clang-cl`. You of course will need a Windows SDK and MSVC C/C++ runtime mounted on a case-insensitive filesystem, like the Firefox guys have done[1].
(the native-code bit is just the cil jit compiler i think)
I think we disagree on some details. I don't think windows is a serious server OS, and never has been. Look at the crowdstrike failure, solar winds leak, or the yearly issues that are biting millions of people and there is no sane way to avoid. So I am just surprised when you said:
> fragile, and error prone than Windows.
Are we living in the same universe?! Crowdstrike aside, every windows shop I have worked at, including EA and the USAF, had massive and constant CI failures if they could get CI working at all. Often they had teams of dozens working on remediating this stuff perpetually. These places also have infrastructure go down for the dumbest of reasons, like unscheduled updates or impossible version mismatches.
The Linux shops generally had predictable,repeatable, and knowable causes for failures. Places like TD Ameritrade and Nationwide Insurance go down because they screw up.
It isn't always like that, but the Unix/Linux shops I have worked at measure yearly downtime in seconds and windows shops measure uptime as a percentage.
> If you hard coded /usr/lib or similar you're a bad person.
1000% agree, but I also see plenty of hardcoded "c:\\" in code also written by bad people. I also find the amount of people who claim that "include "windows.h"" is always valid C++ is infuriating, like other platforms don't exist. The people including "dirent.h" (Unix DIRectory ENTries) are so common that the MSVC saw fit to implement it some time about VC6 and VC2022.
Writing cross platform code isn't that hard if you just test. 99% of the time it works to just write a wrapper around the platform call to do a thing and call that wrapper.
This is a very silly statement.
I hope you realize that Crowdstrike also runs on Linux and has also broken Linux machines. https://access.redhat.com/solutions/7068083
I don't know why your companies had issues with Windows CI. If I had to guess I'd say because it was Linux shop with people who refused to learn Windows, ha! Everywhere I've worked had perfectly stable Windows CI.
Of course, if you just have a few fly-by-night Windows systems that aren't centrally managed, you're going to have issues.
Why do I keep seeing this at windows shops and not Linux shops? Maybe it is just selection bias, I have only had 16 contracts in the past 20 years not quite a statistical level sampling yet. But I would seriously like to explore non-selection bias reasons why this IT departments seem to fail like so often using windows and not as often or at least not as publicly otherwise.
There is a non-zero amount of technical failures, but not enough to explain the vast disparity I have witnessed and keep witnessing.
I mean, it doesn't help that until 2019, the choice was unambiguously between "do it according to international standards and useful features" and "do it according to the Microsoft way and annoying bugs".
(support for Apple, by contrast, is largely a matter of whether you can afford the extortion fees)