6 ms·
> Developing on Windows can be frustrating As a primarily Windows developer of video games I find developing on Linux far more frustrating, fragile, and error
by forrestthewoods 2y ago
> Developing on Windows can be frustrating
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.
- tracker1 2y agoIt depends on what you are making more than anything. If you're writing services that will be deployed on Linux servers (to save cost, increase availability, etc), then using WSL2 is probably the best bet if you must use Windows. 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.
- lostmsu 2y agoNah. Debuggers on Windows proper are much better experience than Linux (especially C/C++ and .NET), so when I was at Amazon I would always have a short stub for any project (mostly Java) that launches it directly on my host Windows machine so I could use the debugger, and didn't have to wait 2+ minutes to launch the changes.
- forrestthewoods 2y agoIt's shocking how many Linux programmers rely solely on printf debugging. My goodness it's like programming in the stone age. printf is the ultimate fallback, not the tool of first resort!
- anthk 2y agoEven used rr?
- tracker1 2y agoHave you tried Rider for C# on Linux (or MacOS)... works pretty well, I know those who prefer it to VS.
- forrestthewoods 2y ago
- o11c 2y ago> My personal lived experience is that Linux-first developers are far and away the least likely to even think of Windows or other platforms. 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)
- sumtechguy 2y agoHaving done multi system projects you are spot on. Even those libs that cover over some of the differences tend to have a lot of interesting edge cases. For example threading will act one way on windows and a subtly different way on linux if you happen to use one of the popular threading libs. Even the CRT can have different cases for something simple like 'printf' (always re-read the docs for your compiler and platform before you port). So you end up with this weird glue abstraction layer anyway and quickly end up with config files for your paths.
- kragen 2y agodespite being an extremist fan of free software, i pretty much agree with you. i ported patch(1) to cygwin back in the 90s (though i never did try to get my changes merged into the mainline) 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)
- delta_p_delta_x 2y ago> what do you think of .net core? 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]. [1]: https://glandium.org/blog/?p=4020 https://glandium.org/blog/?p=4020
- kragen 2y agoi don't think the msvc c/c++ runtime is open-source, is it? (the native-code bit is just the cil jit compiler i think)
- neonsunset 2y agoIt is managed, but it also lets you write C-equivalent code with a similar degree of freedom, and compile it to native executables.
- sqeaky 2y agoI agree with your general sentiment that leaning into the platform and away from compatibility layers is a good strategy. There are reasons these things are differently and compatibility layers by you little and cost a dependency. 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.
- forrestthewoods 2y ago> I don't think windows is a serious server OS, and never has been. 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 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.
- 2y ago
- dlivingston 2y agoIn my experience doing systems programming across Windows, macOS, and Linux, there are a few specific areas where developing on Windows is the best platform. Game development is one of them: DirectX 12 is the industry standard graphics API, and the first- and third-party tooling related to it is cream of the crop on Windows. .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.
- lostmsu 2y agoI did both web development and deep learning on Windows proper, and can't quite understand what you mean by unergonomic. 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.
- orwin 2y agoAs soon as you have to create clusters and do not use a single machine, or use network drives/windows fs for data at rest in a usable way (not slow as hell), or do anything with the network that also has to be sightly secure, you really have to be an expert to do anything (securely). Windows Sec/Ops are probably the software engineers I respect the most.
- Blackcatmaxy 2y agoHard disagree on Visual Studio being a "premier" IDE, I know VS2022 cleaned up a lot from VS2019 but it still is one of the slowest IDEs I have ever used and the intellisense will just sometimes break through multiple windows restarts. One of my biggest tips to my classmates in uni has been to just use literally anything else from VS Code (which admittedly isn't much better but doesn't take nearly as long to start up) to the Jetbrains IDEs which are thankfully free for students. 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
- tomas_impressi 2y ago[dead]
- boomskats 2y agoWhat you're developing makes a big difference. If you're making games and writing C++ in UE, or used to working with blueprints, or developing for graphics, then trying to do the same in Linux will be a horrible experience. This is why people don't tend to use Linux to write games. However, if you're developing for the cloud or writing applications or anything involving servers and scale (arguably the majority of software being developed today), then the exact opposite is true. 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.
- forrestthewoods 2y agoIf you don’t need to run/build on Windows, then don’t use Windows! 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.
- autoexecbat 2y ago> Stop assuming all platforms are Linux 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