Ask HN: Windows Dev Setup?

  • Its better then ever.

    1. Use Chocolatey (winget is still new). You can setup everything via it, and I mean everything - node, postgre, docker, vscode, all browsers, selenium and drivers etc.

    2. Learn Powershell, but learn it really good. Adopt PowerShell build system Invoke-Build

    3. Install better terminal - ConEmu or Windows terminal

    4. Enrich Windows using FOSS and cross platform tools: choco install copyq, flameshot, less, fzf, paint.net, git, tortoisegit, winscp, kitty, screentogif, sysinternals, wiztree, gsudo, lockhunter, signal, viber, slack

    5. Disable Windows Defender and use some debloater (controversial, but I do it, and system is at least x2-x5 faster). I use https://github.com/W4RH4WK/Debloat-Windows-10 along with ShutUp10 tool.

    6. Install the best search engine in the world: cinst everything

    Enjoy, its awesome.

  • After years of Fedora I now primarily run Windows because WSL just does everything I need. I prefer to still work in WSL Linux env and have my IDEs running through Windows (mostly Visual Studio Code and Goland). It's a nice setup for me because both OSes are just seamlessly available.

    Having said that I've had so many sleep/power management problems with Windows with my new ThinkPad that I nearly just switched back to Fedora before finding a configuration that more or less seems to work.

  • I run Arch Linux in Hyper-V on 11 Pro.

    Services (NGINX, MariaDB, PHP/PHP-FPM, etc.) are within Arch.

    Project files are in Windows, mounted as an NFS share within Arch.

    Editing and committing files mostly from Windows, Atom and git configured for LF.

    Executing tasks, Bash scripts and such, from Arch via SSH.

    I tend to duplicate tasks in Batch or Powershell for cross-compatibility.

    And use the same structure for Electron builds on the Windows side with WIX.

    Only complaint is VM performance.

    I'll probably swap to a bare-metal Linux machine, using the same approach, soon.

  • WSL2 with docker containers should bring you quite close to the environment you're used to. Added benefit of working from containers locally is the server parity in OTAP

  • You can avoid the awfulness of chocolatey by sticking with WSL2. Install that, docker desktop, windows terminal and vscode, voila you are back in linux land and can completely avoid powershell and windows broken file names.

  • All I'll say is, good luck. I was/am in the same boat and unfortunately for me it'll be the difference between staying in the role and potentially moving on in the future. WSL2 is decent, but there are some fundamental incompatibilities that in some cases make it unusable in a professional context. Everything feels a bit second rate to MacOS/Linux development - tooling, hardware, OS design, peripherals. Ultimately, I'd do almost anything to go back to a Mac and feel like I'm working at 100% efficiency again.

  • I prefer scoop instead of chocolatey. Also winget just doesn't feel like a finished product.

    https://scoop.sh/

  • WSL2 all the way. I didn't like Chocolatey.

    Just make sure that your actual code/project files are also inside of your WSL (https://dev.to/ajeet/so-you-have-installed-windows-subsystem...)

    There's a thing called WSL Bridge that VS Code hooks into, or uses somehow in order to run VS Code in Windows, but it is accessing and running code that's inside the WSL.

    I used various terminal programs but the most recent one I used was Windows Terminal: https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk...

    This alleviated many issues I had and I ended up getting my whole team onboard with the same setup.

    We were running Angular apps, and also vanilla JS stuff with Bootstrap, Gulp, Webpack, Live Server.

  • I think the best solution is to ask your coworkers how they provision their dev environments, because windows dev is such shit that you don't want to struggle to build and run other peoples' code in the office.

  • If you can build/run code in a linux environment:

    wsl2 gives you linux vm running in hyper-v alongside windows.. the vm pretty much has direct hardware access and is fast. From here, you can install linux based git, rsync, etc ... and the vm has full access to the windows filesystem.

    vscode has a nice wsl extension which runs in client/server mode with server living in the linux vm and client on windows.

    wsltty is closest feeling simple terminal, with translucency, etc.

    ... with this setup, i got rid of cygwin, vagrant, virtualbox, etc.

  • Visual Studio Professional, Eclipse/Netbeans, VS Code.

    latest PowerShell, Windows Terminal, WinMerge, Notepad++, ToirtoiseGit/SVN, Paint.NET.

    Office, FF, Chrome, EdgeChrome.

    Everything else is project specific.

  • A simple tip: with WSL/WSL2, you can run XServer process in Windows and your IDE launched inside WSL will show up as just another window in your Windows task bar (you have to point it at the Xserver). It completely eliminates the annoying double desktop/double taskbar setup that's normally a drawback of using a VM.

  • Powershell, Windows Terminal and oh-my-posh get you pretty close to zsh on Linux. I'll comment back with a few more tweaks I had to make to powershell to get closest to the Linux experience.

    But my biggest gripe is not having tmux. There are some window/tab/pane management shortcuts in Windows Terminal but they're not as good as tmux (yet).

  • winget is your friend, though you will find yourself living between Windows PowerShell and Git Bash most of the time.

  • Git bash and you're done