Live data from Hacker News

Why I develop on Windows

blog.shortround.dev

51–60 of 187 posts

Re: Why I develop on Windows

#51
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.

It's not the shell, it's the kernel that interprets the so-called shebang. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

Edit: oops, should have previewed, cryptonector beat me to it.

Re: Why I develop on Windows

#52

Earlier quoted context omitted.

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…

If the long command names bother you so much most have short aliases, but it's worth remembering that the short ones are cryptic and not that instructive if you're not already initiated.

It's not that bad. I'm mostly balking at the idea of `ConvertFrom-Json | ForEach-Object { $_.name }` being any easier to remember than `jq '.[].name' -r`. Both examples seem to "convert" text to JSON with a parser, it's like arguing over the difference between awk and catting into grep. Neither really seem more advantageous than the other.

Re: Why I develop on Windows

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

Dude is productive using Windows. It works well for him. It could be an option for you or anyone else too. You've lost the plot here.

Re: Why I develop on Windows

#55
post #49

I dont really see the answer to the question in the article, maybe I missed it. You can use PowerShell on Linux. You can use vcpkg on Linux (very well, even). You can learn C++ and you wont need the `_In_` and whatnot. If you use WSL2 for your development, are you even developing (fully) on Windows? What you can't do is really own a copy of windows (any recent one), and have the freedom to decide what tools you will…

> If you use WSL2 for your development, are you even developing (fully) on Windows?

Maybe it wasn't clear in the post: I dont use wsl except as a backend for docker. I use powershell, not bash

> There is nothing protecting your system from locking you out of any setting, at any point, and requiring you to buy a different key, subscribing, giving them your data, or whatever else.

Thats not something I care about

Re: Why I develop on Windows

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

Even with the default short aliases like gci there are only ~100 unique commands/commandlets aliased and 600 commandlets in a default install. Not to mention what happens when you start loading other commandlets. Trying to predicate your usage of PS on just using short commands is also going to fall short in documentation and searches. I recommend just getting used to the fact command names are long. is a good friend too.

Re: Why I develop on Windows

#57
post #48

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…

Yeah that's basically it, so thanks for mentioning abbreviations! I knew they had some aliases (e.g. ls, curl) but not that it was commonplace because any powershell tutorial uses the long form and capitalizes everything (indeed I don't interact with PS a lot). It all feels very design-by-committee. Not sure whether it's a good thing that guides never use the short form: long more readable, but the specific choices o…

I think the long form is because people usually tab to complete the names. Personally once you learn them they dont get that hard to type

Re: Why I develop on Windows

#58
post #48

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…

Yeah that's basically it, so thanks for mentioning abbreviations! I knew they had some aliases (e.g. ls, curl) but not that it was commonplace because any powershell tutorial uses the long form and capitalizes everything (indeed I don't interact with PS a lot). It all feels very design-by-committee. Not sure whether it's a good thing that guides never use the short form: long more readable, but the specific choices o…

100% and I never thought of that before but I can see how you'd get that impression from tutorials.

The VSCode powershell extensions will also give you suggestion squigglies under all of your aliases in a saved script if they're not long-form, but I usually mix and match based on pragmatism.

My use of alias vs long-form usually comes down to two sort of situations:

* Ad-hoc at the shell: all aliases all the time (and make my own if I need to. welcome to my godless wasteland, population: me) * Shared scripts: Just like any code, do what's idiomatic for the team. Usually it's largely aliases with some long-form

In practice I'd say the formatting consistency situation on teams isn't nearly as bad as SQL but obviously not as good as Go.

For reference, I'm also a huge APL fan, so hit me with arcane symbols in my free-time all day long, but definitely pragmatic balance at work.

I also don't even think of them as acronyms personally. The acronym just sort of means the semantic action in my brain at this point, but I think that's mostly a fluency thing, and can't really speak to it being hurtful/helpful since I'm so removed from when I first started learning it

Re: Why I develop on Windows

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

There are two commands that do work in shebang: /bin/sh and /usr/bin/env. Everything else will break sooner or later: BSDs, Nix, Linux distros with separate /bin and /usr/bin and so on.

Re: Why I develop on Windows

#60

Earlier quoted context omitted.

If the long command names bother you so much most have short aliases, but it's worth remembering that the short ones are cryptic and not that instructive if you're not already initiated.

It's not that bad. I'm mostly balking at the idea of `ConvertFrom-Json | ForEach-Object { $_.name }` being any easier to remember than `jq '.[].name' -r`. Both examples seem to "convert" text to JSON with a parser, it's like arguing over the difference between awk and catting into grep. Neither really seem more advantageous than the other.

The point is not about being easy to remember (powershell commands and their args can be autocompleted with tab so memorizing them isn't really important). It's about powershell being the object manipulation environment instead of a 3rd party tool like jq. This makes it easier to do stuff with your data with a .Net powered runtime rather than having to manipulate strings using tools with their own built in languages
Post reply on HN