In the neverending quest for the 'right' development setup, I've been thinking about the concept of how to organise and make available my tools. This is partly motivated by some 'new' (to me at least) tools and options which are becoming more popular; remote development (as included in VSCode), both in the sense of a remote server, but also a remote environment, like a container.
I'm currently editing this on a remote server; I've used this setup for about 90 days or so now. The motivation for this is partly the churn which I was experiencing earlier in the year around technology setup which I was using day to day (just look at the recent post history to get an idea: Arch, FreeBSD, Void, and now Windows 10). Having a volatile setup isn't condusive to productive work, so I moved all my development tools to a server with Digital Ocean, and as long as my local machine had an SSH client and my SSH key, then I could work.
So far, this setup has been very pleasant. It's really nice to treat the computers which I use for development as thin clients, and being able to move from my desktop to any laptop I have to hand and keep on working is liberating. Having a reliable environment is comfortable; the metaphor is something like a craftsman being at home in his own workshop.
There are annoyances, however. It takes time to connect to the server (only a few seconds here and there, but those add up), and very occasionally I'll lose my connection for no apparent reason (I guess maybe wifi congestion in my house). I also lose state between machines; VSCode doesn't seem to keep track of the buffers which I have open, which means I lose context sometimes. Some of these problems could be solved in other ways; SSH is used as the underlying transport, and I know there are ways to make SSH more robust to losing connection, and I imagine some of these techniques would work.
I also have some underlying anxiety about the way my workshop was built; it's completely organic. I created the environment in a hurry, and since then I've neglected any repeatability; my environment is a mess of
apt packages, some static binaries in
~/bin/, plus the usual
npm vomit, various tools installed in mysterious ways with
curl | bash (for shame!). If I want my homestead to really feel like home, I need to automate the setup.
This lead me to investigate VSCode remote development in a container; this should alleviate the repeatability AND the connectivity problems; assuming on each machine I'm willing to add a dependency (Docker) to go alongside the others (VSCode, SSH). It's something I intend to explore over the next few weeks. The inventory of tools I need is something like this:
awsclisetup, and associated credentials and configuration.
kubectland various other k8s related tools.
This is already quite a diverse list; I wonder if this lends itself to also investigating using
nix to manage.
More on this as I progress.