Late last year, I completely changed my dev stack to Python on Linux with some other things. I wrote a series about it at the time:
- Part I: Intro and Rationale
- Part II: Linux
- Part III: Python/Django
- Part IV: HTMX
- Part V: VSCode and Copilot
- Part VI: Bulma
- Part VII: Sqlite
- Part VIII: uv
- Part IX: tooling
- Part X: networking
My choices were driven by the dangers of AI Coding Agents and Supply Chain attacks (more generally, just running untrusted code).
Getting all development off of my main machine was a big step. Choosing Linux for that machine was driven by cost per computing power for a desktop machine, and that I only need to run VSCode, a browser, and dev tools that are Linux first anyway.
I have been programming on the bare OS, but I was always going to want more isolation between projects and between the projects and the machine. I finally completed that step.
My choice was to use QEMU-KVM, an open-source VM solution. This blog about QEMU-KVM on Ubuntu was the most useful (and accurate) for me.
My general setup:
- The machine only has Ubuntu, Firefox, Tailscale (see networking), and my KVM setup described above.
- I built one VM to work on a new project (charting visualizations for Google Sheets), which only needs Ubuntu, VSCode, Git, and Firefox.
- This project is in Javascript, but I am building it with a dependency on D3 and nothing else. No NPM, not even jest. D3 is only loaded by the browser (not on the machine)
- For testing, I am building a minimal test harness in JS. It runs in the browser, so it will also be able to do DOM testing.
- There is no firewall yet, but I will probably do that soon. As a first step, just limiting the ports. I will document that if I go that way. It would be inside the VM.
- I allow some limited logged in browsing in my outside OS, mostly ChatGPT, but not Google. The main OS is for research. Nothing else can be installed on it (through any means, even trusted). The VM browsers are only for using my software (not the internet).
Other solutions I considered:
- Cloud based programming (like codespaces): This would definitely work for some projects I have, but I feel like I’d run up against limitations. Long-term, I think this will become the only sane way to program.
- Docker: I am not that comfortable with it, and it seems like running GUIs (like VSCode) is not trivial. It would be more efficient with sharing installed software, but wasting disk space is just not an issue.
- No Sandbox: Just putting all development on a dedicated computer is probably enough. I went the VM route mostly out of personal interest. Having done it, one big plus is snapshotting.