Live data from Hacker News

Why I develop on Windows

blog.shortround.dev

21–30 of 187 posts

Re: Why I develop on Windows

#21
I've followed a different path, but I've come to the same conclusion. Along my path, picking up languages like Haskell or Node early on meant using Linux. So since high school I've always had _a_ Linux machine available, but preferred to use Windows as the user interface.

Two thing I can say for any naysayers who use a Mac and do devops, backend development etc.:

1. Are you sure your environment that matches your deployment environment? Do you have confidence your server code runs the same on an Apple Silicon Mac as the (very likely) x86-64 and Linux environment your users use?

2. Have you ever noticed how shell scripts on Mac often... don't work the same on Linux? The way to fix that is of course use Homebrew, and, while brew has gotten leagues better, the quality pales in comparison to even Debian testing, Ubuntu main, or Arch and others.

As a devops engineer for many years, #2 was death by a thousand cuts. If I could, I'd have replaced every Mac user's userland with GNU coreutils from brew without their permission.

To square the circle of preferring Linux systems and Windows' UI, I've done just about every approach you can imagine to make that work, from syncing folders via rsync, to ssh or nfs mounted filesystems. I've used Virtualbox and VMWare and Hyper-V to locally run the Linux environment. There have been a few different X window managers and remote desktop tools, but none of them have been great.

WSL1 is where things really began to turn around - what an interesting project to make the NT kernel work as a Linux kernel. It didn't quite pan out, but that was OK.

WSL2 made major changes to how WSL worked, and now I can now run Kubernetes, Docker, 3d applications, machine learning (stable diffusion), have a real Linux shell and userland.

WSL2 is a true game changer for quality of Linux development on Windows. Being able to `docker run` Stable Diffusion or Llama or what-have-you is incredible.

I can imagine a PopOS - or another vendor-backed Linux OS - might persuade me eventually to shed Windows. In the meantime, I don't feel like I'm making any compromises.

Re: Why I develop on Windows

#22
post #13
post #10

> I know a lot of developers who will opt to do all of their scripting in python these days, even putting #!/bin/python3 at the head of a script so that it runs through the shell. ...which is exactly what you're meant to do. This is not an example of how bad Bash it, it shows that you didn't understand what Bash is. It's expected to use various languages to write code on Linux, nobody wants you to do things in a lang…

To be fair to OP, I would then go on to label these people as equally ignorant: > A lot of people coming from the Unix-like world of macOS and Linux don't tend to know [PS]. Many people don't know it even exists at all. When I mention the Windows Terminal to people, they think I'm talking about the Windows Command Prompt, a crappy little program I know that PS and the new terminal is not the same as cmd.exe, and that…

There was a time when Internet Explorer was possibly the best UNIX browser. We ran it on Solaris.

Re: Why I develop on Windows

#23
post #13
post #10

> I know a lot of developers who will opt to do all of their scripting in python these days, even putting #!/bin/python3 at the head of a script so that it runs through the shell. ...which is exactly what you're meant to do. This is not an example of how bad Bash it, it shows that you didn't understand what Bash is. It's expected to use various languages to write code on Linux, nobody wants you to do things in a lang…

To be fair to OP, I would then go on to label these people as equally ignorant: > A lot of people coming from the Unix-like world of macOS and Linux don't tend to know [PS]. Many people don't know it even exists at all. When I mention the Windows Terminal to people, they think I'm talking about the Windows Command Prompt, a crappy little program I know that PS and the new terminal is not the same as cmd.exe, and that…

> The powershell command names though

Just wondering if you're talking about command name length or something else?

Asking because it comes up a lot and almost all the common commands have idiomatic short/terse versions (gci for Get-ChildItem, etc).

No shade, though. No reason you'd know if you don't have a reason to know it.

Would love to hear if I'm making the wrong assumption and it's something else you're talking about. I personally really love powershell, but also get why people love bash. I'm still pretty comfortable with bash because I work in *nix systems mostly, so it makes sense for me to know it, whereas the reverse (with ps) isn't really true for most devs

Re: Why I develop on Windows

#24
post #10

> I know a lot of developers who will opt to do all of their scripting in python these days, even putting #!/bin/python3 at the head of a script so that it runs through the shell. ...which is exactly what you're meant to do. This is not an example of how bad Bash it, it shows that you didn't understand what Bash is. It's expected to use various languages to write code on Linux, nobody wants you to do things in a lang…

> > even putting #!/bin/python3 at the head of a script so that it runs through the shell.

Uh, not, in that case the shell is not involved at all. The kernel implements shebang and will automatically start the interpreter, whatever it is, without having to go through the shell.

Re: Why I develop on Windows

#25
post #11

Complaining that bash on macOS is old is valid, but it doesn’t seem relevant here. If you’re just going to use Powershell on Windows anyway, then surely bash doesn’t matter on either platform. More relevant in my view is how well the workstation you use supports interacting with your build system. In many organizations, the actual build environment is only ever going to be Debian or alpine in a container, in which ca…

Mac OS switched to zsh a couple releases ago due to bash being GPL 3 so the shell isn’t old anymore and installing bash is as easy as brew install bash.

Re: Why I develop on Windows

#26
post #13
post #10

> I know a lot of developers who will opt to do all of their scripting in python these days, even putting #!/bin/python3 at the head of a script so that it runs through the shell. ...which is exactly what you're meant to do. This is not an example of how bad Bash it, it shows that you didn't understand what Bash is. It's expected to use various languages to write code on Linux, nobody wants you to do things in a lang…

To be fair to OP, I would then go on to label these people as equally ignorant: > A lot of people coming from the Unix-like world of macOS and Linux don't tend to know [PS]. Many people don't know it even exists at all. When I mention the Windows Terminal to people, they think I'm talking about the Windows Command Prompt, a crappy little program I know that PS and the new terminal is not the same as cmd.exe, and that…

Yeah. Reading the 3-pipe solution in bash versus 4-pipe solution in Powershell felt like it was verging on parody. Yes, these object-oriented features are nice - but they're something of a self-imposed problem on an OS that's designed like a database. Even the tools we use to parse JSON in bash aren't all that bad, if you can keep yourself grounded in the world of text processing.

I'm glad that the OP has a workflow that they like, but I'm not really convinced the grass is greener on the other side. I've used a lot of shells, Powershell doesn't really wow me that much anymore.

Re: Why I develop on Windows

#27

> If the software is written well, it will be sufficiently cross-platform and modular enough Yes … well … We brought on via acquisition a bunch of Windows devs. It turns out we can't even clone the repository onto their laptops: some files in the repo have ":" in the filename, which is forbidden. There's a "aux.rs", also a verboten filename in Windows. And then there were some that differed only in case, which honest…

> There's a "aux.rs", also a verboten filename in Windows.

That's not true.

> And then there were some that differed only in case, which honestly I don't know how we manage that, as the non-Windows side is macOS, and yet roughly once per year someone introduces two files, same name, differing case into the repo.

Sounds like a crappily maintained repo.

Re: Why I develop on Windows

#28
post #4

I keep on seeing all this talk about Powershell, and it's inspiring me to maybe learn some, although I've already commenced pursuit of skill in bash and python

After 3 decades working on Windows, I recently got into Linux and stared learning bash through "The Linux Command Line, 5th ed." book and watching youtube videos. Powershell is so much nicer and a lot more productive to work with compared to bash. Unlike the bash commands that returns strings, Powershell commands return objects. Working in any OOP language and Powershell feels very natural.

Just to corroborate from the opposite direction, I have run exclusively Linux on my personal machines for nearly a decade, and I started a new job where I get to use PowerShell, and it's really amazing, the amount of grep/tail/head (or Get-ChildItem/Select -First/-Last) I have to do is so much less, it feels so much less klunky. Probably the only thing I don't like more so far is Get-Help, because it doesnt put you into a pager with search, it just dumps to text. EDIT: apparently I need Help not Get-Help for paging EDIT2: and I hate that PowerShell doesn't support readline/emacs keybindings

Re: Why I develop on Windows

#29
post #10

> I know a lot of developers who will opt to do all of their scripting in python these days, even putting #!/bin/python3 at the head of a script so that it runs through the shell. ...which is exactly what you're meant to do. This is not an example of how bad Bash it, it shows that you didn't understand what Bash is. It's expected to use various languages to write code on Linux, nobody wants you to do things in a lang…

I thought we were supposed to be using `#!/usr/bin/env python3` and not `#!/bin/python3`?

Re: Why I develop on Windows

#30
post #11

Complaining that bash on macOS is old is valid, but it doesn’t seem relevant here. If you’re just going to use Powershell on Windows anyway, then surely bash doesn’t matter on either platform. More relevant in my view is how well the workstation you use supports interacting with your build system. In many organizations, the actual build environment is only ever going to be Debian or alpine in a container, in which ca…

wrt relevance and relevance...

macos used to be relevant, but now (like the jackling house) all the unix underpinnings have been left to rot.

[1] https://en.wikipedia.org/wiki/Jackling_House

By the way, macos bash is technically in violation of the GPL, as it doesn't ship the source for rootless.h (no, not the x file by the same name)

Post reply on HN