The pain and pleasure of developing on Windows
My employer is a primarily C#/.NET shop, and everything we do is on Windows machines and in Azure. It works out pretty well. Despite being historically bad at commitment, I’ve spent the past year sticking it out going 100% Windows for development.
I like Linux, but dual-booting always felt fragmented. I couldn’t listen to my obsessively cultivated music library with bit-perfect output while coding? Ugh. And maybe I’ll use a Mac when someone hands me $2000 in an Apple store and threatens to steal it back if I leave without buying something. Otherwise, small issues aside, I like Windows. There are two kinds of operating systems: Those people complain about, and those no one uses.
When I decided to dive into windows-everything on the job, I wanted to conserve as much awesome as I could- for customization to follow me between home, work, hackathons, etc.
Making Windows great/ less like Windows
- Everything search engine. Absolutely invaluable when you are trying to find out where in the heck your broken gulp task copied your entire assets directory to.
- Atom… plugin-packed and slightly clunky, like an IDE (with plugin sync)
- Wox Launcher- beautiful osx-spotlight-esque
- Cmder (even win10 cmd is painful)
- Classic start menu (For my Windows 8.1 machine)
- Notepad2 +notepad replacer for impulsive edits, WizMouse, other small utils.
Most things are portable and kept inside a Dropbox folder (it’s a couple GB total). I manage the PATH with cmder’s init script, and keep a new ‘computer init’ script that sets environment variables needed for applications that run outside of cmder. (for example, Atom using CSSLint)
- Git Bash
- GNUWin32 binaries
- NPM global bin
- A collection of executables in cmder’s bin folder
Node development is notorious on Windows. After much suffering I’m finally able to run an ‘npm install’ without spending an hour getting some silly native dependency to build. NPM3 has helped a lot- it tries harder to optimize the nested dependencies and therefore hardly ever hits the 260 character path limit. For building native stuff, it often needs the tools provided by visual studio, and it needs a little guidance from the msvs_version flag when installing. If you don’t have Visual Studio, MS has a “visual studio build tools” package that is a far smaller package of everything necessary.
Npm global (-g) installs packages to single location instead of adjacent to package.json- find out where yours are going with “npm root -g”. It gives you nice .cmd shortcuts here, so this is a really great folder to have in your PATH, giving you the ability to run things like http-server or rimraf anywhere.
I keep this global install root inside Dropbox so cool utilities I pick up sync over. However, this can add up, so I’m considering just keeping a package.json to update and install from instead.
C# in Visual Studio is a dream… enough said.
PHP and friends
Uniserver is a nice clean WAMP stack. It supports multiple versions and config files. The GUI is the right balance of features and simplicity. The PHP version(s) here is the only PHP exe I need on my system… everything else just causes confusion. Most of issues I’ve had with PHP stemmed from it using a different php.ini file than you expect. php -i will give you more information than you could ever want, and php -r “echo php_ini_loaded_file();” will tell you what config file the CLI is using (there is some weird pathfinding logic to eventually settle on a config)
I am open to suggestions on how (if possible) to make xdebug or any other debugger a pleasant experience…
Trimmed down winpython. (I removed the huge data science libraries with the gui) Pip and friends work fine, and it’s portable too (point to ‘winpython/python2.x/’ and ‘winpython/python2.x/Scripts’). Another positive experience having installed utilities follow me around.
PortableRuby + Ruby dev kit. In order to get most gem installs to work I’ve had to have the devkit visible in the path. The devkit installer is really annoying, but if you extract it and add it manually it seems to work nicely.