Why I Chose Go Over Python
Why I Chose Go Over Python
I initially built the backend in Python with FastAPI. It worked great. Then I rewrote it in Go, and it worked better. Here's why.
The Python Version
FastAPI is excellent. Auto-generated docs, type hints, async support. The backend was maybe 200 lines of clean Python.
But deployment meant:
- Installing Python 3.12 on the server
- Creating a virtual environment
- Running
pip install - Managing a requirements.txt
- ~50MB RAM idle
The Go Version
The Go backend is about 350 lines using only the standard library (plus SQLite and a markdown parser). But the deployment story is transformative:
go build -o portfolio
scp portfolio server:~/
ssh server "./portfolio"