Hacker News new | ask | show | jobs
by gregmac 1372 days ago
I've done lots of dev on both linux and Windows. Neither is "better" IMHO. I started on Linux, but today my main work and personal systems are both Win10. I also have a persoanl Linux laptop I use sometimes (currently Pop_OS, because I felt like trying that).

There's certain things easier on one or the other, usually caused by silly hardcoding of paths (or other OS-specific assumptions). I've run into this with python packages on Windows for sure.

My Windows dev is mostly limited to .net, and I've been writing cross-platform for years (first via Mono, now .net core / .net 6). Most challenges with cross-platform .net are caused by hardcoding Windows-specific paths and backslash (vs using Environment.* and Path.Combine()), and secondarily by using win32-specific things (eg: registry).

Tip for Windows dev use: install Windows Terminal [1], scoop [2], oh-my-posh [3], and busybox [4]. Makes the cli so much more usable, at least for someone like me with linux CLI muscle memory (ls, grep, etc).

I've found the combo of busybox utils and PowerShell is very productive. I nearly always have at least a couple terminal tabs open, and I'm nearly 50/50 of whether I use cli or explorer to browse or operate on files.

[1] https://github.com/microsoft/terminal

[2] https://scoop.sh/

[3] https://ohmyposh.dev/

[4] https://scoop.sh/#/apps?q=busybox&s=0&d=1&o=true

2 comments

A note on the unix tools, if you have git (with git bash I guess) installed, you can add C:\Program Files\Git\usr\bin to your environment Path and you'll have access to ls, grep, tail, etc... from powershell.
Just don't try running any bash scripts written for running on actual linux systems though! If you're doing more than a smattering of CLI stuff, WSL is absolutely worth installing (and enables use of docker etc.)
Are you able to compare scoop to Chocolatey? I've stuck with choco for years now, because it has so many packages that I haven't wanted to try out scoop or WinGet.

Regarding PowerShell, I've found that it has become incredibly customizable these days. For example, I just enabled Emacs keybindings for it a couple days ago. So it feels almost like a bash terminal.

Use both!

I think one of the main differences is that scoop will install for the local user. Which means you don't have to install stuff from an admin console (I think you can do that with choco but its not the default).

I also just checked to see what apps I've used in scoop vs choco and the only one that choco doesn't have (that scoop does) is wsl-ssh-agent.

scoop had all the apps I install through choco.

I'm sure theres more differences that go a little deeper, but as a simple end user, those are the only things I've noticed

Interesting. I'll have to check it out comparison's sake.
Everything is per-user (non-admin).

The entire operation of it is simple but powerful: everything is based on a manifest file [1]. The official manifests are in git repos, but you can also install from a local file or a gist.

Chocolatey's usage of nuget packages while also basically just running the app's normal installer is weird and results in all kinds of situation where versions don't match, chocolately upgrades don't do the expected thing, etc. All these problems just don't happen with scoop (at least not in my years of experience with it).

Scoop apps install to ~/scoop/apps/<appname>/<version>/ and then get a symlink ~/scoop/apps/<appname>/current/, while also getting a ~/scoop/persist/<appname>/. It's just very elegant.

It adds "shims" for any executables in ~/scoop/shims/, and because that's the only directory added to your path (when scoop is first installed), newly added apps "just work" in all your open terminals/apps/etc.

It also seems faster. "scoop install <appname>" and a few seconds later you can use it. Chocolatey usually does the UAC prompt stuff and generally just feels clunky by comparison.

[1] https://scoop-docs.vercel.app/docs/concepts/App-Manifests.ht...