Live data from Hacker News

Why I develop on Windows

blog.shortround.dev

131–140 of 187 posts

Re: Why I develop on Windows

#131

Earlier quoted context omitted.

I find the former much more self-explanatory than the latter but, for instance, can't ForEach-Object be written as for?

I'm still a PowerShell novice, but I believe ForEach-Object and ForEach are subtly different, and PowerShell has classic For(Init; Condition; Increment) loops also but it's even more different than those two.

ForEach-Object and ForEach are the same thing.

Get-Help ForEach-Object

...

ALIASES foreach %

Re: Why I develop on Windows

#132
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`?

Correct. What OP uses would run on none of the systems I work with as far as I know

Re: Why I develop on Windows

#133
I have no idea what the point of this article is. It just seemed like rambling. Are you trying to get us to switch to Windows? To shame macOS into a better dev experience? To justify your own decisions to yourself?

Re: Why I develop on Windows

#134
I do a lot of work where I'm exporting data from SQL Server (often needing to rely on scripting semantics and transforming, not just a static dump), and really enjoy using PowerShell for this purpose (though in most cases, I run it from a Linux server or my own Mac)

Re: Why I develop on Windows

#135
I have gone the other way. Used to be a hardcore C#/.NET Framework dev on Windows and I still occasionally use Windows 11. However, since the advent of containers and dotnet core I've been doing lots of devops work. WSL2 is annoyingly slow and has its quirks vs a normal Linux. Docker Desktop with WSL2 backend is slow too. PowerShell is cross-platform so one can use it on Linux just fine.

Re: Why I develop on Windows

#136

Earlier quoted context omitted.

What’s the dirs -v, pushd and popd equivalent in PS?

popd and pushd are aliases for Pop-Location and Push-Location, so they are the PowerShell equivalent. Unsure about dir -v. dir itself is an alias for Get-ChildItem, but I don't know about -v (natural sort of version number)

dirs -v presents a numbered stack of directories. Pushd doesn’t just function on one directory but also takes in a number pointing to a directory on the stack. Nothing like this exists out of the box for PS and it’s one of the most productive features in Bash.

Re: Why I develop on Windows

#138
post #75

Earlier quoted context omitted.

It's just a knee-jerk reaction people have in any thread where powershell is mentioned. "Hur hur long command names." Doesn't bring anything to the discussion.

I can see where you're coming from, but to me it's not some meme or joke. I find it similarly annoying in Java, for example, and it makes me want to use that language less. Obviously it's only a small part of the whole consideration.

I assume you similarly also find Apple's swift/objc API's annoying. (If not, might want to objectively evaluate bias)

Re: Why I develop on Windows

#139
post #13

Earlier quoted context omitted.

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…

Is there a Powershell script to disable adware on a windows 11 box ?

Re: Why I develop on Windows

#140

Earlier quoted context omitted.

> 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…

Is there a Powershell script to disable adware on a windows 11 box ?

lol, you know what's funny is that I actually used to have a script like that for windows 10.

I volunteered to help a local nonprofit image a bunch of laptops and they'd bought win 10 home licenses for something like 30 laptops. The whole thing was kind of a nightmare but got most of the adware stripped out, I think, but not all of it. been awhile, so hard to remember

Post reply on HN